From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Cc: emacs-devel@gnu.org
Subject: Re: BUG: which-func-mode
Date: Sun, 16 Mar 2003 17:37:42 -0500 [thread overview]
Message-ID: <200303162237.h2GMbgEq010788@rum.cs.yale.edu> (raw)
In-Reply-To: m18uXZR-000IeGC@rattlesnake.com
> > 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
next prev parent reply other threads:[~2003-03-16 22:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-05 0:36 BUG: which-func-mode Le Wang
2003-03-10 18:28 ` Stefan Monnier
2003-03-11 18:36 ` Richard Stallman
2003-03-11 19:07 ` Stefan Monnier
2003-03-13 7:48 ` Richard Stallman
2003-03-14 23:46 ` Stefan Monnier
2003-03-16 7:47 ` Richard Stallman
2003-03-16 8:02 ` Stefan Monnier
2003-03-16 12:48 ` Robert J. Chassell
2003-03-16 22:37 ` Stefan Monnier [this message]
2003-03-17 12:51 ` Robert J. Chassell
2003-03-18 13:22 ` Richard Stallman
2003-03-17 4:51 ` Richard Stallman
2003-03-17 15:30 ` Stefan Monnier
2003-03-17 23:24 ` Richard Stallman
2003-03-18 0:53 ` Stefan Monnier
2003-03-19 8:49 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200303162237.h2GMbgEq010788@rum.cs.yale.edu \
--to=monnier+gnu/emacs@rum.cs.yale.edu \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).