开发者

How do you list and manage hidden buffers?

Whe开发者_JAVA百科n calling switch-to-buffer, in the minibuffer, when you press SPACE, you can see hidden buffers that you normally don't see, like *Minibuf-0* for example.

How could you list those hidden buffers into the list of buffers shown by list-buffers ? If it's not possible using list-buffers, how do you manage them ?


You can tweak the function to show all buffers, like so:

(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)


ElectricBufferList does it for me:

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

Shows all buffers.


I prefer bs-show to list-buffers and electric-buffer-list.

bs-show can be configured to display all buffers by changing the value of the variable

bs--intern-show-never

I think though that because they begin with a space, they're not supposed to be easily visible to you. They're more like internal variables, and manipulating them may make things start misbehaving pretty quickly. Best to just ignore them for the most part.


In any buffer do...

(buffer-list) C-x C-e

The list will now be in *messages*

now leave those hidden buffers alone ;-)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