GNU bug report logs - #45392
28.0.50; read-from-minibuffer sets `this-command` variable to `exit-minibuffer`

Previous Next

Package: emacs;

Reported by: dalanicolai <dalanicolai <at> gmail.com>

Date: Wed, 23 Dec 2020 13:12:01 UTC

Severity: normal

Found in version 28.0.50

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: dalanicolai <dalanicolai <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 45392 <at> debbugs.gnu.org, Daniel Martín <mardani29 <at> yahoo.es>
Subject: bug#45392: 28.0.50; read-from-minibuffer sets `this-command` variable to `exit-minibuffer`
Date: Fri, 29 Jan 2021 01:11:33 +0100
[Message part 1 (text/plain, inline)]
Yes, that's it. Great, thanks!

On Mon, 25 Jan 2021 at 18:08, Juri Linkov <juri <at> linkov.net> wrote:

> >> Thanks for your bug report.  I think it is expected that 'this-command'
> >> is 'exit-minibuffer' in this case, because 'this-command' is usually set
> >> only once *at the beginning* of the execution of a command.  It keeps
> >> its value until a *new* command is executed by Emacs.  This is not
> >> explicitly said in the docstring, but it is mentioned in the Elisp Info
> >> manual.
> >>
> >> I don't know if the docstring could be expressed more clearly; I prefer
> >> to leave those command loop details to the Info manuals.
> >
> > I think so, too, so there doesn't seem to be anything further to do in
> > this bug report, and I'm closing it.  If there's more to be done here,
> > please respond to the debbugs address and we'll reopen.
>
> Is it what the recently added varible 'current-minibuffer-command'
> intended to do?  Then OP could use it like
>
>   (defun test ()
>     (interactive)
>     (print current-minibuffer-command)
>     (read-from-minibuffer "test")
>     (print current-minibuffer-command))
>
[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 115 days ago.

Previous Next


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