GNU bug report logs - #27470
26.0.50; this-command-keys and interactive input

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Sat, 24 Jun 2017 06:00:02 UTC

Severity: minor

Tags: patch

Found in version 26.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: michael_heerdegen <at> web.de
Cc: 27470 <at> debbugs.gnu.org
Subject: Re: bug#27470: 26.0.50; this-command-keys and interactive input
Date: Sat, 22 Jul 2017 11:16:32 +0300
> Date: Sat, 24 Jun 2017 10:01:17 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 27470 <at> debbugs.gnu.org
> 
> > From: Michael Heerdegen <michael_heerdegen <at> web.de>
> > Date: Sat, 24 Jun 2017 07:58:47 +0200
> > 
> > (defun test (arg)
> >   (interactive (list (read-from-minibuffer "Input: ")))
> >   (message "%S" (cons this-command (this-command-keys)))
> >   arg)
> > 
> > (global-set-key [f12] #'test)
> > 
> > where f12 stands for some random key sequence.
> > 
> > Hit f12 and give any input.  I get the following message:
> > 
> > (test . "^M")
> > 
> > I would expect (test . f12).
> 
> This happens because read-from-minibuffer enters recursive-edit, and
> we don't preserve this-command-keys across recursive-edit invocations.
> 
> This has been Emacs behavior since forever.
> 
> The patch below seems to fix this, but I have no idea what it could
> break, given how old this behavior is.  So if we are to accept this,
> I'd like to have a few people step forward and run with the change for
> a month or so, to see there are no adverse effects.  We've been burnt
> several times lately by changes in keyboard-input stuff that broke
> subtle but very useful features.

Michael, any findings so far?  Do you recommend that we push that
change?

Thanks.




This bug report was last modified 7 years and 352 days ago.

Previous Next


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