GNU bug report logs - #68158
isearch-wrap-pause 'no or 'no-ding breaks isearch-delete-char

Previous Next

Package: emacs;

Reported by: Joseph Turner <joseph <at> breatheoutbreathe.in>

Date: Sat, 30 Dec 2023 23:10:02 UTC

Severity: normal

Fixed in version 29.1.90

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 68158 in the body.
You can then email your comments to 68158 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#68158; Package emacs. (Sat, 30 Dec 2023 23:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Joseph Turner <joseph <at> breatheoutbreathe.in>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 30 Dec 2023 23:10:02 GMT) Full text and rfc822 format available.

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

From: Joseph Turner <joseph <at> breatheoutbreathe.in>
To: Emacs Bugs Mailing List <bug-gnu-emacs <at> gnu.org>
Subject: isearch-wrap-pause 'no or 'no-ding breaks isearch-delete-char
Date: Sat, 30 Dec 2023 14:56:13 -0800
With emacs -Q, in the buffer which pops open after...

(progn
  (setopt isearch-wrap-pause 'no)
  ;; (setopt isearch-wrap-pause 'no-ding)  ; this causes the same problem
  (with-current-buffer (generate-new-buffer "isearch-wrap-pause-test")
    (insert "bar")
    (goto-char (point-min))
    (pop-to-buffer (current-buffer))))

...run isearch for "baz" with...

C-s b a z

...then attempt to delete the non-matching "z" character with DEL.

Expected contents of minibuffer:

"Isearch: ba"

Actual contents of minibuffer:

"Failing overwrapped I-search: baz"

Pressing DEL a second time actually deletes the "z".

Thanks for your help!!

Joseph

GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37,
cairo version 1.16.0)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68158; Package emacs. (Thu, 04 Jan 2024 11:12:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Joseph Turner <joseph <at> breatheoutbreathe.in>, Juri Linkov <juri <at> linkov.net>
Cc: 68158 <at> debbugs.gnu.org
Subject: Re: bug#68158: isearch-wrap-pause 'no or 'no-ding breaks
 isearch-delete-char
Date: Thu, 04 Jan 2024 13:10:31 +0200
> Date: Sat, 30 Dec 2023 14:56:13 -0800
> From:  Joseph Turner via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> With emacs -Q, in the buffer which pops open after...
> 
> (progn
>   (setopt isearch-wrap-pause 'no)
>   ;; (setopt isearch-wrap-pause 'no-ding)  ; this causes the same problem
>   (with-current-buffer (generate-new-buffer "isearch-wrap-pause-test")
>     (insert "bar")
>     (goto-char (point-min))
>     (pop-to-buffer (current-buffer))))
> 
> ...run isearch for "baz" with...
> 
> C-s b a z
> 
> ...then attempt to delete the non-matching "z" character with DEL.
> 
> Expected contents of minibuffer:
> 
> "Isearch: ba"
> 
> Actual contents of minibuffer:
> 
> "Failing overwrapped I-search: baz"
> 
> Pressing DEL a second time actually deletes the "z".
> 
> Thanks for your help!!
> 
> Joseph
> 
> GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37,
> cairo version 1.16.0)

Juri, could you please look into this?  It seems to be a regression in
Emacs 29.1 due to your changes in commit 7320a812e, to solve
bug#56535.  I guess we need to distinguish between self-inserting
characters and DEL?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68158; Package emacs. (Thu, 04 Jan 2024 17:14:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 68158 <at> debbugs.gnu.org, Joseph Turner <joseph <at> breatheoutbreathe.in>
Subject: Re: bug#68158: isearch-wrap-pause 'no or 'no-ding breaks
 isearch-delete-char
Date: Thu, 04 Jan 2024 19:02:52 +0200
[Message part 1 (text/plain, inline)]
>> (progn
>>   (setopt isearch-wrap-pause 'no)
>>   ;; (setopt isearch-wrap-pause 'no-ding)  ; this causes the same problem
>>   (with-current-buffer (generate-new-buffer "isearch-wrap-pause-test")
>>     (insert "bar")
>>     (goto-char (point-min))
>>     (pop-to-buffer (current-buffer))))
>>
>> ...run isearch for "baz" with...
>>
>> C-s b a z
>>
>> ...then attempt to delete the non-matching "z" character with DEL.
>>
>> GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37,
>> cairo version 1.16.0)
>
> Juri, could you please look into this?  It seems to be a regression in
> Emacs 29.1 due to your changes in commit 7320a812e, to solve
> bug#56535.  I guess we need to distinguish between self-inserting
> characters and DEL?

This means that we need to preclude 'isearch-push-state' in 'isearch-repeat'
from updating 'isearch-cmds'.

Should I push this patch to the emacs-29 branch?  It looks safe.

[isearch-wrap-pause-no-ding.patch (text/x-diff, inline)]
diff --git a/lisp/isearch.el b/lisp/isearch.el
index ee5660309df..f753a5377ca 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2844,7 +2844,8 @@ isearch-search-and-update
       (isearch-search)
       (when (and (memq isearch-wrap-pause '(no no-ding))
                  (not isearch-success))
-        (isearch-repeat (if isearch-forward 'forward 'backward)))))
+        (let ((isearch-cmds isearch-cmds))
+          (isearch-repeat (if isearch-forward 'forward 'backward))))))
   (isearch-push-state)
   (if isearch-op-fun (funcall isearch-op-fun))
   (isearch-update))

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68158; Package emacs. (Thu, 04 Jan 2024 17:51:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 68158 <at> debbugs.gnu.org, joseph <at> breatheoutbreathe.in
Subject: Re: bug#68158: isearch-wrap-pause 'no or 'no-ding breaks
 isearch-delete-char
Date: Thu, 04 Jan 2024 19:49:42 +0200
> From: Juri Linkov <juri <at> linkov.net>
> Cc: Joseph Turner <joseph <at> breatheoutbreathe.in>,  68158 <at> debbugs.gnu.org
> Date: Thu, 04 Jan 2024 19:02:52 +0200
> 
> >> C-s b a z
> >>
> >> ...then attempt to delete the non-matching "z" character with DEL.
> >>
> >> GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37,
> >> cairo version 1.16.0)
> >
> > Juri, could you please look into this?  It seems to be a regression in
> > Emacs 29.1 due to your changes in commit 7320a812e, to solve
> > bug#56535.  I guess we need to distinguish between self-inserting
> > characters and DEL?
> 
> This means that we need to preclude 'isearch-push-state' in 'isearch-repeat'
> from updating 'isearch-cmds'.
> 
> Should I push this patch to the emacs-29 branch?  It looks safe.

