Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Highlight process-marked files in Gnus summary?
@ 2020-05-18  2:42 Michael Heerdegen
  2020-05-18 15:38 ` Eric Abrahamsen
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Heerdegen @ 2020-05-18  2:42 UTC (permalink / raw)
  To: info-gnus-english

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.


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Highlight process-marked files in Gnus summary?
  2020-05-18  2:42 Highlight process-marked files in Gnus summary? Michael Heerdegen
@ 2020-05-18 15:38 ` Eric Abrahamsen
  2020-05-19 13:47   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Eric Abrahamsen @ 2020-05-18 15:38 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: info-gnus-english

Michael Heerdegen <michael_heerdegen@web.de> writes:

> 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?

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Highlight process-marked files in Gnus summary?
  2020-05-18 15:38 ` Eric Abrahamsen
@ 2020-05-19 13:47   ` Lars Ingebrigtsen
  2020-05-19 23:13     ` Michael Heerdegen
  2021-07-25 20:08     ` Roland Winkler
  0 siblings, 2 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2020-05-19 13:47 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: Michael Heerdegen, info-gnus-english

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

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

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Highlight process-marked files in Gnus summary?
  2020-05-19 13:47   ` Lars Ingebrigtsen
@ 2020-05-19 23:13     ` Michael Heerdegen
  2020-05-22 13:00       ` Lars Ingebrigtsen
  2021-07-25 20:08     ` Roland Winkler
  1 sibling, 1 reply; 10+ messages in thread
From: Michael Heerdegen @ 2020-05-19 23:13 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Eric Abrahamsen, info-gnus-english

Lars Ingebrigtsen <larsi@gnus.org> 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)
                     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.

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Highlight process-marked files in Gnus summary?
  2020-05-19 23:13     ` Michael Heerdegen
@ 2020-05-22 13:00       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2020-05-22 13:00 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: Eric Abrahamsen, info-gnus-english

Michael Heerdegen <michael_heerdegen@web.de> writes:

> 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")?

I think everything that's not a readedness mark is a secondary mark
(like % and the like).

> (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.

Sounds good to me -- patches welcome.  :-)


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Highlight process-marked files in Gnus summary?
  2020-05-19 13:47   ` Lars Ingebrigtsen
  2020-05-19 23:13     ` Michael Heerdegen
@ 2021-07-25 20:08     ` Roland Winkler
  2021-07-25 22:16       ` Michael Heerdegen
  2021-07-25 22:20       ` Eric Abrahamsen
  1 sibling, 2 replies; 10+ messages in thread
From: Roland Winkler @ 2021-07-25 20:08 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Eric Abrahamsen, Michael Heerdegen, info-gnus-english

On Tue, May 19 2020, Lars Ingebrigtsen wrote:
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>>> 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...)

I found this old thread.  Could it make sense to have a minor mode that
puts the `invisible' text property on all lines without process-mark?

I have in mind a use case different from Michael who started this thread:

Often I deal with threads that evolve (magically) such that they become
recognized as multiple threads.  In such a case the process-mark can
help to "collect" all threads on a topic.  Or are there better solutions
for this?

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Highlight process-marked files in Gnus summary?
  2021-07-25 20:08     ` Roland Winkler
@ 2021-07-25 22:16       ` Michael Heerdegen
  2021-07-26  2:26         ` Roland Winkler
  2021-07-25 22:20       ` Eric Abrahamsen
  1 sibling, 1 reply; 10+ messages in thread
From: Michael Heerdegen @ 2021-07-25 22:16 UTC (permalink / raw)
  To: info-gnus-english

Roland Winkler <winkler@gnu.org> writes:

> I found this old thread.  Could it make sense to have a minor mode
> that puts the `invisible' text property on all lines without
> process-mark?

I played with limiting since then (a concept that is a bit more advanced
than making lines invisible and already exists).

AFAIK there is no command that lets you limit to process marked
articles, but it should be trivial to write using `gnus-summary-limit'
(limits to a given article list).

You might also want to test something like

#+begin_src emacs-lisp
(defun my-gnus-limit-to-current-thread ()
  (interactive)
  (let ((a (gnus-summary-article-number)))
    (gnus-summary-limit
     (gnus-summary-articles-in-thread
      (let ((a a))
        (dotimes (_ (gnus-summary-thread-level))
          (cl-callf gnus-summary-article-parent a))
        a)))
    (gnus-summary-goto-subject a)))
#+end_src


Michael.


_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Highlight process-marked files in Gnus summary?
  2021-07-25 20:08     ` Roland Winkler
  2021-07-25 22:16       ` Michael Heerdegen
@ 2021-07-25 22:20       ` Eric Abrahamsen
  1 sibling, 0 replies; 10+ messages in thread
