GNU bug report logs - #42609
28.0.50; Issue with highlight in long files

Previous Next

Package: emacs;

Reported by: Ergus <spacibba <at> aol.com>

Date: Thu, 30 Jul 2020 00:47:02 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 42609 in the body.
You can then email your comments to 42609 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#42609; Package emacs. (Thu, 30 Jul 2020 00:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ergus <spacibba <at> aol.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 30 Jul 2020 00:47:02 GMT) Full text and rfc822 format available.

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

From: Ergus <spacibba <at> aol.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; Issue with highlight in long files
Date: Thu, 30 Jul 2020 02:46:13 +0200
--text follows this line--

I am working with a big logfile (98315 lines ~ 11Mb) and when I try to add a
highlight (with emacs -Q) I find that only the occurrences close to the
current line are highlighted.

Trying with occur I get all the occurrences:
M-s o 0x20141e140

  3407:Node 0: myfunc2 (start = 199 -> 0x20141e140) (tnndim = 3000) (igp = 99)
  5263:197096.966759756 Node:0 Thread:0 newFragment:200 newRegion:0x20141e140:21624000 triggererTask:99
  5281:197096.966830230 Node:0 Thread:0 Task:100 output start:0x20141e140 bytes:24000
  5283:197096.966837758 Node:0 Thread:0 201 output 0x20141e140:24000 unsatisfied originator:100
  5285:197096.966846344 Node:0 Thread:0 200 newRegion:0x20141e140:24000 triggererTask:100
  5289:197096.966869955 Node:0 Thread:0 200 ->  Access from Task:100 [0x20141e140:24000] direct triggererTask:100
 51348:197097.104913014 Node:0 Thread:0 Task:1100 input start:0x20141e140 bytes:24000
 51349:197097.104918978 Node:0 Thread:0 2101 input 0x20141e140:24000 unsatisfied originator:1100
 51350:197097.104928211 Node:0 Thread:0 201 ->  Access from Task:1100 [0x20141e140:24000] direct triggererTask:1100
 51359:197097.104961096 Node:0 Thread:0 MessageTaskNew. Current location of 0x20141e140:24000 Node:1
 73184:Node 1: checkfunc2 (start = 199 -> 0x20141e140) (tnndim = 3000) (igp = 99)
 73188:Node 1: FAIL tpu_k[0](0x20141e140)=0.000000 != 199 (tnndim = 3000) (igp = 99)
 80179:197097.262551242 Node:0 Thread:0 3101 local 0x20141e140:24000 unsatisfied originator:0
 80180:197097.262559036 Node:0 Thread:0 Taskwait from Task:0 [0x20141e140:24000] direct triggererTask:0
 91910:197097.305742900 Node:0 Thread:0 4039 newFragment:4040 newRegion:0x20141e140:21624000 triggererTask:0
 91916:197097.305788738 Node:0 Thread:0 4040 newFragment:4041 newRegion:0x20141e140:24000 triggererTask:0

This are actually all the occurences as expected (16 in total) and
they are sparced (first number is the line number).

But:

If in line 3407 I do:

M-s h r 0x20141e140
Only the first 6 occurrences are highlighted

Else if I do instead
M-g g 73188
M-s h r 0x20141e140

then only the occurences in lines [73184 -> 91916] are highlighted

I don't attach the log because it is too big for an email.



In GNU Emacs 28.0.50 (build 3, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw scroll bars)
of 2020-07-29 built on ergus
Repository revision: 28bf56b8718fc545ed94e3fdb09a3cfa446ca61e
Repository branch: master
System Description: Debian GNU/Linux 10 (buster)

Recent messages:
File verbose is large (10 MiB), really open? (y)es or (n)o or (l)iterally y
verbose has auto save data; consider M-x recover-this-file
Auto-saving...done
previous-line: Beginning of buffer [24 times]
Mark saved where search started
Mark set
Quit
Auto-saving...
Mark saved where search started [4 times]
Making completion list...

Configured using:
'configure --prefix=/home/ergus/.local/ --with-mailutils'

Configured features:
XPM JPEG TIFF GIF PNG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY
LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS
LUCID X11 XDBE XIM MODULES THREADS JSON PDUMPER

