all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>, 60527@debbugs.gnu.org
Subject: bug#60527: 30.0.50; Typing SPC in a minibuffer with completion
Date: Wed, 4 Jan 2023 11:11:40 -0800	[thread overview]
Message-ID: <c6743bdb-f01e-e870-780f-510300b17ca8@gmail.com> (raw)
In-Reply-To: <jwva62za176.fsf@iro.umontreal.ca>

On 1/3/2023 11:05 AM, Stefan Monnier via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
> I wish the SPC binding to `minibuffer-complete-word` would go because it
> makes it hard to type SPC in the minibuffer whenever there's completion.
[snip]
> So my favorite option is indeed to simply remove this binding.
> Those few users who like it and use it (probably long-time users of
> Emacs) could easily get it back with:
> 
>      (define-key minibuffer-local-completion-map
>                  " " 'minibuffer-complete-word)

This would be my preference too, so long as there were an easy way for 
people who like the old behavior to get it back. (Would it be sufficient 
to just put that snippet in a NEWS entry?)

> Another option is to change `minibuffer-complete-word` so that instead
> of beeping "No match", it inserts a SPC when there's no completion and
> `require-match` is nil (after checking that the command was invoked via
> SPC).

I'm not sure about this one; if it were hard to predict ahead of time 
what SPC will do, then it could be even less usable. For example, if I 
want to insert a literal space, I might press SPC only to find that it 
performs completion. So then I have to undo and press "C-q SPC" to get 
what I want.

> Yet another option would be to let callers of `completing-read` indicate
> that it's likely the users will sometimes want to type a SPC character
> for this specific minibuffer input (i.e. `completing-read` would then
> use a map like `minibuffer-local-filename-completion-map`).

If this would work, it seems like a good compromise. But do the callers 
know for sure how this should be set? If they got it wrong, then it 
might have the effect of annoying both users who like the current 
binding and those who don't. (Similar to the above, there's not much 
worse than a button that *sometimes* does what you want.)

As yet another option, how about doing something like the first one, but 
gate it behind a defcustom? That provides an easy way for users to get 
the behavior they want, without having to deal with figuring out 
minibuffer bindings. (If we had a time machine, the defcustom probably 
wouldn't be necessary, but I think it makes sense to provide an easy 
escape hatch if changing some long-standing feature.)





      parent reply	other threads:[~2023-01-04 19:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03 19:05 bug#60527: 30.0.50; Typing SPC in a minibuffer with completion Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-03 20:14 ` Drew Adams
2023-01-04 18:17   ` Jean Louis
2023-01-03 22:50 ` Dmitry Gutov
2023-01-04  3:29   ` Eli Zaretskii
2023-01-04 12:05     ` Dmitry Gutov
2023-01-04 14:47       ` Eli Zaretskii
2023-01-04 17:00         ` Dmitry Gutov
2023-01-04 17:16           ` Eli Zaretskii
2023-01-04 17:45             ` Dmitry Gutov
2023-01-04 18:37               ` Eli Zaretskii
2023-01-04  7:09 ` Kévin Le Gouguec
2023-01-04 18:14 ` Jean Louis
2023-01-04 19:11 ` Jim Porter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c6743bdb-f01e-e870-780f-510300b17ca8@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=60527@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.