GNU bug report logs - #52248
Open hidden overlays in isearch-delete-char

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Thu, 2 Dec 2021 20:00:02 UTC

Severity: normal

Tags: patch

Fixed in version 29.0.50

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 52248 in the body.
You can then email your comments to 52248 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#52248; Package emacs. (Thu, 02 Dec 2021 20:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> linkov.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 02 Dec 2021 20:00:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: Open hidden overlays in isearch-delete-char
Date: Thu, 02 Dec 2021 21:56:02 +0200
Tags: patch

This is not a regression.

While navigating forward with C-s in a buffer with invisible overlays
such as when using outline-minor-mode with hidden outlines,
it opens hidden overlays on the current match, and hides again
when going to the next match.

But going back with DEL (isearch-delete-char) doesn't reopen
the hidden overlay on the previous match.  Here is the fix:

diff --git a/lisp/isearch.el b/lisp/isearch.el
index fcb7d646c6..8421c5629b 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2504,6 +2552,10 @@ isearch-delete-char
   (if (null (cdr isearch-cmds))
       (ding)
     (isearch-pop-state))
+  ;; When going back to the hidden match, reopen it.
+  (when (and (eq search-invisible 'open) isearch-hide-immediately isearch-other-end)
+    (isearch-range-invisible (min (point) isearch-other-end)
+                             (max (point) isearch-other-end)))
   (isearch-update))
 
 (defun isearch-del-char (&optional arg)
-- 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52248; Package emacs. (Fri, 03 Dec 2021 17:14:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: 52248 <at> debbugs.gnu.org
Subject: Re: bug#52248: Open hidden overlays in isearch-delete-char
Date: Fri, 03 Dec 2021 18:13:43 +0100
Juri Linkov <juri <at> linkov.net> writes:

> But going back with DEL (isearch-delete-char) doesn't reopen
> the hidden overlay on the previous match.  Here is the fix:

I haven't tested the patch, but it makes sense to me.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52248; Package emacs. (Sat, 04 Dec 2021 20:11:01 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 52248 <at> debbugs.gnu.org
Subject: Re: bug#52248: Open hidden overlays in isearch-delete-char
Date: Sat, 04 Dec 2021 22:05:16 +0200
close 52248 29.0.50
quit

>> But going back with DEL (isearch-delete-char) doesn't reopen
>> the hidden overlay on the previous match.  Here is the fix:
>
> I haven't tested the patch, but it makes sense to me.

So pushed to master.




bug marked as fixed in version 29.0.50, send any further explanations to 52248 <at> debbugs.gnu.org and Juri Linkov <juri <at> linkov.net> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Sat, 04 Dec 2021 20:11: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. (Sun, 02 Jan 2022 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 76 days ago.

Previous Next


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