From: Juri Linkov <juri@linkov.net>
To: Drew Adams <drew.adams@oracle.com>
Cc: 45839@debbugs.gnu.org, Utkarsh Singh <utkarsh190601@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 [thread overview]
Message-ID: <87v9bz3l0c.fsf@mail.linkov.net> (raw)
In-Reply-To: <accbedc6-63ce-4e8d-a788-6fdf443ba1dd@default> (Drew Adams's message of "Wed, 13 Jan 2021 11:20:34 -0800 (PST)")
>> 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)))
next prev parent reply other threads:[~2021-01-14 9:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-13 11:50 bug#45839: 28.0.50; Isearch and transient mode wierd behaviour in info-mode! Utkarsh Singh
2021-01-13 18:06 ` Juri Linkov
2021-01-13 19:20 ` Drew Adams
2021-01-13 19:24 ` Drew Adams
2021-01-14 9:20 ` Juri Linkov [this message]
[not found] ` <87mtxby5t9.fsf@gmail.com>
2021-01-14 19:09 ` 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=87v9bz3l0c.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=45839@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
--cc=utkarsh190601@gmail.com \
/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).