last day (15 days later) » 

10:21 PM
2
A: Debugging server related warning message

nispioTL;DR Either run M-x server-force-delete to delete any existing servers, or remove the lines which enable TeX-source-correlate-mode from your init file. From the AUCTeX documentation (found via C-h i): Upon opening the viewer you will be asked if you want to start a server process (Gnus...

 
"In other words, starting an edit server lets you click a location in your typeset output file and it will jump you to the corresponding location in the source. If this is not a feature you use, or plan to use, then you can simply remove those lines from your init." Actually, this is a feature that I would definitely like to have, but has not worked for me in the past. But I suppose that is a topic for a different question.
"If you open a second instance of Emacs (not just a second frame, but a whole new process) then only the most recent instance will behave as the server." So, just to be clear, if I have two different instances, both running synctex, will there be problems, since both syntex instances are trying to run servers?
 
@FaheemMitha About your first comment: Actually, this is that question. Solve this problem and you will solve that problem.
Yes. Generally speaking you can only have one server running at a time. However, Emacs can run multiple frames under the same process, tied to the same server, and there will be no problems. See the GNU Emacs manual for more on working with frames
 
"Actually, this is that question. Solve this problem and you will solve that problem." So, if I understand you correctly, you are saying the reason that wasn't working was because of a stuck server?
"However, Emacs can run multiple frames under the same process, tied to the same server, and there will be no problems". If I want to run my current emacs/TeX/synctex setup do I need to make some changes then? As far as I know, my emacs is not setup to "run multiple frames under the same process, tied to the same server". Unless it can figure out how to do this by itself, that is. And given that apparently synctex starts up an emacs server, and given that I often create separate emacs instances using LaTeX, it sounds like there could be a problem.
 
You can create a second frame as simple as C-x 5 2. SyncTeX will not create a second instance of emacs as long as the edit server is running .
 
Ok, so multiple frames are not an issue. But multiple instances are. "SyncTeX will not create a second instance of emacs as long as the edit server is running". Is that what is causing my error message, perhaps? If I have multiple instances of emacs running SyncTeX?
 
10:24 PM
Running multiple instances of Emacs is not very compatible with using an edit server, and that includes SyncTeX.
 
@nispio Ok. Can I run things that look like multiple instances, but are really not?
Sometimes I just like to have separate window like things.
 
Yes, that is what frames are.
What the operating system calls a "window" Emacs calls a "frame."
 
@nispio Ok, but to be concrete, if I do emacs something.tex & twice, that is two instances, right? I'd need to invoke it with emacs server or something?
Sorry, I don't really have the terminology down.
 
Yes. The best option is usually to open emacs and start a server. After that you can open documents with emacsclient -c something.tex &
If you add the -n option, you can drop the &.
Like this: emacsclient -n -c something.tex
You can include all of that in an alias to make it easier:
`alias edit 'emacsclient -n -c'`
The syntax for setting an alias will vary based on your shell.
 
10:41 PM
@nispio Yes, I see. So, to summarize, if I use synctex with that option, then synctex will start up a server. And so if I want to use emacs without problems, I need to switch to use emacsclient. Is that right?
 

  last day (15 days later) »