auctex
[Top][All Lists]
Advanced

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

[AUCTeX] Re: C-c ` pops to *output* buffer


From: David Reitter
Subject: [AUCTeX] Re: C-c ` pops to *output* buffer
Date: Sun, 3 Feb 2008 17:52:32 +0000

On 26 Jan 2008, at 19:34, Reiner Steib wrote:

On Sat, Jan 26 2008, David Reitter wrote:

It actually happens with only pop-up-frames.
[...]
Turns out the TeX-parse-function is only ever called from TeX-next-
error, so changing TeX-parse-TeX should be a fairly safe thing to do.

It looks like several other caller of `TeX-pop-to-buffer' are wrong,
too.  See the attached, untested patch (I don't feel comfortable to
commit it, because I rarely use AUCTeX and LaTeX at the moment).

Okay, but in that case the source file is loaded in an extra window (or possibly frame) even if it is already displayed in the selected window (which will be the case in most situations). The change below takes care of that, while not changing the usually desirable behavior to show the source in a separate window if the buffer isn't selected.

(This patch is against the 11.84 release.)


*** tex-buf.el  15 Mar 2007 18:57:55 +0000      1.4
--- tex-buf.el  03 Feb 2008 17:29:32 +0000      
***************
*** 1460,1470 ****
          (command-buffer TeX-command-buffer)
          error-file-buffer)
        (run-hooks 'TeX-translate-location-hook)
!       (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 it has in the current buffer.
        (with-current-buffer error-file-buffer
        (set (make-local-variable 'TeX-command-buffer) command-buffer))
        (goto-line (+ offset line))
        (if (not (string= string " "))
          (search-forward string nil t))
--- 1460,1474 ----
          (command-buffer TeX-command-buffer)
          error-file-buffer)
        (run-hooks 'TeX-translate-location-hook)
! (setq error-file-buffer (if (equal (buffer-file-name (window- buffer))
!                                        (expand-file-name file))
!                                 (set-buffer (window-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 it has in the current buffer.
        (with-current-buffer error-file-buffer
        (set (make-local-variable 'TeX-command-buffer) command-buffer))
+       (print (+ offset line))
        (goto-line (+ offset line))
        (if (not (string= string " "))
          (search-forward string nil t))
***************
*** 1530,1536 ****
          (command-buffer TeX-command-buffer)
          error-file-buffer)
        (run-hooks 'TeX-translate-location-hook)
!       (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 it has in the current buffer.
        (with-current-buffer error-file-buffer
--- 1534,1543 ----
          (command-buffer TeX-command-buffer)
          error-file-buffer)
        (run-hooks 'TeX-translate-location-hook)
! (setq error-file-buffer (if (equal (buffer-file-name (window- buffer))
!                                        (expand-file-name file))
!                                 (set-buffer (window-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 it has in the current buffer.
        (with-current-buffer error-file-buffer

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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