From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#68158: isearch-wrap-pause 'no or 'no-ding breaks isearch-delete-char Date: Thu, 04 Jan 2024 19:02:52 +0200 Organization: LINKOV.NET Message-ID: <86wmspnngh.fsf@mail.linkov.net> References: <87sf3jmgo6.fsf@breatheoutbreathe.in> <831qaxxsk8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5163"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 68158@debbugs.gnu.org, Joseph Turner To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 04 18:14:18 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rLRIQ-0001FN-6P for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Jan 2024 18:14:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLRI9-0002B0-MR; Thu, 04 Jan 2024 12:14:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rLRI8-0002AC-Dt for bug-gnu-emacs@gnu.org; Thu, 04 Jan 2024 12:14:00 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLRI6-0004gI-Vd for bug-gnu-emacs@gnu.org; Thu, 04 Jan 2024 12:14:00 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rLRIA-0000Ft-Ly for bug-gnu-emacs@gnu.org; Thu, 04 Jan 2024 12:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Jan 2024 17:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68158 X-GNU-PR-Package: emacs Original-Received: via spool by 68158-submit@debbugs.gnu.org id=B68158.1704388391883 (code B ref 68158); Thu, 04 Jan 2024 17:14:02 +0000 Original-Received: (at 68158) by debbugs.gnu.org; 4 Jan 2024 17:13:11 +0000 Original-Received: from localhost ([127.0.0.1]:55580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLRHK-0000EB-QH for submit@debbugs.gnu.org; Thu, 04 Jan 2024 12:13:11 -0500 Original-Received: from relay2-d.mail.gandi.net ([2001:4b98:dc4:8::222]:51555) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLRHH-0000Da-0e for 68158@debbugs.gnu.org; Thu, 04 Jan 2024 12:13:09 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 4559840009; Thu, 4 Jan 2024 17:12:54 +0000 (UTC) In-Reply-To: <831qaxxsk8.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 04 Jan 2024 13:10:31 +0200") X-GND-Sasl: juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277319 Archived-At: --=-=-= Content-Type: text/plain >> (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. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=isearch-wrap-pause-no-ding.patch 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)) --=-=-=--