all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tino Calancha <tino.calancha@gmail.com>
To: 24962@debbugs.gnu.org
Cc: Tino Calancha <tino.calancha@gmail.com>
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)	[thread overview]
Message-ID: <alpine.DEB.2.20.1611182014290.11644@calancha-pc> (raw)


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





             reply	other threads:[~2016-11-18 11:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-18 11:15 Tino Calancha [this message]
2016-11-18 12:41 ` bug#24962: 26.0.50; list-buffers doesn't show buffers w/ name " "... visiting a file Tino Calancha
2016-11-18 14:31 ` Eli Zaretskii
2016-11-18 16:48   ` Clément Pit--Claudel
2016-11-18 17:09     ` Eli Zaretskii
2016-11-30  3:22       ` Clément Pit--Claudel
2016-11-30  2:59     ` Tino Calancha
2016-12-08  4:54   ` Tino Calancha

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=alpine.DEB.2.20.1611182014290.11644@calancha-pc \
    --to=tino.calancha@gmail.com \
    --cc=24962@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.