From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Guerry 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 13:04:55 +0100 Message-ID: <87d2k4hu77.fsf@bzg.ath.cx> References: <20db5440-5f90-46d1-b0a2-25f495661ae6@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1389096432 24215 80.91.229.3 (7 Jan 2014 12:07:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Jan 2014 12:07:12 +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 13:07:17 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 1W0VRF-0002Z3-86 for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jan 2014 13:07:17 +0100 Original-Received: from localhost ([::1]:40125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0VRE-0007Xh-QF for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jan 2014 07:07:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0VR6-0007UQ-HV for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 07:07:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0VR0-0002JC-Ji for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 07:07:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54524) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0VR0-0002J8-Gg for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 07:07:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W0VR0-0007YD-33 for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2014 07:07:02 -0500 X-Loop: help-debbugs@gnu.org 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: Original-Received: via spool by 15980-submit@debbugs.gnu.org id=B15980.138909642029007 (code B ref 15980); Tue, 07 Jan 2014 12:07:02 +0000 Original-Received: (at 15980) by debbugs.gnu.org; 7 Jan 2014 12:07:00 +0000 Original-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 Original-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 Original-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) Original-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) Original-Received: by bzg.localdomain (Postfix, from userid 1000) id 9DDDD1C2074C; Tue, 7 Jan 2014 13:06:52 +0100 (CET) In-Reply-To: <20db5440-5f90-46d1-b0a2-25f495661ae6@default> (Drew Adams's message of "Tue, 26 Nov 2013 09:11:45 -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:83102 Archived-At: 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.