Yes, please.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68158; Package emacs. (Thu, 04 Jan 2024 19:00:02 GMT) Full text and rfc822 format available.

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

From: Joseph Turner <joseph <at> breatheoutbreathe.in>
To: Juri Linkov <juri <at> linkov.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 68158 <at> debbugs.gnu.org
Subject: Re: bug#68158: isearch-wrap-pause 'no or 'no-ding breaks
 isearch-delete-char
Date: Thu, 04 Jan 2024 10:58:09 -0800
Juri Linkov <juri <at> linkov.net> writes:

[...]

> This means that we need to preclude 'isearch-push-state' in 'isearch-repeat'
> from updating 'isearch-cmds'.
>
> Should I push this patch to the emacs-29 branch?  It looks safe.

Thank you!  This solves the problem on my machine.

Joseph





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68158; Package emacs. (Fri, 05 Jan 2024 07:45:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 68158 <at> debbugs.gnu.org, joseph <at> breatheoutbreathe.in
Subject: Re: bug#68158: isearch-wrap-pause 'no or 'no-ding breaks
 isearch-delete-char
Date: Fri, 05 Jan 2024 09:41:21 +0200
>> >> C-s b a z
>> >>
>> >> ...then attempt to delete the non-matching "z" character with DEL.
>> >>
>> >> GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37,
>> >> cairo version 1.16.0)
>> >
>> > Juri, could you please look into this?  It seems to be a regression in
>> > Emacs 29.1 due to your changes in commit 7320a812e, to solve
>> > bug#56535.  I guess we need to distinguish between self-inserting
>> > characters and DEL?
>> 
>> This means that we need to preclude 'isearch-push-state' in 'isearch-repeat'
>> from updating 'isearch-cmds'.
>> 
>> Should I push this patch to the emacs-29 branch?  It looks safe.
>
> Yes, please.

So now pushed to emacs-29.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#68158; Package emacs. (Fri, 05 Jan 2024 07:45:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Joseph Turner <joseph <at> breatheoutbreathe.in>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 68158 <at> debbugs.gnu.org
Subject: Re: bug#68158: isearch-wrap-pause 'no or 'no-ding breaks
 isearch-delete-char
Date: Fri, 05 Jan 2024 09:42:31 +0200
close 68158 29.1.90
thanks

>> This means that we need to preclude 'isearch-push-state' in 'isearch-repeat'
>> from updating 'isearch-cmds'.
>>
>> Should I push this patch to the emacs-29 branch?  It looks safe.
>
> Thank you!  This solves the problem on my machine.

Thanks for confirming and for the bug report.  So now closing it.




bug marked as fixed in version 29.1.90, send any further explanations to 68158 <at> debbugs.gnu.org and Joseph Turner <joseph <at> breatheoutbreathe.in> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Fri, 05 Jan 2024 07:45: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, 02 Feb 2024 12:24:16 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 194 days ago.

Previous Next


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