XP, emacs, and tex-mode with MikTeX / YAP.
September 22, 2005 6:34 AM Subscribe
XP, emacs, and tex-mode with MikTeX / YAP.
(On someone else's XP machine, at their request) I've installed emacs 21.3 and need to get it playing nicely with MikTeX. For the most part, things work as they should: C-C C-F invokes TeX or LaTeX appropriately. But C-C C-V does not start the previewer. It issues the right command (I had to patch the tex-mode.el code just a smidge to keep it from appending a unix-style &), but yap either (a) just won't start or (b) starts, hangs for a long time, and then issues an "error reading the file" message.
If I issue the same command to launch yap manually from the command line (yap hello.dvi) it loads fine.
Also, the very same setup works fine on my Win98 laptop. Anyone successfully TeX-ing and YAP-ing from emacs on XP? Got any ideas?
(On someone else's XP machine, at their request) I've installed emacs 21.3 and need to get it playing nicely with MikTeX. For the most part, things work as they should: C-C C-F invokes TeX or LaTeX appropriately. But C-C C-V does not start the previewer. It issues the right command (I had to patch the tex-mode.el code just a smidge to keep it from appending a unix-style &), but yap either (a) just won't start or (b) starts, hangs for a long time, and then issues an "error reading the file" message.
If I issue the same command to launch yap manually from the command line (yap hello.dvi) it loads fine.
Also, the very same setup works fine on my Win98 laptop. Anyone successfully TeX-ing and YAP-ing from emacs on XP? Got any ideas?
Response by poster: I'll try that and find out - but in the meantime, if anyone else has ideas, post them. This is a bit of a nuisance since it's someone else's machine and I can't work on it at my convenience.
posted by Wolfdog at 9:34 AM on September 22, 2005
posted by Wolfdog at 9:34 AM on September 22, 2005
Can you capture the emacs output and make sure that it really is sending the correct command pointing to the right dvi file?
Could it be that emacs isn't correctly closing down LaTeX, so that the file reads as in-use and can't be opened by yap?
Is it a fresh MikTeX install, or is there some chance that the install is upgefuckt?
I don't know if this is helpful at all, but if all else fails WinEDT works and plays well with TeX.
posted by ROU_Xenophobe at 9:56 AM on September 22, 2005
Could it be that emacs isn't correctly closing down LaTeX, so that the file reads as in-use and can't be opened by yap?
Is it a fresh MikTeX install, or is there some chance that the install is upgefuckt?
I don't know if this is helpful at all, but if all else fails WinEDT works and plays well with TeX.
posted by ROU_Xenophobe at 9:56 AM on September 22, 2005
Response by poster: Yes, I can see it's sending the right command. But your second comment rings true - that's exactly what it feels like, as if the tex process were not terminated correctly. Any idea why that might be happening?
(If it were up to me emacs would be right out the window, but as much as possible I supports what they wants and they wants emacs. And XP.)
posted by Wolfdog at 10:00 AM on September 22, 2005
(If it were up to me emacs would be right out the window, but as much as possible I supports what they wants and they wants emacs. And XP.)
posted by Wolfdog at 10:00 AM on September 22, 2005
Some guesses based on general experience rather than any specific knowledge about your situation...
The guess about a process not terminating correctly sounds good to me. It also might be a problem with which directory emacs is looking for stuff in. A way to debug this would be to insert debugging messages in the emacs lisp file. For example, you might output a message when the process ends, test whether an output file actually exists and is readable, and so on.
I'd also be suspicious of your change to tex-mode.el. Moving the tex process to the foreground means that emacs will wait for it to terminate which sounds like one of the symptoms you describe.
A less direct answer to your question is to install cygwin. From your question it seems to me that you're more comfortable in a UNIX environment and cygwin will make your life easier.
posted by rdr at 10:35 AM on September 22, 2005
The guess about a process not terminating correctly sounds good to me. It also might be a problem with which directory emacs is looking for stuff in. A way to debug this would be to insert debugging messages in the emacs lisp file. For example, you might output a message when the process ends, test whether an output file actually exists and is readable, and so on.
I'd also be suspicious of your change to tex-mode.el. Moving the tex process to the foreground means that emacs will wait for it to terminate which sounds like one of the symptoms you describe.
A less direct answer to your question is to install cygwin. From your question it seems to me that you're more comfortable in a UNIX environment and cygwin will make your life easier.
posted by rdr at 10:35 AM on September 22, 2005
Oh I forgot to add that emacs has a built in debugger that should allow to atep through to isolate the problem.
posted by rdr at 10:38 AM on September 22, 2005
posted by rdr at 10:38 AM on September 22, 2005
I use emacs and MikTeX on XP daily. If I were you, I'd just backtrack and start over, doing a clean install of the whole schmear. I used these tips with zero trouble (and the compuphobes I've pointed at that page have also been successful).
posted by gleuschk at 7:04 AM on September 23, 2005
posted by gleuschk at 7:04 AM on September 23, 2005
Response by poster: Graham, are you using AUCTeX as your "tex mode"? I haven't tried it, but maybe that's the way to go.
posted by Wolfdog at 7:35 AM on September 23, 2005
posted by Wolfdog at 7:35 AM on September 23, 2005
No, I got too used to the standard tex mode (c-c c-f and all that) and couldn't retrain to use AucTeX, even though I'm told it's better.
posted by gleuschk at 8:46 AM on September 23, 2005
posted by gleuschk at 8:46 AM on September 23, 2005
This thread is closed to new comments.
posted by zsazsa at 9:20 AM on September 22, 2005