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: Two problems of completion Date: Tue, 29 Apr 2008 23:47:34 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1209527271 21885 80.91.229.12 (30 Apr 2008 03:47:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Apr 2008 03:47:51 +0000 (UTC) Cc: emacs-devel@gnu.org To: Herbert Euler Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 30 05:48:27 2008 connect(): Connection refused 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 1Jr3Iv-00037B-A2 for ged-emacs-devel@m.gmane.org; Wed, 30 Apr 2008 05:48:25 +0200 Original-Received: from localhost ([127.0.0.1]:40234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jr3IE-0004xN-G1 for ged-emacs-devel@m.gmane.org; Tue, 29 Apr 2008 23:47:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jr3I9-0004uH-N8 for emacs-devel@gnu.org; Tue, 29 Apr 2008 23:47:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jr3I8-0004sf-4T for emacs-devel@gnu.org; Tue, 29 Apr 2008 23:47:37 -0400 Original-Received: from [199.232.76.173] (port=36064 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jr3I8-0004sZ-0E for emacs-devel@gnu.org; Tue, 29 Apr 2008 23:47:36 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182] helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jr3I7-0005gu-MJ for emacs-devel@gnu.org; Tue, 29 Apr 2008 23:47:35 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgoEAFaIF0jO+JghdGdsb2JhbACBU499ASebIg X-IronPort-AV: E=Sophos;i="4.25,725,1199682000"; d="scan'208";a="19620072" Original-Received: from smtp.pppoe.ca (HELO smtp.teksavvy.com) ([65.39.196.238]) by ironport2-out.teksavvy.com with ESMTP; 29 Apr 2008 23:47:35 -0400 Original-Received: from pastel.home ([206.248.152.33]) by smtp.teksavvy.com (Internet Mail Server v1.0) with ESMTP id KHZ28935; Tue, 29 Apr 2008 23:47:35 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id E1E7581E8; Tue, 29 Apr 2008 23:47:34 -0400 (EDT) In-Reply-To: (Herbert Euler's message of "Wed, 30 Apr 2008 10:57:29 +0800") 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:96188 Archived-At: > Currently SPC is bound to minibuffer-complete-word in minibuffer. > With partial completion facilities implemented for minibuffer, I don't > know whether it is still right to bind SPC to this command, but if so > I find two problems. > 1. Special case: the string before completion is the empty string "". > In this case, completion--try-word-completion will see a completion > available, i.e. ("" . 0), and then try firstly completing with " " ("" > + " ") and then "-" ("" + "-"). Partial completion often (e.g. in a > command execution context, i.e. typing M-x then typing SPC) returns a > result of ("-" . 0), make a completion available. > I think when the user press SPC directly in such a case, it means that > the user wants to see a list of available completions, instead of > wanting a partially completed word. So this case might need special > handling. Yes, it looks like a poor situation indeed. Then again pressing SPC at an empty minibuffer might be because you do want to insert a leading SPC (to enter the name of a hidden buffer, for example). I see that `partial-completion-mode' suffers from the same problem. Hmm... not sure what to do. > 2. Minibuffer content rewriting. > The current minibuffer content rewriting facility in > completion--do-completion seems not for partial completion. I've just fixed a bug w.r.t computation of the new position of point after completion. I believe that's what you were experiencing, Stefan