[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
list-buffers behavior customization
From: |
Carlos Konstanski |
Subject: |
list-buffers behavior customization |
Date: |
Thu, 5 May 2016 14:47:07 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 |
I quite often have 3 or 4 emacs frames open. Whenever I do a
list-buffers, it opens in whatever frame it appeared last. This is
usually not what I want. I want it to open in the frame that is
currently in focus.
The implementation looks like the following:
(defun list-buffers-noselect (&optional files-only buffer-list)
(let ((old-buffer (current-buffer))
(buffer (get-buffer-create "*Buffer List*")))
(with-current-buffer buffer
(Buffer-menu-mode)
(setq Buffer-menu-files-only
(and files-only (>= (prefix-numeric-value files-only) 0)))
(list-buffers--refresh buffer-list old-buffer)
(tabulated-list-print))
buffer))
The sexp (get-buffer-create "*Buffer List*") is where this behavior is
coming from.
Before I try to find some way to hack this function so that it deletes
the pre-existing buffer first, is there a hook where I can do this?
Thank you,
Carlos Konstanski
- list-buffers behavior customization,
Carlos Konstanski <=
Re: list-buffers behavior customization, Bernardo, 2016/05/06