From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.help Subject: Re: completing-read does not accept spaces Date: Thu, 16 Jan 2014 19:36:32 +0100 Message-ID: <871u073han.fsf@wanadoo.es> 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 X-Trace: ger.gmane.org 1389897424 26022 80.91.229.3 (16 Jan 2014 18:37:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Jan 2014 18:37:04 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 16 19:37:11 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 1W3roU-0003tx-WB for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Jan 2014 19:37:11 +0100 Original-Received: from localhost ([::1]:34491 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3roU-0002Nu-IB for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Jan 2014 13:37:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3roD-0002M2-JC for help-gnu-emacs@gnu.org; Thu, 16 Jan 2014 13:36:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3ro6-0002SV-8f for help-gnu-emacs@gnu.org; Thu, 16 Jan 2014 13:36:53 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:39394) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3ro6-0002SP-1m for help-gnu-emacs@gnu.org; Thu, 16 Jan 2014 13:36:46 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W3ro3-00037W-JN for help-gnu-emacs@gnu.org; Thu, 16 Jan 2014 19:36:43 +0100 Original-Received: from 222.red-83-41-58.dynamicip.rima-tde.net ([83.41.58.222]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Jan 2014 19:36:43 +0100 Original-Received: from ofv by 222.red-83-41-58.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Jan 2014 19:36:43 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 46 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 222.red-83-41-58.dynamicip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:NlfkydaP0bb9dovYHlDUI6HAHB0= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:95450 Archived-At: Drew Adams writes: >> 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. > > No. The doc to read is (elisp) `Completion Commands', in particular, > about the variables named `minibuffer-local-*-map'. This is terrible. completing-read docstring says Read a string in the minibuffer, with completion. A string is a string is a string. It doesn't say "a word", or "a symbol", or "a string without spaces". It says "a string". >> 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. So by not binding SPC to self-insert-command they are breaking completing-read stated purpose. > 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. The docstring is wrong when it says "Read a string". That's a bug, IMO. > 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. ;-) Sigh. I know what you mean.