GNU bug report logs -
#76617
completing-read should accept spaces in require-match nil mode
Previous Next
To reply to this bug, email your comments to 76617 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76617
; Package
emacs
.
(Thu, 27 Feb 2025 21:11:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Daniel Colascione <dancol <at> dancol.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 27 Feb 2025 21:11:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
It's sometimes useful (especially when require-match nil) to enter text
with spaces in completing read, but right now, that's inconvenient (you
have to use C-q SPC) because we bind SPC to minibuffer-complete-word,
which won't insert a space unless space matches some possible
completion, and in require-match nil mode, there might not be a
completion with a space in it.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76617
; Package
emacs
.
(Thu, 27 Feb 2025 22:19:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 76617 <at> debbugs.gnu.org (full text, mbox):
> It's sometimes useful (especially when require-match nil) to enter text
> with spaces in completing read, but right now, that's inconvenient (you
> have to use C-q SPC) because we bind SPC to minibuffer-complete-word,
> which won't insert a space unless space matches some possible
> completion, and in require-match nil mode, there might not be a
> completion with a space in it.
Indeed. Good luck!
Since 2005 (20 years ago), Icicles has made SPC self-inserting
during completion. I tried, in vain, to get vanilla Emacs to
do the same. Eventually Emacs did so for file-name completion
(only).
SPC and ? should be self-inserting. How many more decades till
this sinks in?
For word completion, it's sufficient to bind M-SPC instead of
SPC (also done in 2005).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76617
; Package
emacs
.
(Sun, 02 Mar 2025 15:09:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 76617 <at> debbugs.gnu.org (full text, mbox):
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
Perhaps SPC and ? should self-insert when they do not extend the
completion text at all. Would that behavior be convenient?
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76617
; Package
emacs
.
(Sun, 02 Mar 2025 15:54:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 76617 <at> debbugs.gnu.org (full text, mbox):
Richard Stallman <rms <at> gnu.org> writes:
> [[[ To any NSA and FBI agents reading my email: please consider ]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> Perhaps SPC and ? should self-insert when they do not extend the
> completion text at all. Would that behavior be convenient?
Only when require-match is nil, IMHO.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76617
; Package
emacs
.
(Sun, 02 Mar 2025 19:40:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 76617 <at> debbugs.gnu.org (full text, mbox):
> Perhaps SPC and ? should self-insert when they do not extend the
> completion text at all. Would that behavior be convenient?
I don't think so, but mine's just one opinion.
I think that would lead to confusion, hurting
more than helping.
Plus, with some completion "frameworks" (I'd
call them just packages that enhance/extend
completion possibilities) you can switch the
kind of completion/matching on the fly, with
the same pattern (input in the minibuffer).
And in that case SPC or ? could, after such
a switch, suddenly lead to completions, or
vice versa.
I really think that keys that have actions
such as what SPC and ? have had should not be
keys for printable (i.e., insertable) chars.
There's no more reason to have `?' not be
inserting than there is for `#' or `@' to not
be inserting.
Better to use unprintable keys for non-insert
actions. In my code I use `M-SPC' in place
of `SPC' and `M-?' in place of `?', for those
actions.
In general, in editable buffers, users shouldn't
need to use `C-q' to insert printable chars.
Just one opinion.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76617
; Package
emacs
.
(Fri, 02 May 2025 21:41:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 76617 <at> debbugs.gnu.org (full text, mbox):
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> > Perhaps SPC and ? should self-insert when they do not extend the
> > completion text at all. Would that behavior be convenient?
> Only when require-match is nil, IMHO.
To self-insert when REQUIRE-MATCH is nil seems like a good idea.
What about with other values of REQUIRE-MATCH, in the case where
adding the character would result in a match match something in the
completion list?
For instance, if the minibuffer contains `foo' and `foo?' is one
of the completions, them typing ? twice could insert ?
And something similar for SPC.
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#76617
; Package
emacs
.
(Fri, 02 May 2025 23:44:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 76617 <at> debbugs.gnu.org (full text, mbox):
> > > Perhaps SPC and ? should self-insert when they do not extend the
> > > completion text at all. Would that behavior be convenient?
>
> > Only when require-match is nil, IMHO.
>
> To self-insert when REQUIRE-MATCH is nil seems like a good idea.
>
> What about with other values of REQUIRE-MATCH, in the case where
> adding the character would result in a match match something in the
> completion list?
>
> For instance, if the minibuffer contains `foo' and `foo?' is one
> of the completions, them typing ? twice could insert ?
>
> And something similar for SPC.
IMO there should be _no_ such restrictions, conditional
or otherwise.
Printable/self-inserting chars should generally
self-insert (i.e., without C-q) during completion.
RET/C-m and TAB/C-i are reasonable exceptions
(especially given their history). But even C-j should
self-insert.
`completing-read' is completely general. We shouldn't
assume anything about what the set of required-match
completions might be at any time - any chars, any order,
etc.
A given `completing-read' _call_ can, if need be, impose
such a restriction by let-binding a relevant minibuffer
keymap.
It took decades to get `read-file-name' to allow SPC to
self-insert. It's taken decades more for SPC and ? to
be taken seriously also for `completing-read' insertion.
Time to realize that `completing-read' candidates can
contain any chars. By default, we should self-insert
all printable chars.
(One opinion.)
This bug report was last modified 45 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.