Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Re: Marking thread as read
@ 2023-07-01 15:23 Alshehhi Family
  0 siblings, 0 replies; 7+ messages in thread
From: Alshehhi Family @ 2023-07-01 15:23 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: info-gnus-english

Adam Sjøgren <asjo@koldfront.dk> writes:

> I recently had the same need, and solved it by making my own function
> based on gnus-summary-kill-thread:
>
>     (defun asjo-gnus-summary-mark-thread-read ()
>       "Mark articles under current thread as read."
>       (interactive "" gnus-summary-mode)
>       (let ((articles (gnus-summary-articles-in-thread)))
>         (save-excursion
>           ;; Expand the thread.
>           (gnus-summary-show-thread)
>           ;; Mark all the articles.
>           (while articles
>             (gnus-summary-goto-subject (car articles))
>             (gnus-summary-mark-article-as-read gnus-read-mark)
>             (setq articles (cdr articles)))))
>         ;; Go to next unread subject.
>       (gnus-summary-next-subject 1 t)
>       (gnus-set-mode-line 'summary))
>
>     (define-key gnus-summary-mode-map [(T) (r)] 'asjo-gnus-summary-mark-thread-read)
>
> More context: https://koldfront.dk/quickly_marking_a_thread_read_1839

Thank you. This works very well!



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

* Re: Marking thread as read
  2023-06-30  2:28   ` Michael Heerdegen
@ 2023-06-30  9:16     ` Eric S Fraga
  0 siblings, 0 replies; 7+ messages in thread
From: Eric S Fraga @ 2023-06-30  9:16 UTC (permalink / raw)
  To: info-gnus-english

On Friday, 30 Jun 2023 at 04:28, Michael Heerdegen wrote:
> After reading the Gnus manual a bit I take "killed" as a subset of
> "read".  k for example behaves, and is documented, similarly.
>
> Internally `gnus-summary-mark-article-as-read' is used, just marking is
> done with `gnus-killed-mark' - probably to indicate that you have not
> handled the articles by hand.

This makes sense but has some side effects, IIUC.  In particular,
adaptive scoring may be affected?

But I see that Adam has posted some code so all is good. :-)

Thank you,
eric
-- 
Eric S Fraga via gnus (Emacs 30.0.50 2023-06-19) on Debian 12.0



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

* Re: Marking thread as read
  2023-06-29 13:26 ` Eric S Fraga
@ 2023-06-30  2:28   ` Michael Heerdegen
  2023-06-30  9:16     ` Eric S Fraga
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Heerdegen @ 2023-06-30  2:28 UTC (permalink / raw)
  To: info-gnus-english

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> I've had a chance to try this and you are correct: the documentation
> does not match the behaviour.  "T k" with no argument marks all articles
> as killed which is not the same as read.

After reading the Gnus manual a bit I take "killed" as a subset of
"read".  k for example behaves, and is documented, similarly.

Internally `gnus-summary-mark-article-as-read' is used, just marking is
done with `gnus-killed-mark' - probably to indicate that you have not
handled the articles by hand.

Michael.



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

* Re: Marking thread as read
  2023-06-29  4:02 Alshehhi Family
  2023-06-29 13:07 ` Eric S Fraga
  2023-06-29 13:26 ` Eric S Fraga
@ 2023-06-29 16:33 ` Adam Sjøgren
  2 siblings, 0 replies; 7+ messages in thread
From: Adam Sjøgren @ 2023-06-29 16:33 UTC (permalink / raw)
  To: info-gnus-english

Alshehhi writes:

> I am new to gnus. I am trying to mark a thread as read. However, it is
> still unclear to me how to do that. There is the command
> gnus-summary-kill-thread:

I recently had the same need, and solved it by making my own function
based on gnus-summary-kill-thread:

    (defun asjo-gnus-summary-mark-thread-read ()
      "Mark articles under current thread as read."
      (interactive "" gnus-summary-mode)
      (let ((articles (gnus-summary-articles-in-thread)))
        (save-excursion
          ;; Expand the thread.
          (gnus-summary-show-thread)
          ;; Mark all the articles.
          (while articles
            (gnus-summary-goto-subject (car articles))
            (gnus-summary-mark-article-as-read gnus-read-mark)
            (setq articles (cdr articles)))))
        ;; Go to next unread subject.
      (gnus-summary-next-subject 1 t)
      (gnus-set-mode-line 'summary))

    (define-key gnus-summary-mode-map [(T) (r)] 'asjo-gnus-summary-mark-thread-read)

More context: https://koldfront.dk/quickly_marking_a_thread_read_1839


  Best regards,

    Adam

-- 
 "In the past we would do little things for love,           Adam Sjøgren
  but but things, big things required money. Now we    asjo@koldfront.dk
  can do big things for love."



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

* Re: Marking thread as read
  2023-06-29  4:02 Alshehhi Family
  2023-06-29 13:07 ` Eric S Fraga
@ 2023-06-29 13:26 ` Eric S Fraga
  2023-06-30  2:28   ` Michael Heerdegen
  2023-06-29 16:33 ` Adam Sjøgren
  2 siblings, 1 reply; 7+ messages in thread
From: Eric S Fraga @ 2023-06-29 13:26 UTC (permalink / raw)
  To: info-gnus-english

I've had a chance to try this and you are correct: the documentation
does not match the behaviour.  "T k" with no argument marks all articles
as killed which is not the same as read.  The other mentioned options
(positive, 0, and negative arguments) do behave as documented.

-- 
Eric S Fraga via gnus (Emacs 30.0.50 2023-06-29) on Debian 12.0



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

* Re: Marking thread as read
  2023-06-29  4:02 Alshehhi Family
@ 2023-06-29 13:07 ` Eric S Fraga
  2023-06-29 13:26 ` Eric S Fraga
  2023-06-29 16:33 ` Adam Sjøgren
  2 siblings, 0 replies; 7+ messages in thread
From: Eric S Fraga @ 2023-06-29 13:07 UTC (permalink / raw)
  To: info-gnus-english

On Thursday, 29 Jun 2023 at 04:02, Alshehhi Family wrote:
> It seems that like it is the right command because it says "as
> read". But when I run it, gnus mark the thread as kill. Am I missing
> something?

Not sure what you tried exactly.  What happens if you try "C-u T k",
i.e. passing a positive argument to the command?

-- 
Eric S Fraga via gnus (Emacs 30.0.50 2023-06-29) on Debian 12.0



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

* Marking thread as read
@ 2023-06-29  4:02 Alshehhi Family
  2023-06-29 13:07 ` Eric S Fraga
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Alshehhi Family @ 2023-06-29  4:02 UTC (permalink / raw)
  To: info-gnus-english


I am new to gnus. I am trying to mark a thread as read. However, it is
still unclear to me how to do that. There is the command
gnus-summary-kill-thread:

        gnus-summary-kill-thread is an interactive native-compiled Lisp
        function in ‘gnus-sum.el’.

        (gnus-summary-kill-thread &optional UNMARK)

        Mark articles under current thread as read.
        If the prefix argument is positive, remove any kinds of marks.
        If the prefix argument is zero, mark thread as expired.
        If the prefix argument is negative, tick articles instead.

It seems that like it is the right command because it says "as
read". But when I run it, gnus mark the thread as kill. Am I missing
something?

Husain



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

end of thread, other threads:[~2023-07-01 15:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-01 15:23 Marking thread as read Alshehhi Family
  -- strict thread matches above, loose matches on Subject: below --
2023-06-29  4:02 Alshehhi Family
2023-06-29 13:07 ` Eric S Fraga
2023-06-29 13:26 ` Eric S Fraga
2023-06-30  2:28   ` Michael Heerdegen
2023-06-30  9:16     ` Eric S Fraga
2023-06-29 16:33 ` Adam Sjøgren

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