From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: position on changing defaults? Date: Sat, 08 Mar 2008 23:09:52 +0200 Organization: JURTA Message-ID: <87skz03otb.fsf@jurta.org> References: <200803050637.m256bXL3008361@sallyv1.ics.uci.edu> <200803052230.m25MUORx001881@sallyv1.ics.uci.edu> <200803070407.m27471TG016558@sallyv1.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1205010912 28540 80.91.229.12 (8 Mar 2008 21:15:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Mar 2008 21:15:12 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 08 22:15:39 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JY6OI-0001Nu-86 for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2008 22:15:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JY6Nk-0006CB-51 for ged-emacs-devel@m.gmane.org; Sat, 08 Mar 2008 16:15:04 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JY6Ne-00068V-05 for emacs-devel@gnu.org; Sat, 08 Mar 2008 16:14:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JY6Nc-00065p-8o for emacs-devel@gnu.org; Sat, 08 Mar 2008 16:14:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JY6Nb-00065e-NB for emacs-devel@gnu.org; Sat, 08 Mar 2008 16:14:55 -0500 Original-Received: from relay03.kiev.sovam.com ([62.64.120.201]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JY6NX-0000QS-Nt; Sat, 08 Mar 2008 16:14:52 -0500 Original-Received: from [83.170.232.243] (helo=smtp.svitonline.com) by relay03.kiev.sovam.com with esmtp (Exim 4.67) (envelope-from ) id 1JY6NN-000AQR-1u; Sat, 08 Mar 2008 23:14:49 +0200 In-Reply-To: (Richard Stallman's message of "Sat, 08 Mar 2008 12:40:01 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (x86_64-unknown-linux-gnu) X-Scanner-Signature: c6fa9c03b00bb8e85b0a425727b89505 X-DrWeb-checked: yes X-SpamTest-Envelope-From: juri@jurta.org X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 2372 [Mar 7 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {HEADERS: header Content-Type found without required header Content-Transfer-Encoding} X-SpamTest-Method: none X-SpamTest-Rate: 11 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release X-detected-kernel: by monty-python.gnu.org: FreeBSD 6.x (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:91780 Archived-At: > When doing C-x b it will start by showing in the minibuffer a list of > the buffers. > > I think I would find that very annoying. I tend to have 50 buffers or > more. > > I don't think this should be the default, not just for C-x b, > and not for anything else either. I have a patch that implements the best part of iswitchb functionality without changing the default minibuffer user interface. It provides the following benefits: 1. After typing C-x b: each M-n (or down-arrow) key will put the next buffer name to the minibuffer, starting with the most recent buffer and going in the order buffers are stored in the buffer list. 2. After typing C-x b: C-s or C-M-s will incrementally search the buffer list for the buffer name that matches the search string or regexp. So to switch to the buffer, the users can simply type any unique part of the buffer name or to repeatedly type C-s until seeing the needed buffer name, e.g.: `C-x b C-s [substring] C-s ... RET' This is implemented by putting the buffer list to the list of default values of the minibuffer created by the `interactive' code character `B': Index: src/callint.c =================================================================== RCS file: /sources/emacs/emacs/src/callint.c,v retrieving revision 1.161 diff -c -r1.161 callint.c *** src/callint.c 19 Feb 2008 04:03:01 -0000 1.161 --- src/callint.c 8 Mar 2008 21:09:16 -0000 *************** *** 520,528 **** break; case 'B': /* Name of buffer, possibly nonexistent */ ! args[i] = Fread_buffer (callint_message, ! Fother_buffer (Fcurrent_buffer (), Qnil, Qnil), ! Qnil); break; case 'c': /* Character */ --- 524,552 ---- break; case 'B': /* Name of buffer, possibly nonexistent */ ! { ! Lisp_Object tema, temb, temc; ! ! /* Get a list of buffer names (except the current buffer and ! internal buffers), and use this list for default values. */ ! tema = Qnil; ! temc = Fcurrent_buffer (); ! teml = Fbuffer_list (selected_frame); ! for (; CONSP (teml); teml = XCDR (teml)) ! { ! temb = XCAR (teml); ! if (EQ (temb, temc)) ! continue; ! if (NILP (temb)) ! continue; ! if (NILP (XBUFFER (temb)->name)) ! continue; ! if (SREF (XBUFFER (temb)->name, 0) == ' ') ! continue; ! tema = Fcons (XBUFFER (temb)->name, tema); ! } ! args[i] = Fread_buffer (callint_message, Fnreverse (tema), Qnil); ! } break; case 'c': /* Character */ -- Juri Linkov http://www.jurta.org/emacs/