From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/57007 Path: main.gmane.org!not-for-mail From: Michael Schierl Newsgroups: gmane.emacs.gnus.general Subject: Fetching Message-ID --> nnfolder Date: Tue, 13 Apr 2004 22:31:36 +0200 Sender: ding-owner@lists.math.uh.edu Message-ID: Reply-To: schierlm@gmx.de NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: sea.gmane.org 1081888408 31045 80.91.224.253 (13 Apr 2004 20:33:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 13 Apr 2004 20:33:28 +0000 (UTC) Original-X-From: ding-owner+M5547@lists.math.uh.edu Tue Apr 13 22:33:06 2004 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BDUaf-0004Gr-00 for ; Tue, 13 Apr 2004 22:33:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1BDUaM-0003wC-00; Tue, 13 Apr 2004 15:32:46 -0500 Original-Received: from util2.math.uh.edu ([129.7.128.23]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1BDUaI-0003vl-00 for ding@lists.math.uh.edu; Tue, 13 Apr 2004 15:32:42 -0500 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by util2.math.uh.edu with esmtp (Exim 4.30) id 1BDUaF-0001XD-0s for ding@lists.math.uh.edu; Tue, 13 Apr 2004 15:32:39 -0500 Original-Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by justine.libertine.org (Postfix) with ESMTP id AEA4A3A003D for ; Tue, 13 Apr 2004 15:32:36 -0500 (CDT) Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BDUaB-0007ji-00 for ; Tue, 13 Apr 2004 22:32:35 +0200 Original-Received: from d34-220.dsl.easysurfnet.de ([83.121.34.220]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Apr 2004 22:32:35 +0200 Original-Received: from schierlm-usenet by d34-220.dsl.easysurfnet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Apr 2004 22:32:35 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 52 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: d34-220.dsl.easysurfnet.de User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (windows-nt) Cancel-Lock: sha1:QWt5kF/wGmOl+Jshm77uOHBbItc= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:57007 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:57007 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?