emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#24962: closed (26.0.50; list-buffers doesn't show


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#24962: closed (26.0.50; list-buffers doesn't show buffers w/ name " "... visiting a file)
Date: Thu, 08 Dec 2016 04:55:01 +0000

Your message dated Thu, 08 Dec 2016 13:54:00 +0900
with message-id <address@hidden>
and subject line Re: bug#24962: 26.0.50; list-buffers doesn't show buffers w/ 
name " "... visiting a file
has caused the debbugs.gnu.org bug report #24962,
regarding 26.0.50; list-buffers doesn't show buffers w/ name " "... visiting a 
file
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
24962: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24962
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 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 <address@hidden>
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



--- End Message ---
--- Begin Message --- Subject: Re: bug#24962: 26.0.50; list-buffers doesn't show buffers w/ name " "... visiting a file Date: Thu, 08 Dec 2016 13:54:00 +0900 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
Eli Zaretskii <address@hidden> writes:

>> From: Tino Calancha <address@hidden>
>> Date: Fri, 18 Nov 2016 20:15:52 +0900 (JST)
>> Cc: Tino Calancha <address@hidden>
>> 
>> 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).
>
> Thank.  Please add a test for this to the test suite.
I don't see further comments so i've pushed a fix to the
master branch as commit af96803.


--- End Message ---

reply via email to

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