GNU bug report logs -
#48472
[FR] A small suggestion for repeat-mode
Previous Next
Reported by: Gustavo Barros <gusbrs.2016 <at> gmail.com>
Date: Sun, 16 May 2021 20:07:01 UTC
Severity: wishlist
Tags: fixed
Fixed in version 28.0.50
Done: Juri Linkov <juri <at> linkov.net>
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 48472 in the body.
You can then email your comments to 48472 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#48472
; Package
emacs
.
(Sun, 16 May 2021 20:07:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Gustavo Barros <gusbrs.2016 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 16 May 2021 20:07:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi All,
I've just taken notice of the recently introduced `repeat-mode', in
`repeat.el', and welcome it.
I haven't yet tried it out, since I'm running on 27.2, but I understand
what it does, and how. I'll definitely use it when Emacs 28 comes,
since I have some commands for which I use current `repeat.el'
functionality to do something equivalent in my setup, and the new mode
makes this much more convenient, so thank you (Juri) for adding it.
But I write to give one small suggestion to the mode. Namely that an
option be added to make the transient keymap expire after a
(configurable) timeout. The idea is that the repeating last key press
is very handy indeed, but if you happen to stop at a repeatable key,
stop some "idle" time (thinking, reading, whatever) and then hit the key
again, it might not be what was actually meant. In other words, besides
`repeat-exit-key', some idle time after the last repeatable key may
serve as a good indicator for breaking the repetition chain.
As far as I can see, this should not be particularly complicated, since
`set-transient-map' returns an "exit function" which could be stored and
ran on a timer, as appropriate. And, of course, it can be optional.
Thanks again for the useful addition. I'm looking forward to using it
already.
Best regards,
Gustavo.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#48472
; Package
emacs
.
(Mon, 17 May 2021 22:31:03 GMT)
Full text and
rfc822 format available.
Message #8 received at 48472 <at> debbugs.gnu.org (full text, mbox):
> I've just taken notice of the recently introduced `repeat-mode', in
> `repeat.el', and welcome it.
>
> I haven't yet tried it out, since I'm running on 27.2, but I understand
> what it does, and how. I'll definitely use it when Emacs 28 comes, since
> I have some commands for which I use current `repeat.el' functionality to
> do something equivalent in my setup, and the new mode makes this much more
> convenient, so thank you (Juri) for adding it.
>
> But I write to give one small suggestion to the mode. Namely that an
> option be added to make the transient keymap expire after a (configurable)
> timeout. The idea is that the repeating last key press is very handy
> indeed, but if you happen to stop at a repeatable key, stop some "idle"
> time (thinking, reading, whatever) and then hit the key again, it might not
> be what was actually meant. In other words, besides `repeat-exit-key',
> some idle time after the last repeatable key may serve as a good indicator
> for breaking the repetition chain.
Thanks for the suggestion, this is a very good idea.
> As far as I can see, this should not be particularly complicated, since
> `set-transient-map' returns an "exit function" which could be stored and
> ran on a timer, as appropriate.
An "exit function" returned by `set-transient-map' is a clever thing,
without such returned function it would be more complicated to implement.
I quickly tried it out, and it works indeed.
> And, of course, it can be optional.
A new user option could be named `repeat-exit-timeout'.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#48472
; Package
emacs
.
(Tue, 18 May 2021 11:15:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 48472 <at> debbugs.gnu.org (full text, mbox):
Hi Juri,
On Mon, 17 May 2021 at 18:24, Juri Linkov <juri <at> linkov.net> wrote:
>> But I write to give one small suggestion to the mode. Namely that an
>> option be added to make the transient keymap expire after a
>> (configurable)
>> timeout. The idea is that the repeating last key press is very handy
>> indeed, but if you happen to stop at a repeatable key, stop some
>> "idle"
>> time (thinking, reading, whatever) and then hit the key again, it
>> might not
>> be what was actually meant. In other words, besides
>> `repeat-exit-key',
>> some idle time after the last repeatable key may serve as a good
>> indicator
>> for breaking the repetition chain.
>
> Thanks for the suggestion, this is a very good idea.
>
I'm glad you liked it. And thanks for answering.
>
> An "exit function" returned by `set-transient-map' is a clever thing,
> without such returned function it would be more complicated to
> implement.
> I quickly tried it out, and it works indeed.
>
We have to thank whoever put it there. And it seems to be there out of
design and foresight. As far as my grepping went (not that thorough), I
didn't find an instance of usage of this return value in Emacs' code
base as of yet.
>
> A new user option could be named `repeat-exit-timeout'.
>
Sounds good to me. And, I'm not sure I should be reading between the
lines of your answer, but I could not avoid it, so I'll be forthcoming.
I've gone as far as I'm allowed to. I'd be happy to offer a patch, but
no papers...
Best,
Gustavo.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#48472
; Package
emacs
.
(Tue, 18 May 2021 21:06:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 48472 <at> debbugs.gnu.org (full text, mbox):
tags 48472 fixed
close 48472 28.0.50
thanks
Hi Gustavo,
>> An "exit function" returned by `set-transient-map' is a clever thing,
>> without such returned function it would be more complicated to implement.
>> I quickly tried it out, and it works indeed.
>
> We have to thank whoever put it there. And it seems to be there out of
> design and foresight. As far as my grepping went (not that thorough),
> I didn't find an instance of usage of this return value in Emacs' code base
> as of yet.
It's amazing that the function returns exactly what we need
even though its return value is not yet used anywhere.
So I copied the same design to another similar function
display-buffer-override-next-command to return exitfun as well.
>> A new user option could be named `repeat-exit-timeout'.
>>
>
> Sounds good to me. And, I'm not sure I should be reading between the lines
> of your answer, but I could not avoid it, so I'll be forthcoming. I've gone
> as far as I'm allowed to. I'd be happy to offer a patch, but no papers...
You are welcome to sign papers, so the next time you could offer a patch.
Now I pushed the implementation based on your suggestion, thanks for it!
(The implementation also includes a lot of small details like correctly
handling the messages, etc.)
If you are running on 27.2, you could still take the second part
of repeat.el from Emacs 28.
Added tag(s) fixed.
Request was from
Juri Linkov <juri <at> linkov.net>
to
control <at> debbugs.gnu.org
.
(Tue, 18 May 2021 21:06:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.0.50, send any further explanations to
48472 <at> debbugs.gnu.org and Gustavo Barros <gusbrs.2016 <at> gmail.com>
Request was from
Juri Linkov <juri <at> linkov.net>
to
control <at> debbugs.gnu.org
.
(Tue, 18 May 2021 21:06:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#48472
; Package
emacs
.
(Tue, 18 May 2021 22:10:01 GMT)
Full text and
rfc822 format available.
Message #21 received at 48472 <at> debbugs.gnu.org (full text, mbox):
Hi Juri,
On Tue, 18 May 2021 at 18:04, Juri Linkov <juri <at> linkov.net> wrote:
> It's amazing that the function returns exactly what we need
> even though its return value is not yet used anywhere.
> So I copied the same design to another similar function
> display-buffer-override-next-command to return exitfun as well.
Indeed it is pretty cool, nice that it has fulfilled its purpose and
even "reproduced".
> You are welcome to sign papers, so the next time you could offer a
> patch.
Well, I'd love to, and have tried to, but it turns out I can't sign
them.
> Now I pushed the implementation based on your suggestion, thanks for
> it!
>
> (The implementation also includes a lot of small details like
> correctly
> handling the messages, etc.)
I thank you!
And I had assumed the timer would have to be stored and canceled at
every repeat, and also that somehow the message would have to be cleared
when the exit function timer ran. I see you handled all that. Looks
good to me.
> If you are running on 27.2, you could still take the second part
> of repeat.el from Emacs 28.
I might! :-)
But if you push me to you it, you run the risk of getting yet other
"small suggestions".
Thanks again!
Gustavo.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 16 Jun 2021 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 363 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.