GNU bug report logs -
#53771
29.0.50; highlight-regexp not working after tabulated-list-col-sort
Previous Next
Reported by: Jean Louis <bugs <at> gnu.support>
Date: Fri, 4 Feb 2022 06:30:02 UTC
Severity: normal
Tags: notabug
Found in version 29.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* Lars Ingebrigtsen <larsi <at> 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/
This bug report was last modified 2 years and 265 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.