help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [h-e-w] tex-shell problems with emacs on XP


From: Dr Francis J. Wright
Subject: Re: [h-e-w] tex-shell problems with emacs on XP
Date: Sun, 8 Aug 2004 18:23:20 +0100

From: "Charles M. Goldie" <address@hidden>
To: <address@hidden>
Sent: Thursday, July 29, 2004 10:23 PM
Subject: [h-e-w] tex-shell problems with emacs on XP


> I'm having problems with tex-shell in a new installation of GNUEmacs
21.3.1
> on a Windows XP system.  The TeX version is MiKTeX 2.4.
>
> When emacs is visiting an existing TeX file the tex-shell command (C-c
C-f)
> works fine.  If the file is, for instance, a.tex then C-c C-f causes a
> window *tex-shell* to appear and the command
>
> tex "\nonstopmode\input" a.tex
>
> to be run in it.  But if the TeX file doesn't already exist, i.e. I get
> emacs to create the file a.tex and then type something into it, then C-c
> C-f results in the command line
>
> tex "\nonstopmode\input" a.tex.tex
>
> which of course results in an error.

The way I work around this problem is by putting the following in my .emacs
file:

(defadvice tex-main-file (around tex-main-file-advice activate)
  "Always use the buffer file name."
  (setq ad-return-value (file-relative-name buffer-file-name)))

It's a crude hack, but it has worked well for me for a very long time (and
several versions of NTEmacs, MiKTeX and Windows).

  This happens also if in a cmd.exe
> window I type
>
> runemacs a.tex
>
> in a directory where a.tex doesn't exist.

I never do this myself, but the above hack should still work.

> I can't reproduce this error on a Unix terminal, so think it may be
special
> to the Windows version of Emacs.  Is it a known problem and would anyone
> have a correction?

I always meant to investigate this properly and propose a better fix, but
never got around to it.  Incidentally, I also use a couple of other small
patches called msdos-tex-shell.el and latex-paren.el, which are available
from http://centaur.maths.qmul.ac.uk/Emacs/.  They are probably superfluous
if you use AUCTeX, but I don't.

> My other problems are brought on by calling emacs from a 4nt command
> window.  Does anyone have experience of running emacs under the 4nt shell
> from JPSoft?

No.  Sorry.

Best wishes, Francis





reply via email to

[Prev in Thread] Current Thread [Next in Thread]