GNU bug report logs - #47215
28.0.50; Let M-x switch between M-x and M-X

Previous Next

Package: emacs;

Reported by: Felician Nemeth <felician.nemeth <at> gmail.com>

Date: Wed, 17 Mar 2021 17:57:01 UTC

Severity: wishlist

Found in version 28.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 47215 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Felician Nemeth <felician.nemeth <at> gmail.com>
Cc: 47215 <at> debbugs.gnu.org
Subject: Re: bug#47215: 28.0.50; Let M-x switch between M-x and M-X
Date: Sun, 11 Apr 2021 19:36:24 +0200
Felician Nemeth <felician.nemeth <at> gmail.com> writes:

> I've discovered that the initial-input argument of `completing-read` can
> be written as (STRING . POSITION).  The attached patch makes use of it
> and shows a simple implementation of my original wish.

Nice; your patch works very smoothly -- using `M-x' to switch here feels
very natural.

> However, the patch creates code duplication.

I think that can be fixed by refactoring out most of the interactive
spec of `execute-extended-command-for-buffer' and then reusing it.

> Also, I don't know how it copes with recursive editing: maybe it's not
> a good idea to rebind M-x when `enable-recursive-minibuffers' is t.

A lot of people have `enable-recursive-minibuffers' bound, though, which
is an argument against using `M-x' as the keystroke to switch between
modes.

> Finally, the docstring says initial-input is deprecated.

I think this use case demonstrates that perhaps we should slightly
un-deprecate initial-input -- instead of deprecating it, we could
instead just discourage the usage.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 2 years and 330 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.