GNU bug report logs -
#66149
Mistyping a search breaks keyboard macro
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66149 in the body.
You can then email your comments to 66149 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#66149
; Package
emacs
.
(Fri, 22 Sep 2023 08:11:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 22 Sep 2023 08:11:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
If a user recorded a keyboard macro, upon replaying they expect the actions will be executed exactly as performed during recording.
Unfortunately that doesn't hold for searches, which is unfortunate, because search is very useful during keyboard-macros. If a user mistypes a search, they usually just remove the offending letters and it just works. However replaying such record fails with `Keyboard macro terminated by a command ringing the bell`
# Steps to reproduce
1. `emacs -Q`
2. Press `F3` to start recording a macro
3. Press `C-s` to start search and type `bufg`. The letter `g` will get highlighted in red because there's no such word
4. Press Backspace to remove `g` letter
5. Press `f` so the word is `buff`
6. Finish the macro by pressing `F4`
7. Execute the macro by pressing `F4`
## Expected
Search succeeds
## Actual
Search fails with `After 0 kbd macro iterations: isearch-search: Keyboard macro terminated by a command ringing the bell`
# Additional information
Emacs build from git as of commit 04710bd01b2
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66149
; Package
emacs
.
(Fri, 22 Sep 2023 11:30:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 66149 <at> debbugs.gnu.org (full text, mbox):
severity 66149 wishlist
thanks
> From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
> Date: Fri, 22 Sep 2023 11:09:59 +0300
>
> If a user recorded a keyboard macro, upon replaying they expect the actions will be executed exactly as performed during recording.
>
> Unfortunately that doesn't hold for searches, which is unfortunate, because search is very useful during keyboard-macros. If a user mistypes a search, they usually just remove the offending letters and it just works. However replaying such record fails with `Keyboard macro terminated by a command ringing the bell`
>
> # Steps to reproduce
>
> 1. `emacs -Q`
> 2. Press `F3` to start recording a macro
> 3. Press `C-s` to start search and type `bufg`. The letter `g` will get highlighted in red because there's no such word
> 4. Press Backspace to remove `g` letter
> 5. Press `f` so the word is `buff`
> 6. Finish the macro by pressing `F4`
> 7. Execute the macro by pressing `F4`
>
> ## Expected
>
> Search succeeds
>
> ## Actual
>
> Search fails with `After 0 kbd macro iterations: isearch-search: Keyboard macro terminated by a command ringing the bell`
IMNSHO, your expectations are unreasonable. Keyboard macros are not
supposed to allow this; if you want something like that, you will need
to write a special-purpose command.
I've changed the severity of the bug to "wishlist" in cases someone
thinks it is feasible to extend the macro facilities to support such
expectations. But my personal tendency is to close this bug as
notabug.
Severity set to 'wishlist' from 'normal'
Request was from
Eli Zaretskii <eliz <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Fri, 22 Sep 2023 11:30:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66149
; Package
emacs
.
(Fri, 22 Sep 2023 11:42:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 66149 <at> debbugs.gnu.org (full text, mbox):
On Fri, 2023-09-22 at 14:29 +0300, Eli Zaretskii wrote:
> severity 66149 wishlist
> thanks
>
> > From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
> > Date: Fri, 22 Sep 2023 11:09:59 +0300
> >
> > If a user recorded a keyboard macro, upon replaying they expect the
> > actions will be executed exactly as performed during recording.
> >
> > Unfortunately that doesn't hold for searches, which is unfortunate,
> > because search is very useful during keyboard-macros. If a user
> > mistypes a search, they usually just remove the offending letters
> > and it just works. However replaying such record fails with
> > `Keyboard macro terminated by a command ringing the bell`
> >
> > # Steps to reproduce
> >
> > 1. `emacs -Q`
> > 2. Press `F3` to start recording a macro
> > 3. Press `C-s` to start search and type `bufg`. The letter `g` will
> > get highlighted in red because there's no such word
> > 4. Press Backspace to remove `g` letter
> > 5. Press `f` so the word is `buff`
> > 6. Finish the macro by pressing `F4`
> > 7. Execute the macro by pressing `F4`
> >
> > ## Expected
> >
> > Search succeeds
> >
> > ## Actual
> >
> > Search fails with `After 0 kbd macro iterations: isearch-search:
> > Keyboard macro terminated by a command ringing the bell`
>
> IMNSHO, your expectations are unreasonable. Keyboard macros are not
> supposed to allow this; if you want something like that, you will
> need
> to write a special-purpose command.
Well, I'm not sure why you say it's unreasonable, but for the record,
the related emacs stackexchange question has 2k hits at the moment¹.
So… at least there is demand for this to work.
1: https://emacs.stackexchange.com/q/10599/2671#ringing-bell-in-macro-with-search
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66149
; Package
emacs
.
(Fri, 22 Sep 2023 16:04:03 GMT)
Full text and
rfc822 format available.
Message #16 received at 66149 <at> debbugs.gnu.org (full text, mbox):
>> Search fails with `After 0 kbd macro iterations: isearch-search:
>> Keyboard macro terminated by a command ringing the bell`
>
> IMNSHO, your expectations are unreasonable. Keyboard macros are not
> supposed to allow this; if you want something like that, you will need
> to write a special-purpose command.
>
> I've changed the severity of the bug to "wishlist" in cases someone
> thinks it is feasible to extend the macro facilities to support such
> expectations. But my personal tendency is to close this bug as
> notabug.
I have no opinion whether 'ding' should terminate kbd macro or not.
But it's possible to customize 'isearch-wrap-pause' to 'no-ding'
to not ding on isearch failure, then kbd macro is not terminated.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66149
; Package
emacs
.
(Sat, 23 Sep 2023 07:16:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 66149 <at> debbugs.gnu.org (full text, mbox):
On Fri, 2023-09-22 at 18:41 +0300, Juri Linkov wrote:
> >
> I have no opinion whether 'ding' should terminate kbd macro or not.
> But it's possible to customize 'isearch-wrap-pause' to 'no-ding'
> to not ding on isearch failure, then kbd macro is not terminated.
Oh, thank you! So for example, having the following code in the init
file works around the problem:
(defadvice kmacro-call-macro (around align-regexp-with-spaces activate)
(let ((isearch-wrap-pause 'no-ding))
ad-do-it))
I'll post an answer about that on the emacs.stackexchange then.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 23 Sep 2023 08:01:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
:
bug acknowledged by developer.
(Sat, 23 Sep 2023 08:01:02 GMT)
Full text and
rfc822 format available.
Message #24 received at 66149-done <at> debbugs.gnu.org (full text, mbox):
> From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
> Cc: 66149 <at> debbugs.gnu.org
> Date: Sat, 23 Sep 2023 10:14:59 +0300
>
> On Fri, 2023-09-22 at 18:41 +0300, Juri Linkov wrote:
> > >
> > I have no opinion whether 'ding' should terminate kbd macro or not.
> > But it's possible to customize 'isearch-wrap-pause' to 'no-ding'
> > to not ding on isearch failure, then kbd macro is not terminated.
>
> Oh, thank you! So for example, having the following code in the init
> file works around the problem:
>
> (defadvice kmacro-call-macro (around align-regexp-with-spaces activate)
> (let ((isearch-wrap-pause 'no-ding))
> ad-do-it))
>
> I'll post an answer about that on the emacs.stackexchange then.
And I'm closing the bug.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66149
; Package
emacs
.
(Sat, 23 Sep 2023 08:02:02 GMT)
Full text and
rfc822 format available.
Message #27 received at 66149-done <at> debbugs.gnu.org (full text, mbox):
On Sat, 2023-09-23 at 11:00 +0300, Eli Zaretskii wrote:
> > From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
> > Cc: 66149 <at> debbugs.gnu.org
> > Date: Sat, 23 Sep 2023 10:14:59 +0300
> >
> > On Fri, 2023-09-22 at 18:41 +0300, Juri Linkov wrote:
> > > >
> > > I have no opinion whether 'ding' should terminate kbd macro or
> > > not.
> > > But it's possible to customize 'isearch-wrap-pause' to 'no-ding'
> > > to not ding on isearch failure, then kbd macro is not terminated.
> >
> > Oh, thank you! So for example, having the following code in the
> > init
> > file works around the problem:
> >
> > (defadvice kmacro-call-macro (around align-regexp-with-spaces
> > activate)
> > (let ((isearch-wrap-pause 'no-ding))
> > ad-do-it))
> >
> > I'll post an answer about that on the emacs.stackexchange then.
>
> And I'm closing the bug.
Why? The problem is still relevant. A workaround is not a fix.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66149
; Package
emacs
.
(Sat, 23 Sep 2023 08:37:02 GMT)
Full text and
rfc822 format available.
Message #30 received at 66149 <at> debbugs.gnu.org (full text, mbox):
> From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
> Cc: juri <at> linkov.net, 66149-done <at> debbugs.gnu.org
> Date: Sat, 23 Sep 2023 11:01:32 +0300
>
> On Sat, 2023-09-23 at 11:00 +0300, Eli Zaretskii wrote:
> > > From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
> > > Cc: 66149 <at> debbugs.gnu.org
> > > Date: Sat, 23 Sep 2023 10:14:59 +0300
> > >
> > > On Fri, 2023-09-22 at 18:41 +0300, Juri Linkov wrote:
> > > > >
> > > > I have no opinion whether 'ding' should terminate kbd macro or
> > > > not.
> > > > But it's possible to customize 'isearch-wrap-pause' to 'no-ding'
> > > > to not ding on isearch failure, then kbd macro is not terminated.
> > >
> > > Oh, thank you! So for example, having the following code in the
> > > init
> > > file works around the problem:
> > >
> > > (defadvice kmacro-call-macro (around align-regexp-with-spaces
> > > activate)
> > > (let ((isearch-wrap-pause 'no-ding))
> > > ad-do-it))
> > >
> > > I'll post an answer about that on the emacs.stackexchange then.
> >
> > And I'm closing the bug.
>
> Why? The problem is still relevant. A workaround is not a fix.
because the motivation to make any such changes is now even lower than
it was before, and I don't want to keep bugs open when nothing is
being done for them, nor ever will be.
I'm okay with reopening for some limited time, but we should then say
in advance when it will be closed if no progress is made.
But maybe Stefan (CC'ed) thinks differently?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66149
; Package
emacs
.
(Sat, 23 Sep 2023 08:45:01 GMT)
Full text and
rfc822 format available.
Message #33 received at 66149 <at> debbugs.gnu.org (full text, mbox):
On Sat, 2023-09-23 at 11:36 +0300, Eli Zaretskii wrote:
> > From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
> > Cc: juri <at> linkov.net, 66149-done <at> debbugs.gnu.org
> > Date: Sat, 23 Sep 2023 11:01:32 +0300
> >
> > On Sat, 2023-09-23 at 11:00 +0300, Eli Zaretskii wrote:
> > > > From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
> > > > Cc: 66149 <at> debbugs.gnu.org
> > > > Date: Sat, 23 Sep 2023 10:14:59 +0300
> > > >
> > > > On Fri, 2023-09-22 at 18:41 +0300, Juri Linkov wrote:
> > > > > >
> > > > > I have no opinion whether 'ding' should terminate kbd macro
> > > > > or
> > > > > not.
> > > > > But it's possible to customize 'isearch-wrap-pause' to 'no-
> > > > > ding'
> > > > > to not ding on isearch failure, then kbd macro is not
> > > > > terminated.
> > > >
> > > > Oh, thank you! So for example, having the following code in the
> > > > init
> > > > file works around the problem:
> > > >
> > > > (defadvice kmacro-call-macro (around align-regexp-with-
> > > > spaces
> > > > activate)
> > > > (let ((isearch-wrap-pause 'no-ding))
> > > > ad-do-it))
> > > >
> > > > I'll post an answer about that on the emacs.stackexchange then.
> > >
> > > And I'm closing the bug.
> >
> > Why? The problem is still relevant. A workaround is not a fix.
>
> because the motivation to make any such changes is now even lower
> than
> it was before, and I don't want to keep bugs open when nothing is
> being done for them, nor ever will be.
Oh, okay, so, a fix for this closed bug will still be accepted? I was
thinking of making a fix at some point in the future. Not right now I
as I don't have resources ATM, but the problem overall seems to be easy
to fix.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66149
; Package
emacs
.
(Sat, 23 Sep 2023 08:59:02 GMT)
Full text and
rfc822 format available.
Message #36 received at 66149 <at> debbugs.gnu.org (full text, mbox):
> From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
> Cc: juri <at> linkov.net, 66149 <at> debbugs.gnu.org
> Date: Sat, 23 Sep 2023 11:43:56 +0300
>
> On Sat, 2023-09-23 at 11:36 +0300, Eli Zaretskii wrote:
> > > From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
> > > Cc: juri <at> linkov.net, 66149-done <at> debbugs.gnu.org
> > > Date: Sat, 23 Sep 2023 11:01:32 +0300
> > >
> > > On Sat, 2023-09-23 at 11:00 +0300, Eli Zaretskii wrote:
> > > > > From: Konstantin Kharlamov <Hi-Angel <at> yandex.ru>
> > > > > Cc: 66149 <at> debbugs.gnu.org
> > > > > Date: Sat, 23 Sep 2023 10:14:59 +0300
> > > > >
> > > > > On Fri, 2023-09-22 at 18:41 +0300, Juri Linkov wrote:
> > > > > > >
> > > > > > I have no opinion whether 'ding' should terminate kbd macro
> > > > > > or
> > > > > > not.
> > > > > > But it's possible to customize 'isearch-wrap-pause' to 'no-
> > > > > > ding'
> > > > > > to not ding on isearch failure, then kbd macro is not
> > > > > > terminated.
> > > > >
> > > > > Oh, thank you! So for example, having the following code in the
> > > > > init
> > > > > file works around the problem:
> > > > >
> > > > > (defadvice kmacro-call-macro (around align-regexp-with-
> > > > > spaces
> > > > > activate)
> > > > > (let ((isearch-wrap-pause 'no-ding))
> > > > > ad-do-it))
> > > > >
> > > > > I'll post an answer about that on the emacs.stackexchange then.
> > > >
> > > > And I'm closing the bug.
> > >
> > > Why? The problem is still relevant. A workaround is not a fix.
> >
> > because the motivation to make any such changes is now even lower
> > than
> > it was before, and I don't want to keep bugs open when nothing is
> > being done for them, nor ever will be.
>
> Oh, okay, so, a fix for this closed bug will still be accepted?
We accept worthy improvements even if there's no bug at all for them,
so yes, of course. The important thing is that the change is clean
and doesn't bring any problems with it.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#66149
; Package
emacs
.
(Sat, 23 Sep 2023 12:57:01 GMT)
Full text and
rfc822 format available.
Message #39 received at 66149 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> I'm okay with reopening for some limited time, but we should then say
> in advance when it will be closed if no progress is made.
>
> But maybe Stefan (CC'ed) thinks differently?
No, I agree with you. Keeping bugs open when there's no expected
progress typically leads to us forgetting about it, and then one of us
have to come back to close it later anyways.
I think it makes sense to revisit this if/when someone comes up with a
patch, either by reopening this bug, or in a new bug report.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 22 Oct 2023 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 240 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.