unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#42609: 28.0.50; Issue with highlight in long files
       [not found] <20200730004613.y3ubvmdwam3jh4pg.ref@ergus>
@ 2020-07-30  0:46 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-07-30 22:59   ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-07-30  0:46 UTC (permalink / raw)
  To: 42609

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#42609: 28.0.50; Issue with highlight in long files
  2020-07-30  0:46 ` bug#42609: 28.0.50; Issue with highlight in long files Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-07-30 22:59   ` Juri Linkov
  2020-08-05 23:43     ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Juri Linkov @ 2020-07-30 22:59 UTC (permalink / raw)
  To: 42609; +Cc: spacibba

> 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?





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#42609: 28.0.50; Issue with highlight in long files
  2020-07-30 22:59   ` Juri Linkov
@ 2020-08-05 23:43     ` Juri Linkov
  2020-08-06 23:55       ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Juri Linkov @ 2020-08-05 23:43 UTC (permalink / raw)
  To: 42609; +Cc: spacibba

>> 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."





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#42609: 28.0.50; Issue with highlight in long files
  2020-08-05 23:43     ` Juri Linkov
@ 2020-08-06 23:55       ` Juri Linkov
  0 siblings, 0 replies; 4+ messages in thread
From: Juri Linkov @ 2020-08-06 23:55 UTC (permalink / raw)
  To: 42609; +Cc: spacibba

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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-06 23:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200730004613.y3ubvmdwam3jh4pg.ref@ergus>
2020-07-30  0:46 ` bug#42609: 28.0.50; Issue with highlight in long files Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-07-30 22:59   ` Juri Linkov
2020-08-05 23:43     ` Juri Linkov
2020-08-06 23:55       ` Juri Linkov

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).