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#45839: 28.0.50; Isearch and transient mode wierd behaviour in info-mode! Date: Thu, 14 Jan 2021 11:20:27 +0200 Organization: LINKOV.NET Message-ID: <87v9bz3l0c.fsf@mail.linkov.net> References: <874kjljbsc.fsf@gmail.com> <871reokawq.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35076"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 45839@debbugs.gnu.org, Utkarsh Singh To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 14 10:53:56 2021 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 1kzzKF-0008z4-Cl for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jan 2021 10:53:55 +0100 Original-Received: from localhost ([::1]:60374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kzzKE-0007QV-Fv for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jan 2021 04:53:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kzzIQ-0005bS-R7 for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 04:52:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53924) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kzzIQ-00030q-JF for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 04:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kzzIQ-0008OM-GO for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 04:52: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, 14 Jan 2021 09:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45839 X-GNU-PR-Package: emacs Original-Received: via spool by 45839-submit@debbugs.gnu.org id=B45839.161061788632214 (code B ref 45839); Thu, 14 Jan 2021 09:52:02 +0000 Original-Received: (at 45839) by debbugs.gnu.org; 14 Jan 2021 09:51:26 +0000 Original-Received: from localhost ([127.0.0.1]:37237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzzHp-0008NV-Sn for submit@debbugs.gnu.org; Thu, 14 Jan 2021 04:51:26 -0500 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:57777) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kzzHn-0008NH-6c for 45839@debbugs.gnu.org; Thu, 14 Jan 2021 04:51:24 -0500 X-Originating-IP: 91.129.98.64 Original-Received: from mail.gandi.net (m91-129-98-64.cust.tele2.ee [91.129.98.64]) (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 552D42400FE; Thu, 14 Jan 2021 09:51:14 +0000 (UTC) In-Reply-To: (Drew Adams's message of "Wed, 13 Jan 2021 11:20:34 -0800 (PST)") 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" Xref: news.gmane.io gmane.emacs.bugs:197938 Archived-At: >> 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)))