unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 68158@debbugs.gnu.org, Joseph Turner <joseph@breatheoutbreathe.in>
Subject: bug#68158: isearch-wrap-pause 'no or 'no-ding breaks isearch-delete-char
Date: Thu, 04 Jan 2024 19:02:52 +0200	[thread overview]
Message-ID: <86wmspnngh.fsf@mail.linkov.net> (raw)
In-Reply-To: <831qaxxsk8.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 04 Jan 2024 13:10:31 +0200")

[-- Attachment #1: Type: text/plain, Size: 923 bytes --]

>> (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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: isearch-wrap-pause-no-ding.patch --]
[-- Type: text/x-diff, Size: 578 bytes --]

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

  reply	other threads:[~2024-01-04 17:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-30 22:56 bug#68158: isearch-wrap-pause 'no or 'no-ding breaks isearch-delete-char Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-04 11:10 ` Eli Zaretskii
2024-01-04 17:02   ` Juri Linkov [this message]
2024-01-04 17:49     ` Eli Zaretskii
2024-01-05  7:41       ` Juri Linkov
2024-01-04 18:58     ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-05  7:42       ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86wmspnngh.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=68158@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=joseph@breatheoutbreathe.in \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).