From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68503 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.gnus.general Subject: Re: Abandoning the concept of groups as a storage medium? Date: Wed, 29 Apr 2009 12:58:50 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1241002837 9380 80.91.229.12 (29 Apr 2009 11:00:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Apr 2009 11:00:37 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M16936@lists.math.uh.edu Wed Apr 29 13:00:28 2009 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lz7WD-0001KG-KV for ding-account@gmane.org; Wed, 29 Apr 2009 13:00:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Lz7VP-0003gR-S2; Wed, 29 Apr 2009 05:59:11 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Lz7VN-0003g5-QT for ding@lists.math.uh.edu; Wed, 29 Apr 2009 05:59:09 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1Lz7VH-00023j-CQ for ding@lists.math.uh.edu; Wed, 29 Apr 2009 05:59:09 -0500 Original-Received: from m61s02.vlinux.de ([83.151.21.164]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1Lz7Vi-0001BL-00 for ; Wed, 29 Apr 2009 12:59:30 +0200 Original-Received: from [134.76.4.218] (helo=Macintosh.local) by m61s02.vlinux.de with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1Lz7VB-0001Db-PU for ding@gnus.org; Wed, 29 Apr 2009 12:58:57 +0200 In-Reply-To: (David Engster's message of "Tue, 28 Apr 2009 10:56:39 +0200") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.92 (darwin) Mail-Copies-To: never Mail-Followup-To: ding@gnus.org X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:68503 Archived-At: --=-=-= David Engster writes: > Jan Rychter 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=nnmairix-nnml-patch.diff 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")) --=-=-=--