help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why M-x highlight-regexp does not work after sort in tabulated-list-


From: Michael Heerdegen
Subject: Re: Why M-x highlight-regexp does not work after sort in tabulated-list-mode?
Date: Fri, 02 Sep 2022 02:11:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Jean Louis <bugs@gnu.support> writes:

> Do you think that is error, and that hook shall be run after sorting?

I don't know what exactly you are doing, so it's hard to tell something
concrete.

tabulated-list is only a generic mode, so maybe it's better when the
implementations add hooks for operations when it makes sense.  In any
case, I don't think it's that mode's concern to implement features of
`hi-lock-mode' - which seems to be your intention.

Maybe it would be easier for you to just turn on font-lock-mode.  Have
you tried that?

Removing and re-adding pattern highlighting explicitly is only a
workaround.  If I would change anything then I would try to improve
hi-lock-mode instead so that it is easier to use under such
circumstances.  That `highlight-regexp' does nothing when font-lock-mode
is off (and no automatic highlighting can be assumed) doesn't make much
sense to me.  It could just highlight again.  But if you think that
further (automatic updating...) you end with a re-implementation of
font-lock-mode in Elisp - thus my suggestion to just try to turn that
mode on.

Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]