From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: completing-read does not accept spaces (was: Command timeclock-out) Date: Thu, 16 Jan 2014 10:13:56 -0800 (PST) Message-ID: References: <52d7f748$0$29470$862e30e2@ngroups.net> <8761pj3lek.fsf@wanadoo.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1389896063 8911 80.91.229.3 (16 Jan 2014 18:14:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Jan 2014 18:14:23 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: =?iso-8859-1?B?03NjYXIgRnVlbnRlcw==?= , Miguel Guedes Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 16 19:14:29 2014 Return-path: Envelope-to: geh-help-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 1W3rSX-00017f-CM for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Jan 2014 19:14:29 +0100 Original-Received: from localhost ([::1]:34429 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3rSW-000490-Sw for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Jan 2014 13:14:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3rSE-00048a-A0 for help-gnu-emacs@gnu.org; Thu, 16 Jan 2014 13:14:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3rS5-000403-OH for help-gnu-emacs@gnu.org; Thu, 16 Jan 2014 13:14:10 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:39856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3rS5-0003zq-Hw for help-gnu-emacs@gnu.org; Thu, 16 Jan 2014 13:14:01 -0500 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s0GIDw9b008644 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 16 Jan 2014 18:13:59 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s0GIDvYZ019915 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 16 Jan 2014 18:13:57 GMT Original-Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s0GIDuN0013256; Thu, 16 Jan 2014 18:13:56 GMT In-Reply-To: <8761pj3lek.fsf@wanadoo.es> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:95447 Archived-At: > > I've just noticed that when executing `timeclock-out' and inputting a > > reason it does not accept spaces. This command makes use of the > > function `completing-read'. > > > > Is not accepting spaces when entering a reason for clocking out the > > intended behaviour? >=20 > Reading the docstring of completing-read I see no reason why it should > not accept spaces. So either the docstring is at fault or there is a bug > on completing-read.=20 No. The doc to read is (elisp) `Completion Commands', in particular, about the variables named `minibuffer-local-*-map'. > Curiously, the function will complete the user's input to a string > containing spaces if there is one on the collection of candidates: > (completing-read "say: " (list "hello there")) Irrelevant here. As the doc I mentioned says, `SPC' is bound to `minibuffer-complete-word', and that is what you are seeing. `SPC' is not bound to `self-insert-command' here - it is not inserting itself. It is just completing a "word" at a time. > Please submit a bug report (M-x report-emacs-bug) against completing-read= . No. There is no bug here. This is the behavior by design, like it or not. Do I personally think that `SPC' should generally be self-inserting during completion? You bet I do. And so should `?'. And so should `C-j' (newline). (And this is the case in Icicle mode, for instance.) But that is not the opinion of Emacs Dev. It took decades to finally get `SPC' to be self-inserting for file-name completion (see variable `minibuffer-local-filename-completion-map', in the same Elisp manual node). Patience. ;-)