Discussion:
Highlight process-marked files in Gnus summary?
(too old to reply)
Michael Heerdegen
2020-05-18 02:42:21 UTC
Permalink
Hi,

seems there is no built-in way to highlight (complete lines) of
process-marked files in the Gnus summary, since # is not a normal mark
and can't be specified in `gnus-summary-highlight'? Is there some other
way (in Gnus)?

The obvious goal is to get a better overview of what is marked before I
e.g. delete the articles. It's too easy to make a mistake with only
those little # marks around. Ideally the used face would specify a
background color (like hl-line) so it doesn't interfere with the stuff
in `gnus-summary-highlight'.

Thanks in advance,

Michael.
Eric Abrahamsen
2020-05-18 15:38:47 UTC
Permalink
Post by Michael Heerdegen
Hi,
seems there is no built-in way to highlight (complete lines) of
process-marked files in the Gnus summary, since # is not a normal mark
and can't be specified in `gnus-summary-highlight'? Is there some other
way (in Gnus)?
The obvious goal is to get a better overview of what is marked before I
e.g. delete the articles. It's too easy to make a mistake with only
those little # marks around. Ideally the used face would specify a
background color (like hl-line) so it doesn't interfere with the stuff
in `gnus-summary-highlight'.
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?
Lars Ingebrigtsen
2020-05-19 13:47:43 UTC
Permalink
Post by Eric Abrahamsen
Post by Michael Heerdegen
The obvious goal is to get a better overview of what is marked before I
e.g. delete the articles. It's too easy to make a mistake with only
those little # marks around. Ideally the used face would specify a
background color (like hl-line) so it doesn't interfere with the stuff
in `gnus-summary-highlight'.
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...)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Michael Heerdegen
2020-05-19 23:13:07 UTC
Permalink
Post by Lars Ingebrigtsen
Post by Eric Abrahamsen
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)
gnus-newsgroup-processable)
. 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.

Thanks,

Michael.
Lars Ingebrigtsen
2020-05-22 13:00:37 UTC
Permalink
Post by Michael Heerdegen
(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")?
I think everything that's not a readedness mark is a secondary mark
(like % and the like).
Post by Michael Heerdegen
(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.
`gnus-summary-highlight-line' and `gnus-tree-highlight-node'. Seems to
be simple to do.
Sounds good to me -- patches welcome. :-)

Continue reading on narkive:
Loading...