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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 45839 in the body.
You can then email your comments to 45839 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#45839; Package emacs. (Wed, 13 Jan 2021 12:27:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Utkarsh Singh <utkarsh190601 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 13 Jan 2021 12:27:01 GMT) Full text and rfc822 format available.

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

From: Utkarsh Singh <utkarsh190601 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; Isearch and transient mode wierd behaviour in info-mode!
Date: Wed, 13 Jan 2021 17:20:43 +0530
In info-mode do the following:
+ C-SPC :: set mark
+ C-s valid_query :: search for some string
+ RET

By now you can see region is not highlighted and this will affect all
other command such as M-w(kill-ring-save).

In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.17.4)
 of 2021-01-11 built on archlinux
Repository revision: 8810e1789cce8cb9f2e463fc305c0b6ff12580ba
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12099001
System Description: Arch Linux

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON
PDUMPER LCMS2

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_IN.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Info

Minor modes in effect:
  semantic-minor-modes-format: ((:eval (if (or semantic-highlight-edits-mode semantic-show-unmatched-syntax-mode)  S)))
  icomplete-vertical-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  company-tng-mode: t
  save-place-mode: t
  pdf-occur-global-minor-mode: t
  winner-mode: t
  icomplete-mode: t
  fido-mode: t
  amx-mode: t
  minions-mode: t
  global-auto-revert-mode: t
  delete-selection-mode: t
  recentf-mode: t
  show-paren-mode: t
  electric-pair-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/utkarsh/.config/emacs/elpa/icomplete-vertical-20210105.500/icomplete-vertical hides /tmp/icomplete-vertical-0R2C0p/icomplete-vertical-20210105.500/icomplete-vertical
/home/utkarsh/.config/emacs/elpa/icomplete-vertical-20210105.500/icomplete-vertical-pkg hides /tmp/icomplete-vertical-0R2C0p/icomplete-vertical-20210105.500/icomplete-vertical-pkg
/home/utkarsh/.config/emacs/elpa/icomplete-vertical-20210105.500/icomplete-vertical-autoloads hides /tmp/icomplete-vertical-0R2C0p/icomplete-vertical-20210105.500/icomplete-vertical-autoloads

Features:
(shadow mail-extr emacsbug timezone dabbrev korea-util org-element
ol-eww eww xdg mm-url ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect
gnus-search gnus-art mm-uu mml2015 gnus-sum gnus-group gnus-undo
gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7
netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win ol-docview
doc-view ol-bibtex bibtex iso8601 ol-bbdb ol-w3m eieio-opt speedbar
ezimage dframe shortdoc mule-util cl-print ido vc-git
modus-operandi-theme help-fns icomplete-vertical autoload radix-tree
lisp-mnt tar-mode arc-mode archive-mode mm-archive gnutls network-stream
url-http url-gw nsm url-cache url-auth epa-file password-store
auth-source-pass with-editor async-bytecomp async shell minibuf-eldef
two-column misearch multi-isearch flyspell ispell company-oddmuse
company-keywords company-etags etags fileloop xref project company-gtags
company-dabbrev-code company-dabbrev company-files company-clang
company-capf company-cmake company-semantic company-template
company-bbdb company-tng company pcase flycheck rx dash server
modus-vivendi-theme modus-themes gnus nnheader emms-librefm-stream
emms-librefm-scrobbler emms-playlist-limit emms-volume
emms-volume-mixerctl emms-volume-pulse emms-volume-amixer emms-i18n
emms-history emms-score emms-stream-info emms-metaplaylist-mode
emms-bookmarks emms-cue emms-mode-line-icon emms-browser sort
emms-playlist-sort emms-last-played emms-player-xine emms-player-mpd
emms-playing-time emms-lyrics emms-url emms-streams emms-show-all
emms-tag-editor emms-mark emms-mode-line emms-cache emms-info-exiftool
emms-info-tinytag emms-info-metaflac emms-info-opusinfo
emms-info-ogginfo emms-info-mp3info emms-info emms-later-do
emms-playlist-mode emms-player-vlc emms-player-mpv emms-player-mplayer
emms-player-simple emms-source-playlist emms-source-file locate
emms-setup emms emms-compat notmuch hl-line notmuch-tree notmuch-jump
notmuch-hello notmuch-show notmuch-print notmuch-crypto notmuch-mua
notmuch-message notmuch-draft notmuch-maildir-fcc notmuch-address
notmuch-company notmuch-parser notmuch-wash diff-mode coolj
notmuch-query goto-addr icalendar diary-lib diary-loaddefs notmuch-tag
crm notmuch-lib notmuch-version notmuch-compat mm-view mml-smime smime
dig smtpmail sendmail sdcv pos-tip popup showtip esh-module esh-groups
esh-util elfeed-show elfeed-search message rmc rfc822 mml mml-sec epa
derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader shr
kinsoku puny svg dom elfeed-csv elfeed elfeed-curl elfeed-log elfeed-db
elfeed-lib thingatpt avl-tree generator url-queue xml-query xml
saveplace-pdf-view saveplace pdf-occur ibuf-ext ibuffer ibuffer-loaddefs
tablist tablist-filter semantic/wisent/comp semantic/wisent
semantic/wisent/wisent semantic/util-modes semantic/util semantic
semantic/tag semantic/lex semantic/fw mode-local cedet pdf-isearch
let-alist pdf-misc imenu pdf-tools compile cus-edit cus-start cus-load
pdf-view bookmark text-property-search pp jka-compr pdf-cache pdf-info
tq pdf-util image-mode exif try winner icomplete amx s minions
autorevert filenotify org ob ob-tangle ob-ref ob-lob ob-table ob-exp
org-macro org-footnote org-src ob-comint org-pcomplete pcomplete comint
ansi-color ring org-list org-faces org-entities time-date noutline
outline org-version ob-emacs-lisp ob-core ob-eval org-table ol org-keys
org-compat advice org-macs org-loaddefs format-spec find-func cal-menu
calendar cal-loaddefs dired-aux dired dired-loaddefs delsel recentf
tree-widget wid-edit paren elec-pair edmacro kmacro cl-extra help-mode
use-package use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core finder-inf
info package easymenu browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util mailcap
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x map url-vars seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button
loaddefs faces cus-face macroexp files window text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 679723 52515)
 (symbols 48 43644 5)
 (strings 32 192833 7458)
 (string-bytes 1 5816298)
 (vectors 16 68758)
 (vector-slots 8 1171046 137243)
 (floats 8 798 2574)
 (intervals 56 13094 1049)
 (buffers 984 25))

