From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Re: Feeling lost without tabs Date: Tue, 22 Jul 2014 00:57:37 +0100 Message-ID: <874myaw9hq.fsf@robertthorpeconsulting.com> References: <87bnsicr8l.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1405987097 9348 80.91.229.3 (21 Jul 2014 23:58:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Jul 2014 23:58:17 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Emanuel Berg Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 22 01:58:09 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X9NT5-0005Mi-5J for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Jul 2014 01:58:07 +0200 Original-Received: from localhost ([::1]:36844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9NT4-0006hd-R5 for geh-help-gnu-emacs@m.gmane.org; Mon, 21 Jul 2014 19:58:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9NSm-0006hV-Ec for help-gnu-emacs@gnu.org; Mon, 21 Jul 2014 19:57:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9NSf-0004Vp-Q2 for help-gnu-emacs@gnu.org; Mon, 21 Jul 2014 19:57:48 -0400 Original-Received: from outbound-smtp05.blacknight.com ([81.17.249.38]:60272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9NSf-0004Vh-Jy for help-gnu-emacs@gnu.org; Mon, 21 Jul 2014 19:57:41 -0400 Original-Received: from mail.blacknight.com (pemlinmail02.blacknight.ie [81.17.254.11]) by outbound-smtp05.blacknight.com (Postfix) with ESMTP id CC47F98814 for ; Mon, 21 Jul 2014 23:57:20 +0000 (UTC) Original-Received: (qmail 31421 invoked from network); 21 Jul 2014 23:57:39 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.76.122.232]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 21 Jul 2014 23:57:38 -0000 In-Reply-To: <87bnsicr8l.fsf@debian.uxu> (message from Emanuel Berg on Mon, 21 Jul 2014 23:54:34 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.38 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:98885 Archived-At: Emanuel Berg writes: > Dan Espen 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