bug-auctex
[Top][All Lists]
Advanced

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

Re: [Bug-AUCTeX] Re: 11.82; TeX-master not used after TeX-next-error


From: Ralf Angeli
Subject: Re: [Bug-AUCTeX] Re: 11.82; TeX-master not used after TeX-next-error
Date: Mon, 20 Feb 2006 09:02:19 +0100

* David Kastrup (2006-02-19) writes:

> Ralf Angeli <address@hidden> writes:
>
>> Because `TeX-command-buffer' will point to the original file and not
>> to the region file after e.g. LaTeX was run with `C-c C-r'.
>> `(TeX-active-master)', however, will return the region file.
>
> Uh, so what?  You can always use
> (with-current-buffer TeX-command-buffer (TeX-active-master))
> in case you need the master.

D'oh.  I'll tell you when I'm done bashing my head against the table
plate.

Anyway, an easy fix for the reported problem would be the following
patch:

--- tex.el      16 Feb 2006 19:47:47 +0100      5.562
+++ tex.el      20 Feb 2006 08:52:45 +0100      
@@ -1331,7 +1331,9 @@
               (or (not TeX-master) (eq TeX-master 'shared)))
          (setq TeX-master TeX-transient-master))
         ;; Special value 't means it is own master (a free file).
-        ((equal TeX-master my-name)
+        ((and (stringp TeX-master)
+              (string= (TeX-strip-extension (expand-file-name TeX-master))
+                       (TeX-strip-extension (expand-file-name my-name))))
          (setq TeX-master t))
 
         ;; For files shared between many documents.
The normalization of strings for comparison destroys some information
which might be relevant, but maybe it is better than messing around
with `TeX-command-buffer'.  I'll have to look deeper into what
functions would have to be changed if we use the latter, but as far as
I can already see it would be at least `TeX-active-buffer' besides
`TeX-next-error'.

-- 
Ralf

reply via email to

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