From: David Engster <deng@randomsample.de>
To: ding@gnus.org
Subject: Re: Abandoning the concept of groups as a storage medium?
Date: Wed, 29 Apr 2009 12:58:50 +0200 [thread overview]
Message-ID: <m2eivbsp3p.fsf@randomsample.de> (raw)
In-Reply-To: <m2prex2m2g.fsf@randomsample.de> (David Engster's message of "Tue, 28 Apr 2009 10:56:39 +0200")
[-- Attachment #1: Type: text/plain, Size: 815 bytes --]
David Engster <deng@randomsample.de> writes:
> Jan Rychter <jan@rychter.com> writes:
>> Then I discovered mairix and nnmairix. They are close to what I need,
>> but there is the issue of flag propagation, which nnmairix doesn't do
>> for an NNML spool.
>
> I have fixed this. I'll send you a patch soon, but I want to test this a
> bit further. nnml is tricky, because it can save marks in .newsrc.eld as
> well as the .marks files.
OK, here it is. Please apply the attached patch against nnmairix from
the current Gnus CVS.
You do not need a patched mairix for using this. Just activate marks
propagation for one of your mairix groups and see what happens. I
couldn't really test this in depth, so you better have a backup of your
mails in case nnmairix messes up your marks or the active file.
Regards,
David
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nnmairix-nnml-patch.diff --]
[-- Type: text/x-patch, Size: 2644 bytes --]
Index: nnmairix.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/nnmairix.el,v
retrieving revision 7.13
diff -u -r7.13 nnmairix.el
--- nnmairix.el 22 Jan 2009 07:02:16 -0000 7.13
+++ nnmairix.el 29 Apr 2009 10:54:13 -0000
@@ -522,7 +522,7 @@
(when (eq nnmairix-backend 'nnml)
(when nnmairix-rename-files-for-nnml
(nnmairix-rename-files-consecutively mfolder))
- (nnml-generate-nov-databases-directory mfolder))
+ (nnml-generate-nov-databases-directory mfolder nil t))
(nnmairix-call-backend
"request-scan" folder nnmairix-backend-server)
(if (and fast allowfast)
@@ -936,7 +936,8 @@
If PROPMARKS is a positive number, set parameter to t.
If PROPMARKS is a negative number, set it to nil."
(interactive)
- (unless (nnmairix-check-mairix-version "maildirpatch")
+ (unless (or (eq nnmairix-backend 'nnml)
+ (nnmairix-check-mairix-version "maildirpatch"))
(error "You need a mairix binary with maildir patch to use this feature. See docs for details"))
(let ((group (gnus-group-group-name)))
(when (or (not (string= (gnus-group-short-name group)
@@ -1154,12 +1155,18 @@
(if nnmairix-marks-cache
(let (number ogroup number-cache method mid-marks temp)
;; first we get the article numbers
- (catch 'problem
- (while (setq ogroup (pop nnmairix-marks-cache))
+ (while (setq ogroup (pop nnmairix-marks-cache))
+ (catch 'problem
(while (setq mid-marks (pop (cdr ogroup)))
(setq number
- (cdr
- (gnus-request-head (car mid-marks) (car ogroup))))
+ (if (eq nnmairix-backend 'nnml)
+ (with-temp-buffer
+ (nnml-find-id (gnus-group-short-name (car ogroup))
+ (car mid-marks)
+ (gnus-group-server (car ogroup))))
+ (cdr
+ (nnmairix-call-backend 'request-head
+ (gnus-request-head (car mid-marks) (car ogroup))))))
(unless number
(nnheader-message
3 "Unable to set mark: couldn't determine article number for %s in %s"
@@ -1187,6 +1194,13 @@
(gnus-group-short-name (car cur))
(cdr cur)
(list (nth 1 method)))
+ ;; This a hack to enforce a reread of the .marks file
+ (when (and (eq nnmairix-backend 'nnml)
+ (not (cdr-safe (assoc 'nnml-marks-is-evil method))))
+ (let ((file (nnml-group-pathname (gnus-group-short-name (car cur))
+ nnml-marks-file-name
+ (gnus-group-server (car cur)))))
+ (gnus-sethash file nil nnml-marks-modtime)))
(gnus-group-jump-to-group (car cur))
(gnus-group-get-new-news-this-group)))
(nnheader-message 5 "nnmairix: Propagating marks... done"))
next prev parent reply other threads:[~2009-04-29 10:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-25 10:05 Jan Rychter
2009-04-28 8:56 ` David Engster
2009-04-29 10:58 ` David Engster [this message]
2009-04-30 19:27 ` Ted Zlatanov
2009-05-04 11:07 ` David Engster
2009-05-08 18:18 ` Ted Zlatanov
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=m2eivbsp3p.fsf@randomsample.de \
--to=deng@randomsample.de \
--cc=ding@gnus.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).