Gnus development mailing list
 help / color / mirror / Atom feed
From: Michael Schierl <schierlm-usenet@gmx.de>
Subject: Fetching Message-ID --> nnfolder
Date: Tue, 13 Apr 2004 22:31:36 +0200	[thread overview]
Message-ID: <wk65c3d3h3.fsf@smsoft.ixy.de> (raw)

Hi,

I use the following code to fetch a list of message IDs
(`nnlater-mid-cache') into a nnfolder whenever I fetch news:

(defun nnlater-fetch-article (msgid)
  (unless (get-buffer "*Group*")
    (error "Gnus is not started"))
  (save-window-excursion
    (save-excursion
      (set-buffer (get-buffer "*Group*"))
      
      (gnus-group-jump-to-group "nnfolder:fetched") ; this folder must
					; exist and have at least one
					; article in it
      (gnus-group-select-group 0)
      (gnus-summary-refer-article msgid)
      (gnus-summary-mark-article nil gnus-unread-mark)
      (gnus-summary-copy-article 1 "nnfolder:fetched") ; otherwise it is
					; not saved
      (gnus-summary-exit))))
  
(defadvice gnus-agent-fetch-session (before nnlater-gafs-advice activate)
  (unless gnus-plugged
    (error "Can't fetch articles while Gnus is unplugged"))
  (mapc 'nnlater-fetch-article nnlater-mid-cache)
  (setq nnlater-mid-cache nil))

[there is some more code there to make gnus-refer-article-methods add
an otherwise unretrievable message ID to this list, but that is not
part of my problem...]

Now I have a few problems:

1. Sometimes I get an error that article -1 cannot be copied (however,
   when I want to hunt it down, it does not appear, so I cannot
   provide an exact error message). When I use move-article instead of
   copy-article, a similar error occurs most of the time ("Couldn't
   move Article (-1): Folder fetched selected"). The error message
   looks strange to me, but if moving does not work, I'll live with
   copying.

2. I could not find a way to make the "copy" unread. When the article
   is moved, it remains unread as it should, but the copy will become
   read. (Since the "Original" will disappear when the group is
   exited, the only article remaining will be read). 
   `gnus-preserve-marks' is `t'.

3. This solution looks a bit hackish to me. Is there some function to
   archieve that (message-ID --> nnfolder) which I missed?

Any ideas?




             reply	other threads:[~2004-04-13 20:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-13 20:31 Michael Schierl [this message]
2004-05-16 12:59 ` Lars Magne Ingebrigtsen
2004-05-17 19:43   ` Michael Schierl

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=wk65c3d3h3.fsf@smsoft.ixy.de \
    --to=schierlm-usenet@gmx.de \
    --cc=schierlm@gmx.de \
    /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).