From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Don Bashford Newsgroups: gmane.emacs.bugs Subject: select-window doesn't always make that window's buffer current Date: 02 Jun 2004 11:25:33 -0500 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <1086193535.5548.7.camel@hc-dbashfor.stjude.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1086193911 13250 80.91.224.253 (2 Jun 2004 16:31:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 2 Jun 2004 16:31:51 +0000 (UTC) Cc: Donald Bashford Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 02 18:31:36 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BVYeN-0007u9-00 for ; Wed, 02 Jun 2004 18:31:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BVYef-0004B5-J9 for geb-bug-gnu-emacs@m.gmane.org; Wed, 02 Jun 2004 12:31:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BVYec-0004Ah-58 for bug-gnu-emacs@gnu.org; Wed, 02 Jun 2004 12:31:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BVYeb-0004A6-C1 for bug-gnu-emacs@gnu.org; Wed, 02 Jun 2004 12:31:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BVYeb-00049x-98 for bug-gnu-emacs@gnu.org; Wed, 02 Jun 2004 12:31:49 -0400 Original-Received: from [192.55.208.20] (helo=mgate1.stjude.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1BVYe3-0005Ys-VB for bug-gnu-emacs@gnu.org; Wed, 02 Jun 2004 12:31:16 -0400 Original-To: bug-gnu-emacs@gnu.org X-Mailer: Ximian Evolution 1.0.8 (1.0.8-9.7x.1) X-OriginalArrivalTime: 02 Jun 2004 16:31:13.0027 (UTC) FILETIME=[04D57D30:01C448BF] X-SEF-FD9E3BCC-24E9-4B6F-96E-FFC4B78-SJCRH: 1 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:8098 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:8098 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 #. 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 # ;; 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