Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: "Adam Sjøgren" <asjo@koldfront.dk>
To: info-gnus-english@gnu.org
Subject: Re: Marking thread as read
Date: Thu, 29 Jun 2023 18:33:22 +0200	[thread overview]
Message-ID: <87bkgyw7n1.fsf@tullinup.koldfront.dk> (raw)
In-Reply-To: <877crmlxug.fsf@alshehhi.io>

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



  parent reply	other threads:[~2023-06-29 16:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]
2023-07-01 15:23 Alshehhi Family

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=87bkgyw7n1.fsf@tullinup.koldfront.dk \
    --to=asjo@koldfront.dk \
    --cc=info-gnus-english@gnu.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.
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).