emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Buffer listing in multiple frames/ttys


From: Luc Teirlinck
Subject: Re: Buffer listing in multiple frames/ttys
Date: Tue, 29 Nov 2005 17:35:34 -0600 (CST)

Sorry if this arrives twice, but I believe that the CC to emacs-devel
somehow got lost the first time I sent this.

Lorentey Karoly wrote:

   I agree that there is no point in having frame-local buffer lists
   when pop-up-frames is set to t, so I propose in that case we
   continue to use the global buffer-list, as before.

`pop-up-frames' is mainly a way of preventing help buffers and such
from messing up window configurations.  `C-x b' still gives buffers in
the selected frame.  `M-x buffer-menu' still gives the Buffer Menu in
the selected frame.  Granted `C-x C-b' pops up the Buffer Menu in a
separate frame (and selects it, which seems strange).  But if you
auto-revert the Buffer Menu, then after at most auto-revert-interval
(default 5) seconds, a displayed Buffer Menu frame will automatically
update for the currently selected frame.

The frame local buffer list only makes no sense if you not only set
pop-up-frames to t, but, much more importantly, always use C-x 5 b
instead of C-x b, as Drew apparently does.  (I believe that he must
have rebound C-x b to run `C-x 5 b')  But that is highly personal usage.

On the other hand, if you do not use separate frames systematically
for separate themes, then usually the least important buffers are the
_globally_ least recent ones.  So in that case you might prefer the
old behavior, regardless of the value of `pop-up-frames'.

   So, should I apply this patch or not? :-)

For the reasons explained above, I would prefer a user option, with
the new behavior as default.  In other words, I would prefer the
following patch, which I could install if we decide to do that:

===File ~/buff-menu-diff====================================
*** buff-menu.el        28 Nov 2005 14:10:16 -0600      1.95
--- buff-menu.el        29 Nov 2005 11:27:05 -0600      
***************
*** 89,94 ****
--- 89,102 ----
    :type 'number
    :group 'Buffer-menu)
  
+ (defcustom Buffer-menu-use-frame-buffer-list t
+   "If non-nil, the Buffer Menu uses the selected frame's buffer list.
+ If nil, it uses the global buffer list.  This variable matters if
+ the Buffer Menu is sorted by visited order, as it is by default."
+   :type 'boolean
+   :group 'Buffer-menu
+   :version "22.1")
+ 
  ;; This should get updated & resorted when you click on a column heading
  (defvar Buffer-menu-sort-column nil
    "*2 for sorting by buffer names.  5 for sorting by file names.
***************
*** 722,728 ****
                                   (if (memq c '(?\n ?\s)) c underline))
                                 header)))))
        ;; Collect info for every buffer we're interested in.
!       (dolist (buffer (or buffer-list (buffer-list (selected-frame))))
        (with-current-buffer buffer
          (let ((name (buffer-name))
                (file buffer-file-name))
--- 730,739 ----
                                   (if (memq c '(?\n ?\s)) c underline))
                                 header)))))
        ;; Collect info for every buffer we're interested in.
!       (dolist (buffer (or buffer-list
!                         (buffer-list
!                          (when Buffer-menu-use-frame-buffer-list
!                            (selected-frame)))))
        (with-current-buffer buffer
          (let ((name (buffer-name))
                (file buffer-file-name))
============================================================






reply via email to

[Prev in Thread] Current Thread [Next in Thread]