[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#24962: 26.0.50; list-buffers doesn't show buffers w/ name " "... vis
From: |
Tino Calancha |
Subject: |
bug#24962: 26.0.50; list-buffers doesn't show buffers w/ name " "... visiting a file |
Date: |
Fri, 18 Nov 2016 20:15:52 +0900 (JST) |
User-agent: |
Alpine 2.20 (DEB 67 2015-01-07) |
emacs -Q -eval '(write-region "foo" nil (expand-file-name temporary-file-directory
"foo"))'
M-: (find-file (expand-file-name temporary-file-directory "foo")) RET
M-: (rename-buffer " foo") RET
C-x C-b
;; Buffer " foo" not listed.
From the Emacs manual:
doc/lispref/buffers.texi (Buffer Names):
Buffers that are ephemeral and generally uninteresting to the user
have names starting with a space, so that the @code{list-buffers} and
@code{buffer-menu} commands don't mention them (but if such a buffer
visits a file, it @strong{is} mentioned).
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
From 5f86fb83f6dcb65a3cbb03b3a09306f0375deb5a Mon Sep 17 00:00:00 2001
From: Tino Calancha <tino.calancha@gmail.com>
Date: Fri, 18 Nov 2016 20:07:15 +0900
Subject: [PATCH] List buffers with name starting with " " if they visit a file
* lisp/buff-menu.el (list-buffers--refresh)
---
lisp/buff-menu.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 4742628..2949409 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -633,7 +633,8 @@ list-buffers--refresh
(file buffer-file-name))
(when (and (buffer-live-p buffer)
(or buffer-list
- (and (not (string= (substring name 0 1) " "))
+ (and (or (not (string= (substring name 0 1) " "))
+ file)
(not (eq buffer buffer-menu-buffer))
(or file show-non-file))))
(push (list buffer
--
2.10.2
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
In GNU Emacs 26.0.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.3)
of 2016-11-16
Repository revision: 6653bb45d3697c9372cc77773c49f52399740b51
- bug#24962: 26.0.50; list-buffers doesn't show buffers w/ name " "... visiting a file,
Tino Calancha <=