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: Tue, 21 Feb 2006 09:36:06 +0100

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

> Using `TeX-command-buffer' would just read-access variables.

Okay this is my last try:

--- tex-buf.el  07 Feb 2006 14:04:19 +0100      1.247
+++ tex-buf.el  21 Feb 2006 09:33:33 +0100      
@@ -237,7 +237,9 @@
   (interactive "P")
   (if (null (TeX-active-buffer))
       (next-error reparse)
-    (funcall (TeX-process-get-variable (TeX-active-master) 'TeX-parse-function)
+    (funcall (TeX-process-get-variable (with-current-buffer TeX-command-buffer
+                                        (TeX-active-master))
+                                      'TeX-parse-function)
             reparse)))
 
 (defun TeX-previous-error (arg)
@@ -1108,7 +1110,8 @@
 
 (defun TeX-active-buffer ()
   "Return the buffer of the active process for this buffer."
-  (TeX-process-buffer (TeX-active-master)))
+  (TeX-process-buffer (with-current-buffer TeX-command-buffer
+                       (TeX-active-master))))
 
 (defun TeX-active-master (&optional extension nondirectory)
   "The master file currently being compiled.
@@ -1444,10 +1447,15 @@
     (let ((runbuf (current-buffer))
          (master (with-current-buffer
                      TeX-command-buffer
-                   (expand-file-name (TeX-master-file)))))
+                   (expand-file-name (TeX-master-file))))
+         error-file-buffer)
       (run-hooks 'TeX-translate-location-hook)
-      (find-file-other-window file)
-      (setq TeX-master master)
+      (setq error-file-buffer (find-file-other-window file))
+      ;; Set the value of `TeX-command-buffer' in the next file with
+      ;; an error to be displayed to the value in the current buffer.
+      (with-current-buffer error-file-buffer
+       (set (make-local-variable 'TeX-command-buffer)
+            (with-current-buffer runbuf TeX-command-buffer)))
       (goto-line (+ offset line))
       (if (not (string= string " "))
          (search-forward string nil t))
This bug is like a slippery fish wiggling out of my hands every time I
try to grab it.

-- 
Ralf

reply via email to

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