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: Sun, 30 Mar 2008 22:11:24 -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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1206929506 1115 80.91.229.12 (31 Mar 2008 02:11:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 31 Mar 2008 02:11:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 31 04:12:16 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 1Jg9VO-00026j-AZ for ged-emacs-devel@m.gmane.org; Mon, 31 Mar 2008 04:12:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jg9Um-0003E4-Az for ged-emacs-devel@m.gmane.org; Sun, 30 Mar 2008 22:11:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jg9Uh-0003A4-F7 for emacs-devel@gnu.org; Sun, 30 Mar 2008 22:11:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jg9Ug-000384-Js for emacs-devel@gnu.org; Sun, 30 Mar 2008 22:11:30 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jg9Ug-00037Z-7c for emacs-devel@gnu.org; Sun, 30 Mar 2008 22:11:30 -0400 Original-Received: from 206-248-178-205.dsl.teksavvy.com ([206.248.178.205] helo=ceviche.home) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jg9Ug-00041i-1v for emacs-devel@gnu.org; Sun, 30 Mar 2008 22:11:30 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 305D7B40F9; Sun, 30 Mar 2008 22:11:24 -0400 (EDT) In-Reply-To: <87y77zlqji.fsf@jurta.org> (Juri Linkov's message of "Mon, 31 Mar 2008 02:50:57 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) 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:94002 Archived-At: >> The special code should be in C-x b, C-x 4 b, and C-x 5 b. >> Checking the caller inside the minibuffer is *bad*. I already >> suggested a much better solution: use a minibuffer-completion-predicate. >> That's what it's for. > C-x b switch-to-buffer has an interactive spec in buffer.c > "BSwitch to buffer: ". Do you mean replacing it with an > expression that uses `minibuffer-with-setup-hook' to bind > `minibuffer-completion-predicate' to a new predicate that > rules out the current-buffer? 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). Stefan