-- 
Utkarsh Singh




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45839; Package emacs. (Wed, 13 Jan 2021 18:09:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Utkarsh Singh <utkarsh190601 <at> gmail.com>
Cc: 45839 <at> debbugs.gnu.org
Subject: Re: bug#45839: 28.0.50; Isearch and transient mode wierd behaviour
 in info-mode!
Date: Wed, 13 Jan 2021 20:06:20 +0200
> In info-mode do the following:
> + C-SPC :: set mark
> + C-s valid_query :: search for some string
> + RET
>
> By now you can see region is not highlighted and this will affect all
> other command such as M-w(kill-ring-save).

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.

If you want to copy the region with M-w, then you can reactivate it with
'C-x C-x'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45839; Package emacs. (Wed, 13 Jan 2021 19:21:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Juri Linkov <juri <at> linkov.net>, Utkarsh Singh <utkarsh190601 <at> gmail.com>
Cc: 45839 <at> debbugs.gnu.org
Subject: RE: bug#45839: 28.0.50; Isearch and transient mode wierd behaviour in
 info-mode!
Date: 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.
___

If library Isearch+ is also loaded then when search
stays in the same node the mark is deactivated if
option `isearchp-deactivate-region-flag' is non-nil
(the default).  You can toggle this anytime during
Isearch with `M-= C-SPC'.

So you control the behavior for search within a node,
and deactivation happens when search moves to another
node.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45839; Package emacs. (Wed, 13 Jan 2021 19:27:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Juri Linkov <juri <at> linkov.net>, Utkarsh Singh <utkarsh190601 <at> gmail.com>
Cc: 45839 <at> debbugs.gnu.org
Subject: RE: bug#45839: 28.0.50; Isearch and transient mode wierd behaviour in
 info-mode!
Date: Wed, 13 Jan 2021 11:24:46 -0800 (PST)
Adding links, for OP -

Info+ description:

https://www.emacswiki.org/emacs/InfoPlus

code:

https://www.emacswiki.org/emacs/download/info%2b.el

___

Isearch+ description:

https://www.emacswiki.org/emacs/IsearchPlus

code:

https://www.emacswiki.org/emacs/download/isearch%2b.el




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45839; Package emacs. (Thu, 14 Jan 2021 09:52:02 GMT) Full text and rfc822 format available.

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

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: Re: 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)))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#45839; Package emacs. (Thu, 14 Jan 2021 19:14:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: 45839 <at> debbugs.gnu.org
Subject: Re: bug#45839: 28.0.50; Isearch and transient mode wierd behaviour
 in info-mode!
Date: Thu, 14 Jan 2021 21:09:20 +0200
tags 45839 fixed
close 45839 28.0.50
thanks

>> @@ -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)))
>
> Thanks this works!

Thanks for confirming, now pushed to master.




Added tag(s) fixed. Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Thu, 14 Jan 2021 19:14:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.0.50, send any further explanations to 45839 <at> debbugs.gnu.org and Utkarsh Singh <utkarsh190601 <at> gmail.com> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Thu, 14 Jan 2021 19:14:03 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. (Fri, 12 Feb 2021 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 45 days ago.

Previous Next


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