GNU bug report logs - #45839
28.0.50; Isearch and transient mode wierd behaviour in info-mode!

Previous Next

Package: emacs;

Reported by: Utkarsh Singh <utkarsh190601 <at> gmail.com>

Date: Wed, 13 Jan 2021 12:27:01 UTC

Severity: normal

Tags: fixed

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 45839 <at> debbugs.gnu.org, Utkarsh Singh <utkarsh190601 <at> gmail.com>
Subject: bug#45839: 28.0.50; Isearch and transient mode wierd behaviour in info-mode!
Date: Thu, 14 Jan 2021 11:20:27 +0200
>> Please see in the function 'Info-search' that it intentionally
>> deactivates the active region during the search by calling:
>>
>>   (deactivate-mark)
>>
>> This is because when the search arrives in another Info node,
>> then region highlighting breaks - the region's beginning stays
>> in the previous node, while the region's end moves to the next node.
>> To avoid such situation, it deactivates the active region.
>
> FWIW, Info+ doesn't have this problem.  It deactivates
> the mark only when search moves to another node.

But this doesn't mean that info.el should not be fixed.
Here is the fix:

diff --git a/lisp/info.el b/lisp/info.el
index 62d7b583ff..dec93928b3 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1973,7 +1973,6 @@ Info-search
                        "Regexp search%s" (car Info-search-history)
 		       (if case-fold-search "" " case-sensitively"))
 		      nil 'Info-search-history)))
-  (deactivate-mark)
   (when (equal regexp "")
     (setq regexp (car Info-search-history)))
   (when regexp
@@ -2066,6 +2065,7 @@ Info-search
                (< found opoint-max))
           ;; Search landed in the same node
           (goto-char found)
+        (deactivate-mark)
         (widen)
         (goto-char found)
         (save-match-data (Info-select-node)))




This bug report was last modified 4 years and 131 days ago.

Previous Next


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