auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] Multifile document questions


From: Ralf Angeli
Subject: Re: [AUCTeX] Multifile document questions
Date: Mon, 15 Aug 2005 14:21:42 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

* Harald von Aschen (2005-08-14) writes:

> Then I want to insert an environment in my subdoc by C-c C-e and a type 
> mismatch "equa", so it is inserted in the auto file.

I don't understand that sentence.

> O.k., perhaps resetting buffer would help? Do the menu command "LaTeX" -> 
> Multifile/Parsing -> Reset Buffer (C-c C-n). This helps, "equa" has gone. 
> But then the AMS-environments like "split" are no longer available. Only 
> closing the subdoc and open it again in Emacs helps. Correct? (I have just 
> started this subdoc, so "split" has never been used here.) In the subdoc 
> defined macros are known.
>
> Next: C-c C-c or TeX-command-master called in the subdoc runs on the master 
> file and correctly starts LaTeX/PDFTeX or BiBTeX etc. after each change in 
> the subdocs or in the master. TeX-command-buffer or C-c C-b should run on 
> the buffer but does not recognize when changes have been done, so after the 
> first LaTeX-call only "View" is proposed as the next command and I have to 
> enter manually LaTeX.

Great, that bug is of the same category like the one I fixed for
`TeX-ispell-document' a few weeks ago.  `TeX-command-buffer' calls
`TeX-command-region'.  This creates a _region_.tex file in the
directory of the master file and prompts for the command by calling
`TeX-command-query'.  `TeX-command-query' calls `TeX-command-next' for
figuring out which command to call next.  In order to find out if any
of the files necessary to produce the derived file ("_region_.dvi" in
this case) is newer than the derived file, it calls `TeX-check-files'
with "_region_.dvi" as argument for `derived' and ("_region_") as
argument for `originals'.  `TeX-check-files' looks everywhere in
`TeX-check-path' for a region file.  Unfortunately the directory of
the master file, where _region_.tex is located, is not part of
`TeX-check-path'.  So it won't be found and that's why the prompt
always offers the "View" command.

Now I can add the directory of the master file to the directories to
be searched in `TeX-check-files'.  The the _region_.tex file will be
found.  But further down in `TeX-check-files' there is a call to
(file-newer-than-file-p name derived)
where `name' is the file name of _region_.tex with its full path and
`derived' is "_region_.dvi" (i.e. a file name without a path).  What
happens is that the call to `file-newer-than-file-p' is called in the
directory of the slave file where no "_region_.dvi" exists and the
funtion returns t.  This leads to the prompt always offering "LaTeX"
which is not much better than before.

Currently I don't know how to fix this properly.  I could probably
inject the full path to the _region_.dvi file somewhere, but all of
this pretty much feels like attaching some fragile band-aids to code
which needs some serious overhaul.

-- 
Ralf




reply via email to

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