Is there a way to do this? Currently, the click events are bound to previous/next buffer, but I would rather like to see a list of all buffers when I click the buffer name. Perhaps, it could make use of a simple OS native context menu similar to the major and minor mode buttons:
1 Answer
Try this:
(define-key mode-line-buffer-identification-keymap [mode-line mouse-3] 'list-buffers)
That does not show buffers whose names begin with a space. If you really want to show all buffers, then try this instead:
(define-key mode-line-buffer-identification-keymap
[mode-line mouse-3]
(lambda ()
(interactive)
(display-buffer (list-buffers-noselect nil (buffer-list)))))
(However, I agree with those who commented that this is a very useful thing to do.)
ag
to find a particular file?Ibuffer
which work on multiple buffers. Plus I keep several shells open and lots of Dired buffers on several machines... but usually about 1/3 of all buffers aren't associated with files: all kinds of shells or buffers which collect process output (logs) etc. Also mail adds a lot of it.