* bug#53771: 29.0.50; highlight-regexp not working after tabulated-list-col-sort
@ 2022-02-04 6:29 Jean Louis
2022-02-04 6:33 ` Jean Louis
2022-02-05 6:48 ` Lars Ingebrigtsen
0 siblings, 2 replies; 7+ messages in thread
From: Jean Louis @ 2022-02-04 6:29 UTC (permalink / raw)
To: 53771
highlight-regexp not working after tabulated-list-col-sort
Here is how:
1) M-x package-list-packages
2) M-x highlight-regexp RET parens RET and word "parens" will get
highlighted
3) Click on "Archive" title and sort the list by Archive column
4) M-x highlight-regexp RET parens RET and the word "parens" is not
highlighted. I would like to understand why. hi-lock mode remains
turned on.
In GNU Emacs 29.0.50 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 1.17.4, Xaw3d scroll bars)
of 2022-01-29 built on protected.rcdrun.com
Repository revision: 7e17749ada101fbfb772a79deda5f7087ba9e96d
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101003
System Description: Parabola GNU/Linux-libre
Configured using:
'configure --with-x-toolkit=lucid'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY
PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
WEBP X11 XAW3D XDBE XIM XPM LUCID ZLIB
Important settings:
value of $LC_ALL: en_US.UTF-8
value of $LANG: de_DE.UTF-8
value of $XMODIFIERS: @im=exwm-xim
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-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
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr shortdoc help-fns radix-tree help-mode emacsbug
message mailcap yank-media rmc puny dired dired-loaddefs rfc822 mml
mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util
text-property-search time-date seq gv subr-x byte-opt bytecomp
byte-compile cconv 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 iso-transl tooltip
eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode 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 lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
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 emoji-zwj 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 keymap hashtable-print-readable backquote threads
dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo x-toolkit x multi-tty make-network-process
emacs)
Memory information:
((conses 16 52925 5041)
(symbols 48 6456 3)
(strings 32 18917 1698)
(string-bytes 1 572784)
(vectors 16 12130)
(vector-slots 8 167847 41359)
(floats 8 64 36)
(intervals 56 270 0)
(buffers 992 13))
--
Thanks,
Jean Louis
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#53771: 29.0.50; highlight-regexp not working after tabulated-list-col-sort
2022-02-04 6:29 bug#53771: 29.0.50; highlight-regexp not working after tabulated-list-col-sort Jean Louis
@ 2022-02-04 6:33 ` Jean Louis
2022-02-05 6:48 ` Lars Ingebrigtsen
1 sibling, 0 replies; 7+ messages in thread
From: Jean Louis @ 2022-02-04 6:33 UTC (permalink / raw)
To: Jean Louis; +Cc: 53771
I can observe that M-x highlight-regexp does not work for second time
in Dired mode as well.
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#53771: 29.0.50; highlight-regexp not working after tabulated-list-col-sort
2022-02-04 6:29 bug#53771: 29.0.50; highlight-regexp not working after tabulated-list-col-sort Jean Louis
2022-02-04 6:33 ` Jean Louis
@ 2022-02-05 6:48 ` Lars Ingebrigtsen
2022-02-05 7:13 ` Jean Louis
1 sibling, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-05 6:48 UTC (permalink / raw)
To: Jean Louis; +Cc: 53771
Jean Louis <bugs@gnu.support> writes:
> 1) M-x package-list-packages
>
> 2) M-x highlight-regexp RET parens RET and word "parens" will get
> highlighted
>
> 3) Click on "Archive" title and sort the list by Archive column
>
> 4) M-x highlight-regexp RET parens RET and the word "parens" is not
> highlighted. I would like to understand why. hi-lock mode remains
> turned on.
As the doc string says:
---
Use Font lock mode, if enabled, to highlight REGEXP. Otherwise,
use overlays for highlighting. If overlays are used, the
highlighting will not update as you type. The Font Lock mode
is considered "enabled" in a buffer if its ‘major-mode’
causes ‘font-lock-specified-p’ to return non-nil, which means
the major mode specifies support for Font Lock.
---
So in these modes, changing the text won't update the overlays, and
re-sorting them will remove the overlays altogether. So I don't think
there's any bug here, and I'm therefore closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#53771: 29.0.50; highlight-regexp not working after tabulated-list-col-sort
2022-02-05 6:48 ` Lars Ingebrigtsen
@ 2022-02-05 7:13 ` Jean Louis
2022-02-05 7:19 ` Lars Ingebrigtsen
0 siblings, 1 reply; 7+ messages in thread
From: Jean Louis @ 2022-02-05 7:13 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 53771
* Lars Ingebrigtsen <larsi@gnus.org> [2022-02-05 09:49]:
> As the doc string says:
>
> ---
> Use Font lock mode, if enabled, to highlight REGEXP. Otherwise,
> use overlays for highlighting. If overlays are used, the
> highlighting will not update as you type. The Font Lock mode
> is considered "enabled" in a buffer if its ‘major-mode’
> causes ‘font-lock-specified-p’ to return non-nil, which means
> the major mode specifies support for Font Lock.
I wish to use the function highlight-regexp for reasons of
simplicity. The above description does not tell me HOW to use font
lock mode to highlight regexp.
I can see that font-lock-mode is T inthe buffer before and after
sorting. My understanding is that I am already using
font-lock-mode. It is enabled, and I cannot get highlighting.
Description such as "Use Font lock mode, if enabled, to highlight
REGEXP." with its "REGEXP" relates to the argument REGEXP. It is
related to the function. It tells little how is that supposed to work.
I have followed the above instructions by my (mis)understanding and
have specified `font-lock-specified-p' below, and after sorting I
still cannot invoke highlight-regexp neither with M-x neither by
evaluation.
Please, help me resolve this.
(define-derived-mode hyperscope-list-mode tabulated-list-mode "Hyperscope" "Hyperscope mode"
(hyperscope-text-scale-adjust 'hyperscope-list-mode)
(let ((id-length (length (number-to-string (rcd-sql-first "SELECT hyobjects_id FROM hyobjects ORDER BY hyobjects_id DESC LIMIT 1" hs-db)))))
(setq tabulated-list-format (vconcat (list (list "ID" id-length t :right-align t))
(list (list "Hyperdocument" 70 t))
(list (list "Type" 12 t))
(list (list "Action" 9 t))))
(setq font-lock-specified-p t)
(setq tabulated-list-padding 1)
;; (setq tabulated-list-sort-key (cons "ID" nil))
(tabulated-list-init-header)))
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#53771: 29.0.50; highlight-regexp not working after tabulated-list-col-sort
2022-02-05 7:13 ` Jean Louis
@ 2022-02-05 7:19 ` Lars Ingebrigtsen
2022-02-05 16:10 ` Jean Louis
0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2022-02-05 7:19 UTC (permalink / raw)
To: Jean Louis; +Cc: 53771
Jean Louis <bugs@gnu.support> writes:
> Please, help me resolve this.
I think you just have to reapply the highlight-regexp after altering the
buffer.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#53771: 29.0.50; highlight-regexp not working after tabulated-list-col-sort
2022-02-05 7:19 ` Lars Ingebrigtsen
@ 2022-02-05 16:10 ` Jean Louis
2022-02-06 3:10 ` Michael Heerdegen
0 siblings, 1 reply; 7+ messages in thread
From: Jean Louis @ 2022-02-05 16:10 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 53771, Jean Louis
* Lars Ingebrigtsen <larsi@gnus.org> [2022-02-05 10:19]:
> Jean Louis <bugs@gnu.support> writes:
>
> > Please, help me resolve this.
>
> I think you just have to reapply the highlight-regexp after altering the
> buffer.
Then I wasn't clear. I have tried that in first place and it does not
work. That is why I said it is bug.
I don't get it why it is not bug.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#53771: 29.0.50; highlight-regexp not working after tabulated-list-col-sort
2022-02-05 16:10 ` Jean Louis
@ 2022-02-06 3:10 ` Michael Heerdegen
0 siblings, 0 replies; 7+ messages in thread
From: Michael Heerdegen @ 2022-02-06 3:10 UTC (permalink / raw)
To: Jean Louis; +Cc: Lars Ingebrigtsen, 53771
Jean Louis <bugs@gnu.support> writes:
> Then I wasn't clear. I have tried that in first place and it does not
> work. That is why I said it is bug.
You are right, that doesn't work. The second time `hi-lock-set-pattern'
checks `hi-lock-interactive-patterns', finds the pattern, and does
nothing.
At least in the package-list buffer. Dired is different because it
_does_ use font-lock. But I don't see a problem in dired when I revert
or reorder the buffer, the highlighting doesn't disappear, so I don't
need to add a pattern a second time.
Michael.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-02-06 3:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-04 6:29 bug#53771: 29.0.50; highlight-regexp not working after tabulated-list-col-sort Jean Louis
2022-02-04 6:33 ` Jean Louis
2022-02-05 6:48 ` Lars Ingebrigtsen
2022-02-05 7:13 ` Jean Louis
2022-02-05 7:19 ` Lars Ingebrigtsen
2022-02-05 16:10 ` Jean Louis
2022-02-06 3:10 ` Michael Heerdegen
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).