From: Michael Heerdegen <michael_heerdegen@web.de>
To: info-gnus-english@gnu.org
Subject: Re: Fetching articles by id
Date: Fri, 13 May 2022 06:29:41 +0200 [thread overview]
Message-ID: <87lev6gimi.fsf@web.de> (raw)
In-Reply-To: <8735hfnxry.fsf_-_@web.de>
Michael Heerdegen <michael_heerdegen@web.de> writes:
> How can I fetch articles with known id to be included in an existing
> Summary buffer? `gnus-summary-refer-article' works but also selects an
> displays the article. It doesn't seem to be based on something that
> doesn't select and display, though.
I do it like this for now (modulo copy-paste-errors):
(1) Get processed marked articles in search group:
#+begin_src emacs-lisp
(setq articles
(mapcar #'nnselect-article-number
gnus-newsgroup-processable))
#+end_src
(2) Add those to the summary buffer of the searched group after opening
it:
#+begin_src emacs-lisp
(let (current (or (gnus-summary-article-number) gnus-newsgroup-end))
(mapc (lambda (h)
(let ((article-number (mail-header-number h)))
(gnus-summary-goto-subject article-number 'force)))
(gnus-fetch-headers articles))
;; Repair thread display
(gnus-summary-prepare)
(gnus-summary-goto-subject current)
(gnus-summary-position-point)
(mapc #'gnus-summary-set-process-mark articles))
#+end_src
[ I don't eval that by hand every time of course. I use hacked
registers to save those process marked ARTICLES in a register, and jump
to that register to insert and process mark the ARTICLES later. ]
Michael.
prev parent reply other threads:[~2022-05-13 4:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-07 0:48 G g and delete mails with Emacs Michael Heerdegen
2022-05-09 17:00 ` Eric Abrahamsen
2022-05-10 4:05 ` Michael Heerdegen
2022-05-10 4:57 ` Eric Abrahamsen
2022-05-12 2:36 ` Michael Heerdegen
2022-05-12 5:08 ` Fetching articles by id (was: G g and delete mails with Emacs) Michael Heerdegen
2022-05-13 4:29 ` Michael Heerdegen [this message]
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=87lev6gimi.fsf@web.de \
--to=michael_heerdegen@web.de \
--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).