From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.bugs Subject: bug#15980: 24.3.50; `minibuffer-complete-word': case where it does not work correctly Date: Tue, 07 Jan 2014 18:14:06 +0100 Message-ID: <87fvozg1ep.fsf@bzg.ath.cx> References: <20db5440-5f90-46d1-b0a2-25f495661ae6@default> <87d2k4hu77.fsf@bzg.ath.cx> <87d76d4c-4684-43de-876e-46ebbdcb4b3e@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1389114914 28371 80.91.229.3 (7 Jan 2014 17:15:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Jan 2014 17:15:14 +0000 (UTC) Cc: 15980@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 07 18:15:20 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W0aFJ-00066x-Dc for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jan 2014 18:15:17 +0100 Original-Received: from localhost ([::1]:41991 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0aFI-0000fJ-Uj for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jan 2014 12:15:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0aFB-0000bk-DR for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 12:15:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0aF4-0000OO-Qn for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 12:15:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55494) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0aF4-0000O9-MF for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 12:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W0aF4-0000mp-8P for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 12:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Bastien Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Jan 2014 17:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15980 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15980-submit@debbugs.gnu.org id=B15980.13891148532936 (code B ref 15980); Tue, 07 Jan 2014 17:15:02 +0000 Original-Received: (at 15980) by debbugs.gnu.org; 7 Jan 2014 17:14:13 +0000 Original-Received: from localhost ([127.0.0.1]:41280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0aEH-0000lI-DF for submit@debbugs.gnu.org; Tue, 07 Jan 2014 12:14:13 -0500 Original-Received: from mail-wg0-f53.google.com ([74.125.82.53]:55479) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0aEE-0000l7-LO for 15980@debbugs.gnu.org; Tue, 07 Jan 2014 12:14:11 -0500 Original-Received: by mail-wg0-f53.google.com with SMTP id k14so422757wgh.32 for <15980@debbugs.gnu.org>; Tue, 07 Jan 2014 09:14:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=dVVAlsjD8ZoU2twxXVNIpXGMoMyv+RE7DH8Cc/2jR6k=; b=dCkopYLSyGWLux7B6D8qSzNtxpwtGgOzzE0M6HLshBmoba+eg2dI81BiXggDGysTDY aNJ2xwlQ8VlR09VM+fZpdINknjr+TBrEwLmz2Fs0vAGP8ZTVMA4y/xsc5pWVdmmrXswV 03/XgXf9kNhNlAkEQ7BEzOv2/oRZjA/my34qwfyF6Vs0s6tYlbFX6UOKEkNXVx5aLY+u Kb9X8UhAON2xfJcowZePJkDVicw9uIoFaLOO2BO3wkdXUUijhvI1bVI0R5XLUBNor0Bs wHvNTAB9ocGXjWPG/wPxAy45m9DKj+byna/X1dDuaoxVz8WIaGSle3NFrLvyJ2BLVlkn 3oTA== X-Received: by 10.194.175.202 with SMTP id cc10mr8942338wjc.48.1389114849782; Tue, 07 Jan 2014 09:14:09 -0800 (PST) Original-Received: from bzg.localdomain (AMontsouris-651-1-93-112.w82-123.abo.wanadoo.fr. [82.123.216.112]) by mx.google.com with ESMTPSA id fh2sm4514200wib.3.2014.01.07.09.14.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jan 2014 09:14:08 -0800 (PST) Original-Received: by bzg.localdomain (Postfix, from userid 1000) id 826E21C20717; Tue, 7 Jan 2014 18:14:06 +0100 (CET) In-Reply-To: <87d76d4c-4684-43de-876e-46ebbdcb4b3e@default> (Drew Adams's message of "Tue, 7 Jan 2014 09:06:36 -0800 (PST)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:83120 Archived-At: Drew Adams writes: >> > Since SPC is supposed to complete a word at a time, and since both >> > ` ' and `-' are word separators, I would expect that there are two >> > word completions for the prefix `cmd': `cmd ' and `cmd-'. >> > >> > So I would expect to see *Completions* displayed, showing the two >> > candidates `cmd w ith spaces' and `cmd-without-spaces'. >> >> See the first comment in `completion--try-word-completion': >> the function considers that either a space *or* an hyphen will >> be used to separate words. The "or" is exclusive. > > `completion--try-word-completion' is an *implementation*. If that's > what it does then it does not do what the doc says, right? So either > the doc needs to be fixed to fit the implementation or vice versa, no? `completion--try-word-completion' does not have a docstring. >> > Admittedly, this is a corner use case. > > I meant corner case for command names. It is not a corner case > to have space chars in completion candidates. Agreed. >> Yes -- note that TAB works fine here instead of SPC. >> >> The only place I can think of where this could be a problem >> is the info manual (`g' or `i' to go to a node or to find an >> index entry.) > > Why is that the only place you can think of? Because my thinking is limited. > Are you saying that > because those completion candidates contain space chars? There > are *lot* of places where Emacs can use completion for candidates > that contain space chars. My point is that there is little chance that *many* non-contrived strings can be completed either as xxx- or as xxx\ (wich a space.) > `completing-read' is completely > general. Emacs should make no assumptions about whether completion > candidates happen to contain spaces. Agreed. I couldn't find a fix. >> Still, you're not like to stumble on such case. > > What makes you say that? Instinct. But I can be proven wrong, of course. >> I'm for closing this bug until it really hit someone. > > That's not right. The product and the doc do not agree, as you > have pointed out. That alone is a bug. One way or another it > should be fixed. So let's keep this open and find someone that can fix it properly. -- Bastien