Important settings:
 value of $LANG: en_GB.UTF-8
 value of $XMODIFIERS: @im=ibus
 locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
 hi-lock-mode: t
 tooltip-mode: t
 global-eldoc-mode: t
 electric-indent-mode: t
 mouse-wheel-mode: t
 tool-bar-mode: t
 menu-bar-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
 line-number-mode: t
 transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils thingatpt hi-lock misearch multi-isearch
term/tmux term/xterm xterm byte-opt gv bytecomp byte-compile cconv
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 loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 50728 7449)
(symbols 48 6216 1)
(strings 32 16171 1344)
(string-bytes 1 520196)
(vectors 16 7539)
(vector-slots 8 79677 5876)
(floats 8 25 477)
(intervals 56 194 0)
(buffers 992 12))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42609; Package emacs. (Thu, 30 Jul 2020 23:15:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: Ergus via "Bug reports for GNU Emacs, the Swiss army knife of text
 editors" <bug-gnu-emacs <at> gnu.org>
Cc: 42609 <at> debbugs.gnu.org, Ergus <spacibba <at> aol.com>
Subject: Re: bug#42609: 28.0.50; Issue with highlight in long files
Date: Fri, 31 Jul 2020 01:59:07 +0300
> If in line 3407 I do:
>
> M-s h r 0x20141e140
> Only the first 6 occurrences are highlighted
>
> Else if I do instead
> M-g g 73188
> M-s h r 0x20141e140
>
> then only the occurences in lines [73184 -> 91916] are highlighted
>
> I don't attach the log because it is too big for an email.

Please try to increase the value of hi-lock-highlight-range.
Recently it was changed from 200_000 to 2_000_000 in bug#40224.
Do you think it should be increased more?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42609; Package emacs. (Thu, 30 Jul 2020 23:15:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42609; Package emacs. (Thu, 06 Aug 2020 00:16:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: 42609 <at> debbugs.gnu.org
Cc: spacibba <at> aol.com
Subject: Re: bug#42609: 28.0.50; Issue with highlight in long files
Date: Thu, 06 Aug 2020 02:43:50 +0300
>> If in line 3407 I do:
>>
>> M-s h r 0x20141e140
>> Only the first 6 occurrences are highlighted
>>
>> Else if I do instead
>> M-g g 73188
>> M-s h r 0x20141e140
>>
>> then only the occurences in lines [73184 -> 91916] are highlighted
>>
>> I don't attach the log because it is too big for an email.
>
> Please try to increase the value of hi-lock-highlight-range.
> Recently it was changed from 200_000 to 2_000_000 in bug#40224.
> Do you think it should be increased more?

My first thought was to add a new option 'nil' "No limit" to
hi-lock-highlight-range.  But actually it's easy to just set it
to a big value.  And this still doesn't solve the problem
when hi-lock gives an impression that it highlights everything.

So a better idea is to notify the user with a warning when hi-lock
highlights less occurrences than there are in the buffer:

diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index a18310322a..33ca40f8de 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -812,7 +812,9 @@ hi-lock-set-pattern
               (setq hi-lock-interactive-patterns
                     (cdr hi-lock-interactive-patterns)
                     hi-lock-interactive-lighters
-                    (cdr hi-lock-interactive-lighters)))))))))
+                    (cdr hi-lock-interactive-lighters))))
+          (when (or (> search-start (point-min)) (< search-end (point-max)))
+            (message "Hi-lock added only in range %d-%d" search-start search-end)))))))
 
 (defun hi-lock-set-file-patterns (patterns)
   "Replace file patterns list with PATTERNS and refontify."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#42609; Package emacs. (Fri, 07 Aug 2020 00:53:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: 42609 <at> debbugs.gnu.org
Cc: spacibba <at> aol.com
Subject: Re: bug#42609: 28.0.50; Issue with highlight in long files
Date: Fri, 07 Aug 2020 02:55:35 +0300
tags 42609 fixed
close 42609 28.0.50
quit

> So a better idea is to notify the user with a warning when hi-lock
> highlights less occurrences than there are in the buffer:

Pushed to master and closed.




Added tag(s) fixed. Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Fri, 07 Aug 2020 00:53:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.0.50, send any further explanations to 42609 <at> debbugs.gnu.org and Ergus <spacibba <at> aol.com> Request was from Juri Linkov <juri <at> linkov.net> to control <at> debbugs.gnu.org. (Fri, 07 Aug 2020 00:53: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, 04 Sep 2020 11:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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