[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feeling lost without tabs
From: |
Robert Thorpe |
Subject: |
Re: Feeling lost without tabs |
Date: |
Tue, 22 Jul 2014 00:57:37 +0100 |
Emanuel Berg <embe8573@student.uu.se> writes:
> Dan Espen <despen@verizon.net> writes:
>
>> I just feel the best one should be the default.
>> Could be ibuffer or some other xbuffer is the best,
>> but electric is better than the default (IMO).
>
> Perhaps it would make sense to merge some or many of
> those projects if they are so similar.
There's much more reuse than you think. The normal Emacs buffer list,
the one tied to C-x C-b is 'list-buffers'.
Here is the code for list-buffers with the docstring removed:
(defun list-buffers (&optional arg)
(interactive "P")
(display-buffer (list-buffers-noselect arg)))
Here is the code for buffer-menu with the docstring removed:
(defun buffer-menu (&optional arg)
(interactive "P")
(switch-to-buffer (list-buffers-noselect arg))
(message
"Commands: d, s, x, u; f, o, 1, 2, m, v; ~, %%; q to quit; ? for
help."))
The one I use is buffer-menu-other-window:
(defun buffer-menu-other-window (&optional arg)
(interactive "P")
(switch-to-buffer-other-window (list-buffers-noselect arg))
(message
"Commands: d, s, x, u; f, o, 1, 2, m, v; ~, %%; q to quit; ? for
help."))
So, all of them use the same underlying function:
'list-buffers-noselect', also all are in the same file: buff-menu.el.
Once you're in the menu buffer they all behave exactly the same.
The only major difference with electric-buffer-list is the keymap. The
buffer menu is made by calling list-buffer-noselect as usual then
changing the keymaps. Electric-buffer-menu-mode is derived from
Buffer-menu-mode using ~300 lines of code in ebuff-menu.el.
There is another buffer menu packaged with Emacs that's entirely
different: ibuffer. I understand a lot of people use that, I tried to
once but I've got too used to the default.
BR,
Robert Thorpe
- Re: Feeling lost without tabs, (continued)
- Re: Feeling lost without tabs, Bob Proulx, 2014/07/21
- Re: Feeling lost without tabs, Robert Thorpe, 2014/07/21
- Message not available
- Re: Feeling lost without tabs, Dan Espen, 2014/07/21
- Re: Feeling lost without tabs, Bob Proulx, 2014/07/21
- Message not available
- Re: Feeling lost without tabs, Dan Espen, 2014/07/21
- Re: Feeling lost without tabs, Emanuel Berg, 2014/07/21
- Re: Feeling lost without tabs,
Robert Thorpe <=
- Re: Feeling lost without tabs, Dan Espen, 2014/07/21
- Re: Feeling lost without tabs, Emanuel Berg, 2014/07/22
- Re: Feeling lost without tabs, Emanuel Berg, 2014/07/21
- Message not available
- Re: Feeling lost without tabs, Emanuel Berg, 2014/07/21
- Message not available
- have new Gnus message not always fullscreened (was: [gnu.emacs.help] Re: Feeling lost without tabs), Emanuel Berg, 2014/07/21
Re: Feeling lost without tabs, Tak Kunihiro, 2014/07/20
Message not available