On Mon, Sep 11 2006, Miguel V. S. Frasson wrote:
> I don't know about you, but I find annoying when I am working inside
> auctex in some buffers (.tex sources), then I run latex, and a C-x b
> gives me as default buffer to switch to the *<file> output* buffer
> intead of the one I was working just before the C-c C-c.
[...]
>>From the help on switch-to-buffer:
[...]
> So we could just use the NORECORD arg. If someone likes to see the
> output, just switch to it (explicity) or use C-c C-l.
AFAICS, `switch-to-buffer' in the AUCTeX sources is not relevant
here. Probably `pop-to-buffer':
,----
| -*- mode: grep; default-directory: "~/src/links/auctex/auctex/" -*-
| Grep started at Wed Sep 13 15:42:00
|
| grep -nH -e .-to-buffer *.el
| bib-cite.el:259:;; The variable bib-switch-to-buffer-function sets the
function used to
| bib-cite.el:262:;; You may use `switch-to-buffer'
`switch-to-buffer-other-window' or
| bib-cite.el:263:;; `switch-to-buffer-other-frame'.
| bib-cite.el:451:;; - Added bib-switch-to-buffer-function
| bib-cite.el:611:(defcustom bib-switch-to-buffer-function 'switch-to-buffer
| bib-cite.el:613:You may use `switch-to-buffer'
`switch-to-buffer-other-window' or
| bib-cite.el:614:`switch-to-buffer-other-frame'."
| bib-cite.el:616: :type '(choice (function-item switch-to-buffer)
| bib-cite.el:617: (function-item switch-to-buffer-other-window)
| bib-cite.el:618: (function-item switch-to-buffer-other-frame)))
| bib-cite.el:1206:;;; (switch-to-buffer new-buffer)
| bib-cite.el:1207: (funcall bib-switch-to-buffer-function new-buffer)
| bib-cite.el:1545: (funcall bib-switch-to-buffer-function
(find-file-noselect the-file))
| bib-cite.el:1655: ;;(switch-to-buffer new-buffer)
| bib-cite.el:1656: (funcall bib-switch-to-buffer-function new-buffer)))
| tex-buf.el:205: (pop-to-buffer buffer t)
| tex-buf.el:211: (pop-to-buffer old-buffer))
| tex-buf.el:232: (switch-to-buffer TeX-command-buffer)))
| tex-buf.el:1076: (pop-to-buffer "*TeX background*")
| tex-buf.el:1323: (pop-to-buffer (TeX-active-buffer))
| tex-buf.el:1410: (pop-to-buffer old)
| tex-buf.el:1564: (pop-to-buffer (get-buffer-create "*TeX Help*"))
| tex-buf.el:1597: (pop-to-buffer old-buffer)))
| tex-wizard.el:31: (switch-to-buffer "*TeX wizard*")
| tex-wizard.el:44: (switch-to-buffer wizbuf)
| tex-wizard.el:48: (switch-to-buffer wizbuf))
| tex-wizard.el:56: (switch-to-buffer wizbuf))
| tex-wizard.el:72: (switch-to-buffer wizbuf)
| tex-wizard.el:78: (switch-to-buffer wizbuf))
| tex-wizard.el:106: (switch-to-buffer wizbuf))))
| tex.el:4935: (save-excursion (switch-to-buffer buffer) (ispell-buffer))
|
| Grep finished (matches found) at Wed Sep 13 15:42:01
`----
Unfortunately the third argument of `pop-to-buffer' is not
compatible between Emacs and XEmacs:
,----[ `C-h f pop-to-buffer RET' in Emacs 21 ]
| pop-to-buffer is a built-in function.
| (pop-to-buffer BUFFER &optional OTHER-WINDOW NORECORD)
|
| Select buffer BUFFER in some window, preferably a different one.
| If BUFFER is nil, then some other buffer is chosen.
| If `pop-up-windows' is non-nil, windows can be split to do this.
| If optional second arg OTHER-WINDOW is non-nil, insist on finding another
| window even if BUFFER is already visible in the selected window.
| This uses the function `display-buffer' as a subroutine; see the documentation
| of `display-buffer' for additional customization information.
|
| Optional third arg NORECORD non-nil means
| do not put this buffer at the front of the list of recently selected ones.
`----
,----[ `C-h f pop-to-buffer RET' in XEmacs 21.4.15 ]
| `pop-to-buffer' is a compiled Lisp function
| -- loaded from "/usr/share/xemacs/21.4.15/lisp/buffer.elc"
| (pop-to-buffer BUFNAME &optional NOT-THIS-WINDOW-P ON-FRAME)
|
| Documentation:
| Select buffer BUFNAME in some window, preferably a different one.
| If BUFNAME is nil, then some other buffer is chosen.
| If `pop-up-windows' is non-nil, windows can be split to do this.
| If optional second arg NOT-THIS-WINDOW-P is non-nil, insist on finding
| another window even if BUFNAME is already visible in the selected window.
| If optional third arg is non-nil, it is the frame to pop to this
| buffer on.
| If `focus-follows-mouse' is non-nil, keyboard focus is left unchanged.
`----
(BTW, ON-FRAME isn't documented here.)
But we could use a wrapper function and ignore the NORECORD in XEmacs:
--8<---------------cut here---------------start------------->8---
(defvar TeX-pop-to-buffer-norecord t)
(defun TeX-pop-to-buffer (buffer &optional other-window norecord)
"Compatibility wrapper for `pop-to-buffer'.
Select buffer BUFFER in some window, preferably a different one.
BUFFER may be a buffer, a string (a buffer name), or nil.
If BUFFER is a string which is not the name of an existing buffer,
then this function creates a buffer with that name.
If BUFFER is nil, then it chooses some other buffer.
If `pop-up-windows' is non-nil, windows can be split to do this.
If optional second arg OTHER-WINDOW is non-nil, insist on finding another
window even if BUFFER is already visible in the selected window,
and ignore `same-window-regexps' and `same-window-buffer-names'.
This function returns the buffer it switched to.
This uses the function `display-buffer' as a subroutine; see the documentation
of `display-buffer' for additional customization information.
Optional third arg NORECORD non-nil means do not put this buffer
at the front of the list of recently selected ones.
NORECORD is ignored in XEmacs."
(if (or TeX-pop-to-buffer-norecord (featurep 'xemacs))
(pop-to-buffer buffer other-window)
(pop-to-buffer buffer other-window norecord))
--8<---------------cut here---------------end--------------->8---
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
_______________________________________________
auctex-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/auctex-devel