How do you view and manage hidden buffers?

When called switch-to-bufferin the minibuffer when pressed, SPACEyou can see hidden buffers that you usually don’t see, for example *Minibuf-0*.

How can you list these hidden buffers in the list of buffers shown list-buffers? If this is not possible with help list-buffers, how do you manage them?

+3
source share
4 answers

You can configure the function to display all buffers, for example:

(defun list-all-buffers (&optional files-only)
  "Display a list of names of existing buffers.
The list is displayed in a buffer named `*Buffer List*'.
Non-null optional arg FILES-ONLY means mention only file buffers.

For more information, see the function `buffer-menu'."
  (interactive "P")
  (display-buffer (list-buffers-noselect files-only (buffer-list))))

(define-key ctl-x-map "\C-b" 'list-all-buffers)
+5
source

ElectricBufferList does this for me:

(global-set-key "\C-x\C-b" 'electric-buffer-list)

Shows all buffers.

+1
source

bs-show list-buffers electric-buffer-list.

bs-show ,

bs--intern-show-never

I think that because they begin with a space, they should not be easily visible to you. They are more like internal variables, and manipulating them can cause things to start to behave erroneously quite quickly. It’s better to just ignore them for the most part.

+1
source

In any do buffer ...

(buffer-list) C-x C-e

Now the list will be in *messages*

now leave only hidden buffers; -)

0
source

Source: https://habr.com/ru/post/1768446/


All Articles