From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: C-r and C-s in minibuffer should search completion Date: Thu, 03 Apr 2008 21:18:47 -0400 Message-ID: References: <87prtiik0l.fsf@jurta.org> <87iqz969fh.fsf@jurta.org> <87od9181m7.fsf@jurta.org> <87lk440z31.fsf@jurta.org> <87od8xccz6.fsf@jurta.org> <87hceouksk.fsf@jurta.org> <87y77zlqji.fsf@jurta.org> <873aq2czp4.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1207293434 8308 80.91.229.12 (4 Apr 2008 07:17:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Apr 2008 07:17:14 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 04 09:17:46 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 1JhgBE-0004RL-4l for ged-emacs-devel@m.gmane.org; Fri, 04 Apr 2008 09:17:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JhgAb-0002qC-D2 for ged-emacs-devel@m.gmane.org; Fri, 04 Apr 2008 03:17:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JhgAW-0002ls-Aj for emacs-devel@gnu.org; Fri, 04 Apr 2008 03:17:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JhgAU-0002id-UT for emacs-devel@gnu.org; Fri, 04 Apr 2008 03:16:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JhgAU-0002iN-Kc for emacs-devel@gnu.org; Fri, 04 Apr 2008 03:16:58 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JhgAU-0005T1-8o for emacs-devel@gnu.org; Fri, 04 Apr 2008 03:16:58 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182] helo=ironport2-out.teksavvy.com) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JhgAT-0001CN-HO for emacs-devel@gnu.org; Fri, 04 Apr 2008 03:16:57 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqYCAFJy9UfO+J/WdGdsb2JhbACBWo9yASqaEg X-IronPort-AV: E=Sophos;i="4.25,603,1199682000"; d="scan'208";a="17648120" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 03 Apr 2008 21:25:17 -0400 Original-Received: from ceviche.home ([206.248.159.214]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id KFD33517 for ; Thu, 03 Apr 2008 21:25:17 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 58302B42B4; Thu, 3 Apr 2008 21:18:47 -0400 (EDT) In-Reply-To: <873aq2czp4.fsf@jurta.org> (Juri Linkov's message of "Fri, 04 Apr 2008 01:59:19 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by mx20.gnu.org: Genre and OS details not recognized. X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:94303 Archived-At: >> Actually, looking at the code some more, I'd suggest to add >> a `predicate' arg to `read-buffer' and then use it in switch-to-buffer >> (which would clearly need to be changed not to use a string-spec but >> a lisp-spec for its interactive spec). > Adding a new argument to `read-buffer' will cause the argument list > mismatch between `read-buffer' and `read-buffer-function', and > calling `read-buffer-function' with an additional argument will > break existing code. Then lets fix the existing code. > But I now have an idea how to accomplish this task without adding a > new argument to `read-buffer'. The patch below adds a new function > `read-buffer-to-switch' that binds `minibuffer-default-add-function' to > `minibuffer-default-add-buffers' that omits the current buffer from the > list of defaults before calling `read-buffer': That's ugly. Stefan