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 22:43:14 -0400 Message-ID: References: <87prtiik0l.fsf@jurta.org> <87iqz969fh.fsf@jurta.org> <87od9181m7.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 1206585819 16368 80.91.229.12 (27 Mar 2008 02:43:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 27 Mar 2008 02:43:39 +0000 (UTC) Cc: emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 27 03:44:10 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 1Jei5w-0004L7-EA for ged-emacs-devel@m.gmane.org; Thu, 27 Mar 2008 03:44:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jei5L-0000qj-3K for ged-emacs-devel@m.gmane.org; Wed, 26 Mar 2008 22:43:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jei5G-0000p2-6f for emacs-devel@gnu.org; Wed, 26 Mar 2008 22:43:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jei5D-0000mx-Jw for emacs-devel@gnu.org; Wed, 26 Mar 2008 22:43:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jei5D-0000mo-Cy for emacs-devel@gnu.org; Wed, 26 Mar 2008 22:43:15 -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 1Jei5D-00058Q-4l for emacs-devel@gnu.org; Wed, 26 Mar 2008 22:43:15 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuAEAOWm6kdMCrTo/2dsb2JhbACBWqlt X-IronPort-AV: E=Sophos;i="4.25,562,1199682000"; d="scan'208";a="16930500" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 26 Mar 2008 22:43:14 -0400 Original-Received: from pastel.home ([76.10.180.232]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id HFS58514; Wed, 26 Mar 2008 22:43:14 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 3BF957F9E; Wed, 26 Mar 2008 22:43:14 -0400 (EDT) In-Reply-To: <87od9181m7.fsf@jurta.org> (Juri Linkov's message of "Thu, 27 Mar 2008 02:44:08 +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:93606 Archived-At: >> 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? > Yep, this was already implemented in my previous patch. I must have missed it. > If there exist a default value, then the first M-n just inserts this > default value to the minibuffer without any computation, and only next > M-n (that would otherwise signal an error) computes the > completion table. Yes, that's good. > Below is a new patch with a small improvement: it introduces a new > variable `minibuffer-default-add-p' useful to add more elements to the > list of defaults several times in chunks when needed (it can keep the > current state of added elements to the list of defaults): OK, then please remove (make-variable-buffer-local 'minibuffer-default-add-function). And I suggest to change minibuffer-default-add-p into minibuffer-default-add-done (and to reverse its default to nil). Also the docstring of minibuffer-default-add-function needs to mention that the function should set minibuffer-default-add-done. This said, I'm wondering when the chunked computation makes sense. Do you have an example in mind? Stefan