all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 53771@debbugs.gnu.org
Subject: bug#53771: 29.0.50; highlight-regexp not working after tabulated-list-col-sort
Date: Sat, 5 Feb 2022 10:13:59 +0300	[thread overview]
Message-ID: <Yf4jt4MBFqq69CQC@protected.localdomain> (raw)
In-Reply-To: <877da9erl1.fsf@gnus.org>

* 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/





  reply	other threads:[~2022-02-05  7:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2022-02-05  7:19     ` Lars Ingebrigtsen
2022-02-05 16:10       ` Jean Louis
2022-02-06  3:10         ` Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yf4jt4MBFqq69CQC@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=53771@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.