unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: Buffer listing in multiple frames/ttys
Date: Mon, 28 Nov 2005 15:12:47 -0800	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICKEHACPAA.drew.adams@oracle.com> (raw)
In-Reply-To: <lorentey.a.g.e.devel.874q5wbcje.elte@walrus.fnord.hu>

    Drew Adams <drew.adams@oracle.com> writes:
    > Using pop-up-frames = t is quite different from having a set of
    > fixed, thematic frames. It means that _each_ buffer is opened in a
    > separate frame.
    
    OK, but what is your point?  If you don't ever change buffers in a
    frame, then every time it is selected, its local buffer list will be
    the same as the global list.  Therefore, you shouldn't see any
    difference between the old and the new code when you call
    `list-buffers'.

That's not what I see. 

emacs -q

load your version of buff-menu.el

(setq pop-up-frames t)

open several buffers (they will be in separate frames)

call buffer-menu from various buffers

I see the buffer-menu order change when I call buffer-menu from different buffers. And it is not just the first (most recent) buffer that changes.
    
    > To understand what your change means for users with pop-up-frames =
    > t, imagine that the order of the buffer menu were changed each time
    > you called it from a different Emacs _window_ - that's what it's
    > like.
    
    I don't need to imagine it: it behaved that way even before the
    change--`list-buffers' always lists the most recently displayed buffer
    first, i.e., the one that was selected at the time of the
    `list-buffers' invocation.  If you run it from a different window, you
    get a different list, with that window's buffer in the topmost line.
    No?  Try it with "emacs -Q".

The default ordering is chronological, so, yes, the most recent buffer is always first. The relative order of the other buffers is not changed, however (currently). 

Your reordering goes beyond that - the change in order is confusing, unless one is thinking in terms of multiple buffers per frame and one knows about the new behavior. That means that the new behavior would need to be documented explicitly, or else people will not understand what they see.
    
    My change simply groups the buffers that were recently displayed in
    the current frame closer together.  It doesn't fundamentally change
    the way `list-buffers' works.
    
    > So, if it's not too much trouble, I'd suggest having the code test
    > whether pop-up-frames is non-nil and, if so, using the old
    > behavior. This would be less confusing and more manageable, for
    > people using pop-up-frames = t.
    
    It's not too much trouble at all; I am also willing to back out the
    change altogether.  But are you sure you know how `list-buffers'
    originally worked?
    
    > Also, if someone has gone to the trouble of sorting the buffer menu,
    
    How do you do that?  If you mean by `Buffer-menu-sort-column'
    (clicking on the header line sets that) then the new version doesn't
    affect that.

You are right about that. I was mistaken (see below).
    
    > and then calls it again, from a different frame, your change will
    > require manually resorting it, just to get back the last sort
    > order.
    
    The old code already did that.  The new code simply uses a slightly
    different order.
    
No, I was wrong about needing to manually re-sort. You were correct, above, when you said that your code doesn't change the sorted behavior. One didn't need to re-sort before (it stays as last sorted), and one doesn't need to re-sort after your change. IOW, IIUC, your code only affects the order for a chronological sort (the default sort).

Given that, I can't say I'm annoyed by your change. I was thinking of the (imagined) need to re-sort.

[However, I have my own extension to the column-sorting that adds a Time column, which shows the `buffer-display-time'. If I sort on that column, will I need to re-sort? I don't know - is `buffer-display-time' what is used in your ordering? That's what my "Time" column uses.]

BTW, I don't see any way for a user to get back the chronological sort, after having sorted by some column. This has nothing to do with your change. Once sorted, the sort order stays until you click to impose a different sort order - and there is no way to click to get a chronological sort.

I never noticed that before. That seems like a bug (misfeature), to me. If ever it is fixed, then we _might_ need to review your change - that is, if it then starts requiring people to manually re-sort.

Thanks,

 Drew    

  reply	other threads:[~2005-11-28 23:12 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-24 20:25 Buffer listing in multiple frames/ttys Len Trigg
2005-11-24 21:44 ` Károly Lőrentey
2005-11-28 14:37   ` Lőrentey Károly
2005-11-28 17:16     ` Drew Adams
2005-11-28 18:24       ` Lőrentey Károly
2005-11-28 19:23         ` Drew Adams
2005-11-28 20:48           ` Lőrentey Károly
2005-11-28 23:12             ` Drew Adams [this message]
2005-11-29  0:15               ` Luc Teirlinck
2005-11-29  0:29                 ` Drew Adams
2005-11-29 10:45               ` Lőrentey Károly
2005-11-29 15:36                 ` Drew Adams
2005-11-29 18:43                   ` Luc Teirlinck
2005-11-29 19:24                     ` Drew Adams
2005-11-30 13:21                   ` Lőrentey Károly
2005-11-29 18:12                 ` Luc Teirlinck
2005-11-29 23:35                 ` Luc Teirlinck
2005-11-29 23:55                   ` Chong Yidong
2005-11-29 23:57                     ` Chong Yidong
2005-11-30  0:20                   ` Drew Adams
2005-12-02 21:09       ` Juri Linkov
2005-12-03 15:58         ` Richard M. Stallman
2005-12-03 17:03         ` Lőrentey Károly
2005-12-03 17:46           ` Juri Linkov
2005-12-04 21:18             ` Richard M. Stallman
2005-12-04 21:56               ` Juri Linkov
2005-12-05  4:33                 ` Eli Zaretskii
2005-12-05  6:03                   ` Juri Linkov
2005-12-05 16:38                 ` Richard M. Stallman
2005-12-05 14:44             ` Károly Lőrentey
2005-12-05 21:32               ` Juri Linkov
2005-12-06 16:42                 ` Richard M. Stallman
2005-12-06  1:43               ` Richard M. Stallman
2005-12-06 12:44                 ` Károly Lőrentey
2005-12-07  0:52                   ` Juri Linkov
2005-12-07 14:51                     ` Károly Lőrentey
2005-12-07 21:29                       ` Juri Linkov
2005-12-08  7:48                       ` Juri Linkov
2005-12-08 14:26                         ` Lőrentey Károly
2005-12-08 19:29                       ` Richard M. Stallman
2005-12-08 21:56                         ` Juri Linkov
2005-12-09 15:04                           ` Richard M. Stallman
2005-12-09 20:04                             ` Lőrentey Károly
2005-12-09 23:54                               ` Juri Linkov
2005-12-10 16:18                                 ` Richard M. Stallman
2005-12-11  0:54                                   ` Juri Linkov
2005-12-11 16:49                                     ` Richard M. Stallman
2005-12-11 16:57                                   ` Károly Lőrentey
2005-12-11 16:53                             ` Károly Lőrentey
2005-12-11 22:57                               ` Richard M. Stallman
2005-12-12 12:56                                 ` Károly Lőrentey
2005-12-12  7:43                               ` Juri Linkov
2005-12-07 17:07                   ` Richard M. Stallman
2005-12-07 17:15                     ` Károly Lőrentey
2005-12-08  4:53                       ` Richard M. Stallman
2005-12-06 16:20               ` Drew Adams
2005-12-06 18:09                 ` Lőrentey Károly
2005-12-07 16:54                   ` Drew Adams
2005-12-07 21:29                     ` Juri Linkov
2005-12-08  0:03                       ` Drew Adams
     [not found] <lorentey.g.e.devel.87hd9uff0k.elte@walrus.fnord.hu>
2005-11-30 16:33 ` Drew Adams

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=DNEMKBNJBGPAOPIJOOICKEHACPAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /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).