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.

Full log


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))

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

Previous Next


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