From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: BUG: which-func-mode Date: Sun, 16 Mar 2003 17:37:42 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200303162237.h2GMbgEq010788@rum.cs.yale.edu> References: <200303101828.h2AISIrs027316@rum.cs.yale.edu> <200303111907.h2BJ7ZHv012258@rum.cs.yale.edu> <200303142346.h2ENkKWm025313@rum.cs.yale.edu> <200303160802.h2G827JU003097@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1047854349 4659 80.91.224.249 (16 Mar 2003 22:39:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 16 Mar 2003 22:39:09 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Mar 16 23:39:07 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18ugmZ-0001Cm-00 for ; Sun, 16 Mar 2003 23:39:07 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18uhBw-0003Ye-00 for ; Mon, 17 Mar 2003 00:05:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18ugmJ-0006Ab-08 for emacs-devel@quimby.gnus.org; Sun, 16 Mar 2003 17:38:51 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18uglf-0004qV-00 for emacs-devel@gnu.org; Sun, 16 Mar 2003 17:38:11 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18uglY-0004Qv-00 for emacs-devel@gnu.org; Sun, 16 Mar 2003 17:38:06 -0500 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18uglD-0003xO-00 for emacs-devel@gnu.org; Sun, 16 Mar 2003 17:37:43 -0500 Original-Received: from rum.cs.yale.edu (localhost [127.0.0.1]) by rum.cs.yale.edu (8.12.8/8.12.8) with ESMTP id h2GMbhPe010790; Sun, 16 Mar 2003 17:37:43 -0500 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.12.8/8.12.8/Submit) id h2GMbgEq010788; Sun, 16 Mar 2003 17:37:43 -0500 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: "Robert J. Chassell" X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12392 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12392 > > I think that it would be better if select-window did not > > change the buffer-list. Why does it do it in the first place? > > > > Because it changes the selected buffer. > > I don't understand why one should imply the other. > After all, `set-buffer' also changes the selected buffer but it > doesn't modify the buffer-list. > > `set-buffer' works differently than `switch-to-buffer' or > `select-window'. As its documentation says, `set-buffer' > > ... does not display the buffer, so its effect ends > when the current command terminates. > > This is in contrast with `switch-to-buffer' or `select-window'. select-window does not "display the buffer" either. > Moreover, as said in > > (elisp)The Buffer List > > The "buffer list" is a list of all live buffers. Creating a > buffer adds it to this list, and killing a buffer excises it. The > order of the buffers in the list is based primarily on how > recently each buffer has been displayed in the selected window. > Buffers move to the front of the list when they are selected and > to the end when they are buried (see `bury-buffer', below). > Several functions, notably `other-buffer', use this ordering. A > buffer list displayed for the user also follows this order. This only talks about events where the buffer displayed in a window is changed rather than events where the selected window is changed. Furthermore, select-window is not a command and in the case at hand, it is used to *temporarily* switch to some other window. > I did not deal with `select-window', but in my "Introduction to > Programming in Emacs Lisp", I did explain the difference between > `switch-to-buffer' and `set-buffer' like this: I'm not comparing switch-to-buffer to set-buffer: I'm comparing select-window to set-buffer. I of course agree 100% with the current behavior which does not change the buffer-list in set-buffer but changes it in switch-to-buffer. OTOH, I still haven't heard any good reason why select-window should fiddle with the buffer-list. Stefan