From unknown Tue Jun 17 01:30:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15980: 24.3.50; `minibuffer-complete-word': case where it does not work correctly Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Nov 2013 17:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15980 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 15980@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.138548594811562 (code B ref -1); Tue, 26 Nov 2013 17:13:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 Nov 2013 17:12:28 +0000 Received: from localhost ([127.0.0.1]:46204 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VlMBX-00030P-Ea for submit@debbugs.gnu.org; Tue, 26 Nov 2013 12:12:28 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53380) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VlMBV-00030C-0s for submit@debbugs.gnu.org; Tue, 26 Nov 2013 12:12:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlMBF-0002et-I2 for submit@debbugs.gnu.org; Tue, 26 Nov 2013 12:12:19 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:60567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlMBF-0002ep-FP for submit@debbugs.gnu.org; Tue, 26 Nov 2013 12:12:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlMB6-0006PL-SU for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2013 12:12:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlMAw-0002Xl-90 for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2013 12:12:00 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:38961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlMAv-0002XG-W1 for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2013 12:11:50 -0500 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rAQHBmW5024886 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 26 Nov 2013 17:11:49 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAQHBlhb028800 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 26 Nov 2013 17:11:47 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAQHBlpK028789 for ; Tue, 26 Nov 2013 17:11:47 GMT MIME-Version: 1.0 Message-ID: <20db5440-5f90-46d1-b0a2-25f495661ae6@default> Date: Tue, 26 Nov 2013 09:11:45 -0800 (PST) From: Drew Adams X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Seems like the behavior is wrong in this case, but I see that the same behavior is found for Emacs 20 through 24. So I cannot say for sure whether this is a bug. At least the behavior does not seem to follow the doc. The doc ((emacs) `Completion Commands') says that SPC does this: Complete up to one word from the minibuffer text before point (`minibuffer-complete-word'). emacs -Q (defun cmd\ \ \ \ w\ ith\ spaces () (interactive) (message "SPACES")) (defun cmd-without-spaces () (interactive) (message "NOPE")) M-x cm SPC ; correctly completes to `cmd' SPC ; completes to `cmd ' 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'. Admittedly, this is a corner use case. In GNU Emacs 24.3.50.1 (i686-pc-mingw32) of 2013-11-20 on LEG570 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --enable-checking 'CFLAGS=3D-O0 -g3' CPPFLAGS=3D-DGLYPH_DEBUG= =3D1' From unknown Tue Jun 17 01:30:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15980: 24.3.50; `minibuffer-complete-word': case where it does not work correctly Resent-From: Bastien Guerry Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Jan 2014 12:07: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: To: Drew Adams Cc: 15980@debbugs.gnu.org Received: via spool by 15980-submit@debbugs.gnu.org id=B15980.138909642029007 (code B ref 15980); Tue, 07 Jan 2014 12:07:02 +0000 Received: (at 15980) by debbugs.gnu.org; 7 Jan 2014 12:07:00 +0000 Received: from localhost ([127.0.0.1]:40308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0VQx-0007Xj-Q0 for submit@debbugs.gnu.org; Tue, 07 Jan 2014 07:07:00 -0500 Received: from mail-we0-f169.google.com ([74.125.82.169]:42119) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0VQu-0007XB-Pd for 15980@debbugs.gnu.org; Tue, 07 Jan 2014 07:06:57 -0500 Received: by mail-we0-f169.google.com with SMTP id w61so51057wes.14 for <15980@debbugs.gnu.org>; Tue, 07 Jan 2014 04:06:55 -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:date:references:user-agent :message-id:mime-version:content-type; bh=PS4YIMjoI2Z4KUM/iso04+yehk6Pc8SA9n1IHd3UbVU=; b=ZRf4ofV1W1ItG1oEVG8RXhoJrAlXF2lLDFDa7fLYYVYA+RUK/wQPiEHo5cp+OtEPWZ vsBZ5FTAMGKDqbMXQ06dfTqhZhK4byuIi9uilRpYsaVVlMv3OiWrgZMwYzE/AouXYuJv 1FSNOs2k6/Ie+jFyyMvUglDQYjs/d1X3+ctCd5FLsTGCrD5/bIyFjdOJBLRv+Usvu10H FN+oUQHS+Atfw9FXCswAaAus1X5xUy2KJUJQjyYkDmSMse9CSWGTxHv0pAIF/lG94xeP uvpMtoqCgewq5zkJLgseb12ibfVke0r4P8+DMXvw/ucvNAevql+vHllCNlHXI+AvU/S4 Ur4w== X-Received: by 10.180.13.74 with SMTP id f10mr16458177wic.34.1389096415891; Tue, 07 Jan 2014 04:06:55 -0800 (PST) Received: from bzg.localdomain (241-104-190-109.dsl.ovh.fr. [109.190.104.241]) by mx.google.com with ESMTPSA id fh2sm3237443wib.3.2014.01.07.04.06.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jan 2014 04:06:55 -0800 (PST) Received: by bzg.localdomain (Postfix, from userid 1000) id 9DDDD1C2074C; Tue, 7 Jan 2014 13:06:52 +0100 (CET) From: Bastien Guerry In-Reply-To: <20db5440-5f90-46d1-b0a2-25f495661ae6@default> (Drew Adams's message of "Tue, 26 Nov 2013 09:11:45 -0800 (PST)") Date: Tue, 07 Jan 2014 13:04:55 +0100 References: <20db5440-5f90-46d1-b0a2-25f495661ae6@default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Message-ID: <87d2k4hu77.fsf@bzg.ath.cx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Drew Adams writes: > Seems like the behavior is wrong in this case, but I see that the same > behavior is found for Emacs 20 through 24. So I cannot say for sure > whether this is a bug. At least the behavior does not seem to follow > the doc. > > The doc ((emacs) `Completion Commands') says that SPC does this: > > Complete up to one word from the minibuffer text before point > (`minibuffer-complete-word'). > > emacs -Q > > (defun cmd\ \ \ \ w\ ith\ spaces () (interactive) (message "SPACES")) > > (defun cmd-without-spaces () (interactive) (message "NOPE")) > > M-x cm SPC ; correctly completes to `cmd' > SPC ; completes to `cmd ' > > 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. > Admittedly, this is a corner use case. 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.) Still, you're not like to stumble on such case. I'm for closing this bug until it really hit someone. From unknown Tue Jun 17 01:30:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15980: 24.3.50; `minibuffer-complete-word': case where it does not work correctly Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Jan 2014 17:07: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: To: Bastien Guerry Cc: 15980@debbugs.gnu.org Received: via spool by 15980-submit@debbugs.gnu.org id=B15980.13891144042025 (code B ref 15980); Tue, 07 Jan 2014 17:07:02 +0000 Received: (at 15980) by debbugs.gnu.org; 7 Jan 2014 17:06:44 +0000 Received: from localhost ([127.0.0.1]:41253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0a72-0000WY-29 for submit@debbugs.gnu.org; Tue, 07 Jan 2014 12:06:44 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:32847) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0a6z-0000WO-PA for 15980@debbugs.gnu.org; Tue, 07 Jan 2014 12:06:42 -0500 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id s07H6csO004329 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 7 Jan 2014 17:06:38 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s07H6b3J012351 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 7 Jan 2014 17:06:38 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id s07H6bZk002873; Tue, 7 Jan 2014 17:06:37 GMT MIME-Version: 1.0 Message-ID: <87d76d4c-4684-43de-876e-46ebbdcb4b3e@default> Date: Tue, 7 Jan 2014 09:06:36 -0800 (PST) From: Drew Adams References: <20db5440-5f90-46d1-b0a2-25f495661ae6@default> <87d2k4hu77.fsf@bzg.ath.cx> In-Reply-To: <87d2k4hu77.fsf@bzg.ath.cx> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > 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'. >=20 > 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? > > 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. > Yes -- note that TAB works fine here instead of SPC. >=20 > 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? 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. `completing-read' is completely general. Emacs should make no assumptions about whether completion candidates happen to contain spaces.=20 > Still, you're not like to stumble on such case. What makes you say that? > 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. From unknown Tue Jun 17 01:30:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15980: 24.3.50; `minibuffer-complete-word': case where it does not work correctly 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: To: Drew Adams Cc: 15980@debbugs.gnu.org Received: via spool by 15980-submit@debbugs.gnu.org id=B15980.13891148532936 (code B ref 15980); Tue, 07 Jan 2014 17:15:02 +0000 Received: (at 15980) by debbugs.gnu.org; 7 Jan 2014 17:14:13 +0000 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 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 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) 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) Received: by bzg.localdomain (Postfix, from userid 1000) id 826E21C20717; Tue, 7 Jan 2014 18:14:06 +0100 (CET) From: Bastien In-Reply-To: <87d76d4c-4684-43de-876e-46ebbdcb4b3e@default> (Drew Adams's message of "Tue, 7 Jan 2014 09:06:36 -0800 (PST)") References: <20db5440-5f90-46d1-b0a2-25f495661ae6@default> <87d2k4hu77.fsf@bzg.ath.cx> <87d76d4c-4684-43de-876e-46ebbdcb4b3e@default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Date: Tue, 07 Jan 2014 18:14:06 +0100 Message-ID: <87fvozg1ep.fsf@bzg.ath.cx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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 From unknown Tue Jun 17 01:30:49 2025 X-Loop: help-debbugs@gnu.org Subject: bug#15980: 24.3.50; `minibuffer-complete-word': case where it does not work correctly Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Jan 2014 17:51: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: To: Bastien Cc: 15980@debbugs.gnu.org Received: via spool by 15980-submit@debbugs.gnu.org id=B15980.138911702615984 (code B ref 15980); Tue, 07 Jan 2014 17:51:02 +0000 Received: (at 15980) by debbugs.gnu.org; 7 Jan 2014 17:50:26 +0000 Received: from localhost ([127.0.0.1]:41331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0anJ-00049j-Tp for submit@debbugs.gnu.org; Tue, 07 Jan 2014 12:50:26 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:21995) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0anG-00049Y-Lv for 15980@debbugs.gnu.org; Tue, 07 Jan 2014 12:50:23 -0500 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id s07HoJnp026039 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 7 Jan 2014 17:50:19 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s07HoI8O026139 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 7 Jan 2014 17:50:19 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s07HoIbP014950; Tue, 7 Jan 2014 17:50:18 GMT MIME-Version: 1.0 Message-ID: <15a33bcc-ce90-484c-bb32-64d05647a09d@default> Date: Tue, 7 Jan 2014 09:50:17 -0800 (PST) From: Drew Adams References: <20db5440-5f90-46d1-b0a2-25f495661ae6@default> <87d2k4hu77.fsf@bzg.ath.cx> <87d76d4c-4684-43de-876e-46ebbdcb4b3e@default> <87fvozg1ep.fsf@bzg.ath.cx> In-Reply-To: <87fvozg1ep.fsf@bzg.ath.cx> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > >> 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? >=20 > `completion--try-word-completion' does not have a docstring. I meant the doc I cited earlier. It's not about whether that function's behavior matches its code comment. It's about whether Emacs behavior matches what we tell users that behavior is. > > 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. >=20 > 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.) OK. > > `completing-read' is completely general. Emacs should make no > > assumptions about whether completion candidates happen to contain > > spaces. >=20 > Agreed. I couldn't find a fix. Then perhaps leave it open until someone can. One possible fix is to document the actual behavior instead of saying what we say now. > >> 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. >=20 > So let's keep this open and find someone that can fix it properly. OK. But again, if you can describe the actual behavior, perhaps it is enough to correct what we say currently. From unknown Tue Jun 17 01:30:49 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Drew Adams Subject: bug#15980: closed (Re: bug#15980: 24.3.50; `minibuffer-complete-word': case where it does not work correctly) Message-ID: References: <87eh4jz7m0.fsf@bzg.ath.cx> <20db5440-5f90-46d1-b0a2-25f495661ae6@default> X-Gnu-PR-Message: they-closed 15980 X-Gnu-PR-Package: emacs Reply-To: 15980@debbugs.gnu.org Date: Tue, 07 Jan 2014 23:38:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1389137883-4788-1" This is a multi-part message in MIME format... ------------=_1389137883-4788-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #15980: 24.3.50; `minibuffer-complete-word': case where it does not work co= rrectly which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 15980@debbugs.gnu.org. --=20 15980: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D15980 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1389137883-4788-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 15980-done) by debbugs.gnu.org; 7 Jan 2014 23:37:37 +0000 Received: from localhost ([127.0.0.1]:41677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0gDH-0001EV-Vo for submit@debbugs.gnu.org; Tue, 07 Jan 2014 18:37:36 -0500 Received: from mail-we0-f171.google.com ([74.125.82.171]:59356) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W0gDE-0001EK-3h for 15980-done@debbugs.gnu.org; Tue, 07 Jan 2014 18:37:33 -0500 Received: by mail-we0-f171.google.com with SMTP id q58so793905wes.2 for <15980-done@debbugs.gnu.org>; Tue, 07 Jan 2014 15:37:31 -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=w7iHjo0y1CkKrnSFU29UmmI6IX8m0+rJVdhj3i0p3To=; b=mXkO7xRkrro/gW8qwLXZIdW5B0LLOKFhlzE+LfSxLFPFMZ8JCOa2ygFhjp6MAYfiGS srVk3kx+4gydtEuEUA2/sbKTNLffssM8MjsAswWuZNLCld+byD6VlKPaZKujTb2j3GHb JlCHeXZ9oVMC9C8AsdEsT0FX2T2yxPbT+/7Lxxjhut3S6Pvlaky0K41fHcDgo4ihEZw0 BfQiIXwbhEwLB4fL0VHwsQq8f3AzxK/pkhQSSN3M0Bp+4WfAb0bkPB1+woo8oKRgQy8+ RC/PJUq633YW5Nxr11oziMzd5d8qZfZQvvPo1O8PA2B4eP0/t0U1/RJVwUuCDvMwA/56 KYhg== X-Received: by 10.194.173.163 with SMTP id bl3mr79555199wjc.10.1389137851070; Tue, 07 Jan 2014 15:37:31 -0800 (PST) Received: from bzg.localdomain (mar75-2-81-56-68-112.fbx.proxad.net. [81.56.68.112]) by mx.google.com with ESMTPSA id at5sm5974734wic.1.2014.01.07.15.37.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Jan 2014 15:37:29 -0800 (PST) Received: by bzg.localdomain (Postfix, from userid 1000) id 6061E1C20717; Wed, 8 Jan 2014 00:37:27 +0100 (CET) From: Bastien To: Drew Adams Subject: Re: bug#15980: 24.3.50; `minibuffer-complete-word': case where it does not work correctly In-Reply-To: <15a33bcc-ce90-484c-bb32-64d05647a09d@default> (Drew Adams's message of "Tue, 7 Jan 2014 09:50:17 -0800 (PST)") References: <20db5440-5f90-46d1-b0a2-25f495661ae6@default> <87d2k4hu77.fsf@bzg.ath.cx> <87d76d4c-4684-43de-876e-46ebbdcb4b3e@default> <87fvozg1ep.fsf@bzg.ath.cx> <15a33bcc-ce90-484c-bb32-64d05647a09d@default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Date: Wed, 08 Jan 2014 00:37:27 +0100 Message-ID: <87eh4jz7m0.fsf@bzg.ath.cx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 15980-done Cc: 15980-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi Drew, Drew Adams writes: > OK. But again, if you can describe the actual behavior, perhaps > it is enough to correct what we say currently. This is now fixed in trunk. Please test and report any problem. -- Bastien ------------=_1389137883-4788-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 26 Nov 2013 17:12:28 +0000 Received: from localhost ([127.0.0.1]:46204 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VlMBX-00030P-Ea for submit@debbugs.gnu.org; Tue, 26 Nov 2013 12:12:28 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53380) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VlMBV-00030C-0s for submit@debbugs.gnu.org; Tue, 26 Nov 2013 12:12:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlMBF-0002et-I2 for submit@debbugs.gnu.org; Tue, 26 Nov 2013 12:12:19 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:60567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlMBF-0002ep-FP for submit@debbugs.gnu.org; Tue, 26 Nov 2013 12:12:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlMB6-0006PL-SU for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2013 12:12:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlMAw-0002Xl-90 for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2013 12:12:00 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:38961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlMAv-0002XG-W1 for bug-gnu-emacs@gnu.org; Tue, 26 Nov 2013 12:11:50 -0500 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id rAQHBmW5024886 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 26 Nov 2013 17:11:49 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAQHBlhb028800 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 26 Nov 2013 17:11:47 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id rAQHBlpK028789 for ; Tue, 26 Nov 2013 17:11:47 GMT MIME-Version: 1.0 Message-ID: <20db5440-5f90-46d1-b0a2-25f495661ae6@default> Date: Tue, 26 Nov 2013 09:11:45 -0800 (PST) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 24.3.50; `minibuffer-complete-word': case where it does not work correctly X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Seems like the behavior is wrong in this case, but I see that the same behavior is found for Emacs 20 through 24. So I cannot say for sure whether this is a bug. At least the behavior does not seem to follow the doc. The doc ((emacs) `Completion Commands') says that SPC does this: Complete up to one word from the minibuffer text before point (`minibuffer-complete-word'). emacs -Q (defun cmd\ \ \ \ w\ ith\ spaces () (interactive) (message "SPACES")) (defun cmd-without-spaces () (interactive) (message "NOPE")) M-x cm SPC ; correctly completes to `cmd' SPC ; completes to `cmd ' 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'. Admittedly, this is a corner use case. In GNU Emacs 24.3.50.1 (i686-pc-mingw32) of 2013-11-20 on LEG570 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --enable-checking 'CFLAGS=3D-O0 -g3' CPPFLAGS=3D-DGLYPH_DEBUG= =3D1' ------------=_1389137883-4788-1--