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: Wed, 26 Mar 2008 10:47:12 -0400 Message-ID: References: <87prtiik0l.fsf@jurta.org> <87iqz969fh.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 1206542880 20632 80.91.229.12 (26 Mar 2008 14:48:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Mar 2008 14:48:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 26 15:48:27 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 1JeWv3-0002e9-LR for ged-emacs-devel@m.gmane.org; Wed, 26 Mar 2008 15:48:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JeWuS-00049G-Bv for ged-emacs-devel@m.gmane.org; Wed, 26 Mar 2008 10:47:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JeWuO-000493-GX for emacs-devel@gnu.org; Wed, 26 Mar 2008 10:47:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JeWuM-00048m-MR for emacs-devel@gnu.org; Wed, 26 Mar 2008 10:47:20 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JeWuM-00048e-Ga for emacs-devel@gnu.org; Wed, 26 Mar 2008 10:47:18 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JeWuM-0004Jm-2K for emacs-devel@gnu.org; Wed, 26 Mar 2008 10:47:18 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuAEADv/6UdMCrTo/2dsb2JhbACBWqk5 X-IronPort-AV: E=Sophos;i="4.25,558,1199682000"; d="scan'208";a="16860756" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 26 Mar 2008 10:47:12 -0400 Original-Received: from pastel.home ([76.10.180.232]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id GRV49212; Wed, 26 Mar 2008 10:47:12 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 20AA47F9E; Wed, 26 Mar 2008 10:47:12 -0400 (EDT) In-Reply-To: <87iqz969fh.fsf@jurta.org> (Juri Linkov's message of "Wed, 26 Mar 2008 12:56:02 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:93536 Archived-At: >> How would that help? M-r/M-s doesn't seem to search minibuffer-default. > It would be trivial to add in `previous-matching-history-element' the > same extending a list of defaults with a list of completions when M-s > hits the bottom of the list. Oh, I see, so I didn't miss anything. I guess that's OK, except that part is still missing ;-) And since C-s works better anyway (who wants non-incremental search when you can have isearch instead). >> This is not good when the completion table is a function that takes >> a long time, because then you have to wait for the completion table to >> be built before you can get the actual real DEF. > Just as when the user needs to see a full list of completions, the user > can bear a long time to build the completion table, when the user needs > to search a full list of completions, it is exactly the same situation: The difference is that in this case the user may not want to search anything at all, she just wants her M-n to bring up the default which was already provided and doesn't require any computation. > (though I don't know where in Emacs building the completion table takes > too long time, even C-h f takes less than 1 sec on modern hardware, and > woman takes 2 sec to build her very large completion table but does before > displaying the minibuffer.) Believe me there are such cases. Info-lookup is one, M-. is another, Tramp is yet another, tags-completion in PCL-CVS, .... the list goes on and on. >> Better would be to call the function only after we consumed >> minibuffer-default. Or maybe only do it when the completion-table is >> not a function. > It now calls the function after moved below minibuffer-default so it seems > this is good, There seem to be some typo or something missing from your sentence, but IIUC you have implemented what I suggested so that M-n only computes the completion table after having consumed the normal defaults? Can you send the new code? Stefan