* select-window doesn't always make that window's buffer current
@ 2004-06-02 16:25 Don Bashford
0 siblings, 0 replies; only message in thread
From: Don Bashford @ 2004-06-02 16:25 UTC (permalink / raw)
Cc: Donald Bashford
In GNU Emacs 21.2.1 (i386-redhat-linux-gnu, X toolkit, Xaw3d scroll
bars)
of 2002-04-08 on porky.devel.redhat.com
configured using `configure i386-redhat-linux --prefix=/usr
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
--sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include
--libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var
--sharedstatedir=/usr/com --mandir=/usr/share/man
--infodir=/usr/share/info --with-gcc --with-pop --with-sound'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US.iso885915
locale-coding-system: iso-latin-9
default-enable-multibyte-characters: t
;; select-window doesn't set the current buffer as expected if
;; current buffer is not the one displayed in the selected window.
(setq a (get-buffer-create "A"))
(setq b (get-buffer-create "B"))
;; Now arrange the frame so A is in one window and B is in another
;; and select B. Then M-: eval the following:
(progn
(set-buffer a)
(select-window (get-buffer-window b))
(current-buffer))
;; the result is #<buffer A>. But the documentation says
;; - Function: select-window window
;; This function makes WINDOW the selected window. The cursor then
;; appears in WINDOW (on redisplay). The buffer being displayed in
;; WINDOW is immediately designated the current buffer.
;; so one would expect the return value to be #<buffer B>
;; The initial (set-buffer a), which gets the current-buffer and the
;; selected-window out of sync seems to be needed to trigger this
;; effect.
Emacs 21.3 has the same problem.
-Don
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-06-02 16:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-02 16:25 select-window doesn't always make that window's buffer current Don Bashford
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).