GNU bug report logs -
#46290
28.0.50; repeat's ability to repeat complex commands is broken
Previous Next
Reported by: Sean Whitton <spwhitton <at> spwhitton.name>
Date: Thu, 4 Feb 2021 07:56:01 UTC
Severity: normal
Tags: fixed, patch
Found in version 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46290 in the body.
You can then email your comments to 46290 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46290
; Package
emacs
.
(Thu, 04 Feb 2021 07:56:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Sean Whitton <spwhitton <at> spwhitton.name>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 04 Feb 2021 07:56:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello,
In the definition of `repeat' there is
(if (memq last-repeatable-command '(exit-minibuffer
minibuffer-complete-and-exit
self-insert-and-exit)
(let ((repeat-command (car command-history)))
(repeat-message "Repeating %S" repeat-command)
(eval repeat-command))
(if (null repeat-arg)
(repeat-message "Repeating command %S" last-repeatable-command)
(setq current-prefix-arg repeat-arg)
(repeat-message
"Repeating command %S %S" repeat-arg last-repeatable-command))
...)
In the "Repeating %S" branch, the idea seems to be that if the previous
command took minibuffer input, then repeat it again without prompting
for input by looking at command-history -- like typing C-x M-: RET.
Otherwise, in the "Repeating command %S" branch, just repeat what's in
last-repeatable-command.
Firstly, I note that there are some additional functions that ought to
go into the list of minibuffer-exiting functions --
read-char-from-minibuffer-insert-char and read--expression-try-read are
two I've found so far. It's suggested in bug#5264 that this be a defvar.
But secondly, it doesn't seem like the "Repeating %S" branch works at
all. For if you type M-! date RET C-x z then you get prompted for a
shell command, rather than date(1) just getting executed again right
away.
I added some debug printing to `repeat' and found that after M-! date
RET, last-repeatable-command is set to shell-command, not
exit-minibuffer. So perhaps the way that last-repeatable-command gets
set has changed since this code in repeat.el was written?
Or does the "Repeating %S" branch have some completely different purpose?
Thanks!
--
Sean Whitton
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46290
; Package
emacs
.
(Thu, 04 Feb 2021 08:32:01 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
>
> But secondly, it doesn't seem like the "Repeating %S" branch works at
> all. For if you type M-! date RET C-x z then you get prompted for a
> shell command, rather than date(1) just getting executed again right
> away.
>
> I added some debug printing to `repeat' and found that after M-! date
> RET, last-repeatable-command is set to shell-command, not
> exit-minibuffer. So perhaps the way that last-repeatable-command gets
> set has changed since this code in repeat.el was written?
>
FWIW, the answer to that question seems to be positive. In Emacs 21 M-!
date RET C-x z repeats "date" without prompting again, in later Emacsen
you get prompted again for a shell command.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46290
; Package
emacs
.
(Thu, 04 Feb 2021 08:32:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46290
; Package
emacs
.
(Thu, 04 Feb 2021 17:47:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 46290 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu 04 Feb 2021 at 08:30AM GMT, Gregory Heytings wrote:
>>
>> But secondly, it doesn't seem like the "Repeating %S" branch works at
>> all. For if you type M-! date RET C-x z then you get prompted for a
>> shell command, rather than date(1) just getting executed again right
>> away.
>>
>> I added some debug printing to `repeat' and found that after M-! date
>> RET, last-repeatable-command is set to shell-command, not
>> exit-minibuffer. So perhaps the way that last-repeatable-command gets
>> set has changed since this code in repeat.el was written?
>>
>
> FWIW, the answer to that question seems to be positive. In Emacs 21 M-!
> date RET C-x z repeats "date" without prompting again, in later Emacsen
> you get prompted again for a shell command.
Ah, thanks for testing.
One possible fix is attached. It has the advantage of removing the list
which needs to be kept updated, so it works immediately for repeating
M-z and M-:
--
Sean Whitton
[0001-lisp-repeat.el-repeat-Fix-repeating-complex-commands.patch (text/x-diff, attachment)]
Added tag(s) patch.
Request was from
Sean Whitton <spwhitton <at> spwhitton.name>
to
control <at> debbugs.gnu.org
.
(Thu, 04 Feb 2021 17:54:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46290
; Package
emacs
.
(Fri, 05 Feb 2021 09:08:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 46290 <at> debbugs.gnu.org (full text, mbox):
Sean Whitton <spwhitton <at> spwhitton.name> writes:
> One possible fix is attached. It has the advantage of removing the list
> which needs to be kept updated, so it works immediately for repeating
> M-z and M-:
Seems to work fine here for the test cases, so I've pushed it to Emacs 28.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Fri, 05 Feb 2021 09:08:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.1, send any further explanations to
46290 <at> debbugs.gnu.org and Sean Whitton <spwhitton <at> spwhitton.name>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Fri, 05 Feb 2021 09:08:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 05 Mar 2021 12:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 51 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.