From: Lennart Borgman <lennart.borgman@gmail.com>
To: 7749@debbugs.gnu.org
Subject: bug#7749: Buffer Menu forgets which buffers it has
Date: Tue, 28 Dec 2010 23:16:51 +0100 [thread overview]
Message-ID: <AANLkTikHFFMSh26QAL0Sr1nboNkECEXDKtQ82_qe8Os_@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimh_e8RYuXr0qHNGjEuLvdaFP9rJZqbFpJORMj9@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 427 bytes --]
On Tue, Dec 28, 2010 at 9:53 AM, Lennart Borgman
<lennart.borgman@gmail.com> wrote:
> Create a buffer menu buffer with
>
> (display-buffer
> (list-buffers-noselect nil (list (current-buffer))))
>
> The list will have just one buffer.
>
> Click on a column in the header to sort the list of buffers. After
> this the list will show all buffers that the user normally sees.
Attached a patch that fixes this.
[-- Attachment #2: buff-menu-revert.diff --]
[-- Type: application/octet-stream, Size: 1361 bytes --]
=== modified file 'lisp/buff-menu.el'
--- trunk/lisp/buff-menu.el 2010-11-09 05:33:07 +0000
+++ patched/lisp/buff-menu.el 2010-12-28 22:11:57 +0000
@@ -116,6 +116,14 @@
(make-variable-buffer-local 'Buffer-menu-files-only)
+(defvar Buffer-menu-current-buffers nil
+ "Non-nil if the current buffer-menu lists only those buffers.
+This variable determines whether reverting the buffer lists only
+this buffers. It affects both manual reverting and reverting by
+Auto Revert Mode.")
+
+(make-variable-buffer-local 'Buffer-menu-current-buffers)
+
(defvar Info-current-file) ;; from info.el
(defvar Info-current-node) ;; from info.el
@@ -283,7 +291,7 @@
;; interactively current buffer is correctly identified with a `.'
;; by `list-buffers-noselect'.
(with-current-buffer (window-buffer)
- (list-buffers-noselect Buffer-menu-files-only))
+ (list-buffers-noselect Buffer-menu-files-only Buffer-menu-current-buffers))
(if oline
(while (setq prop (next-single-property-change prop 'buffer))
(when (eq (get-text-property prop 'buffer) oline)
@@ -920,6 +928,7 @@
(and desired-point
(goto-char desired-point))
(setq Buffer-menu-files-only files-only)
+ (setq Buffer-menu-current-buffers buffer-list)
(set-buffer-modified-p nil)
(current-buffer))))
next prev parent reply other threads:[~2010-12-28 22:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-28 8:53 bug#7749: Buffer Menu forgets which buffers it has Lennart Borgman
2010-12-28 22:16 ` Lennart Borgman [this message]
2011-01-08 22:16 ` Chong Yidong
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTikHFFMSh26QAL0Sr1nboNkECEXDKtQ82_qe8Os_@mail.gmail.com \
--to=lennart.borgman@gmail.com \
--cc=7749@debbugs.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.