all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* list-buffers behavior customization
@ 2016-05-05 20:47 Carlos Konstanski
  2016-05-05 22:46 ` Michael Heerdegen
  2016-05-07  0:55 ` Bernardo
  0 siblings, 2 replies; 7+ messages in thread
From: Carlos Konstanski @ 2016-05-05 20:47 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-05-07  0:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-05 20:47 list-buffers behavior customization Carlos Konstanski
2016-05-05 22:46 ` Michael Heerdegen
2016-05-06 13:03   ` Carlos Konstanski
2016-05-06 19:18     ` Stefan Monnier
2016-05-06 19:29       ` Carlos Konstanski
2016-05-06 19:36         ` Stefan Monnier
2016-05-07  0:55 ` Bernardo

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.