[Top][All Lists]

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

Re: Highlight process-marked files in Gnus summary?

From: Michael Heerdegen
Subject: Re: Highlight process-marked files in Gnus summary?
Date: Wed, 20 May 2020 01:13:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Lars Ingebrigtsen <> writes:

> > I haven't ever looked at the summary-highlight code, but would it be
> > hard to add another entry in there, call it `process', to specifically
> > target the process mark?
> I don't think that's necessary?  Can't you just add highlighting based
> on pretty much anything in the highlighting code?  (It's been a while
> since I looked at it...)

I had a quick look.  You currently have to refer to a set of predefined
variables in entries in `gnus-summary-highlight':

score:        The article's score.
default:      The default article score.
default-high: The default score for high scored articles.
default-low:  The default score for low scored articles.
mark:         The article's mark.
uncached:     Non-nil if the article is uncached.

though, actually, any expression is allowed I think.  It would be easier
if one could refer to the article number via `article'.  So currently, I
would have to do something like this:

(add-to-list 'gnus-summary-highlight
             '((memq (or (gnus-summary-article-number) gnus-current-article)
               . hl-line))

I would suggest to at least do the following:

(1) Provide an `article' variable.  Maybe also provide `processable' as
suggested and/or `sec-mark' (somewhere in the code the process mark is
called a "secondary mark")?

(2) make the docstring of `gnus-summary-highlight' say that arbitrary
expressions are allowed, and that they are evaluated with point
positioned on the according article's line.

For (1), AFAIU two places would need to be changed:
`gnus-summary-highlight-line' and `gnus-tree-highlight-node'.  Seems to
be simple to do.



reply via email to

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