From: Eric Abrahamsen @ 2021-07-25 22:20 UTC (permalink / raw)
  To: Roland Winkler; +Cc: Lars Ingebrigtsen, Michael Heerdegen, info-gnus-english

Roland Winkler <winkler@gnu.org> writes:

> On Tue, May 19 2020, Lars Ingebrigtsen wrote:
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>>> 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...)
>
> I found this old thread.  Could it make sense to have a minor mode that
> puts the `invisible' text property on all lines without process-mark?

I'm cc'd here but don't know this area of the code at all, sorry.

> I have in mind a use case different from Michael who started this thread:
>
> Often I deal with threads that evolve (magically) such that they become
> recognized as multiple threads.  In such a case the process-mark can
> help to "collect" all threads on a topic.  Or are there better solutions
> for this?

I think `gnus-summary-reparent-thread' or some subset of the code
therein might provide a solution.

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Highlight process-marked files in Gnus summary?
  2021-07-25 22:16       ` Michael Heerdegen
@ 2021-07-26  2:26         ` Roland Winkler
  2021-07-27  0:47           ` Michael Heerdegen
  0 siblings, 1 reply; 10+ messages in thread
From: Roland Winkler @ 2021-07-26  2:26 UTC (permalink / raw)
  To: Michael Heerdegen; +Cc: info-gnus-english

On Mon, Jul 26 2021, Michael Heerdegen wrote:
> Roland Winkler <winkler@gnu.org> writes:
>
>> I found this old thread.  Could it make sense to have a minor mode
>> that puts the `invisible' text property on all lines without
>> process-mark?
>
> I played with limiting since then (a concept that is a bit more advanced
> than making lines invisible and already exists).
>
> AFAIK there is no command that lets you limit to process marked
> articles, but it should be trivial to write using `gnus-summary-limit'
> (limits to a given article list).

Yes, thank you, limiting goes very much in the direction I want.
-- I like the two-step process of first marking the messages I want, and
only afterwards limiting the summary buffer because I can check whether
I have identified all messages I wanted to identify before the unmarked
messages become invisible.

Hopefully, it will be not too difficult to teach Gnus to limit the
Summary buffer based on the process-mark.

> You might also want to test something like
>
> #+begin_src emacs-lisp
> (defun my-gnus-limit-to-current-thread ()

Thanks! - If gnus can identify a thread correctly, the problem is pretty
much solved anyway.  I am concerned about the annoying cases where the
discussion of a topic spreads out into multiple threads because someone
continued the discussion with a new message using a different subject
header and ignoring the references headers used previously.  Typically,
this takes me multiple iterations of hand-crafted search criteria to
identify all messages that have contributed to the discussion of a
topic.

It just came to my mind: does Gnus allow one to add a custom header like
a "topic ID" that could help me two months later when I need to revisit
the discussion of a topic that was distributed over multiple apparently
unrelated threads?

There are all kinds of Gnus commands for article washing and
manipulating article headers.  Yet I have not identified anything that
could be (mis-) used for such a purpose.

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Highlight process-marked files in Gnus summary?
  2021-07-26  2:26         ` Roland Winkler
@ 2021-07-27  0:47           ` Michael Heerdegen
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Heerdegen @ 2021-07-27  0:47 UTC (permalink / raw)
  To: info-gnus-english

Roland Winkler <winkler@gnu.org> writes:

> Hopefully, it will be not too difficult to teach Gnus to limit the
> Summary buffer based on the process-mark.

Should be as easy as

#+begin_src emacs-lisp
(defun my-gnus-limit-to-process-marked ()
  (interactive)
  (gnus-summary-limit gnus-newsgroup-processable))
#+end_src

i think.  / w for `gnus-summary-pop-limit'.  AFAIU limiting is stack
based: each limiting pushes to the stack, and / w pops the most upper
limit and thus reverses one limiting operation.


Michael.



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-07-27  0:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-18  2:42 Highlight process-marked files in Gnus summary? Michael Heerdegen
2020-05-18 15:38 ` Eric Abrahamsen
2020-05-19 13:47   ` Lars Ingebrigtsen
2020-05-19 23:13     ` Michael Heerdegen
2020-05-22 13:00       ` Lars Ingebrigtsen
2021-07-25 20:08     ` Roland Winkler
2021-07-25 22:16       ` Michael Heerdegen
2021-07-26  2:26         ` Roland Winkler
2021-07-27  0:47           ` Michael Heerdegen
2021-07-25 22:20       ` Eric Abrahamsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).