GNU bug report logs - #8055
24.0.50; [nnmaildir/Gnus] please support in-filename Maildir flags

Previous Next

Packages: emacs, gnus;

Reported by: Luca Capello <luca <at> pca.it>

Date: Wed, 16 Feb 2011 14:16:02 UTC

Severity: wishlist

Tags: fixed, patch

Found in version 24.0.50

Fixed in version 24.3

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Magnus Henoch <magnus.henoch <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 8055 <at> debbugs.gnu.org
Subject: bug#8055: Patch for handling Maildir flags in nnmaildir
Date: Wed, 05 Sep 2012 19:12:38 +0100
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> Thanks; I've now applied this patch to Ma Gnus.
>
> Compilation gives this error, though:
>
> nnmaildir.el:130:1:Error: (nnmaildir--art-suffix article) is not a valid place expression

Right, nnmaildir--article-set-flags needs to be defined below the
nnmaildir--art defstruct.  (Spending too much time inside emacs
recompiling things incrementally can be a bad thing...)

[nnmaildir-fix.patch (text/x-patch, inline)]
diff --git a/lisp/nnmaildir.el b/lisp/nnmaildir.el
index caf2820..c5df510 100644
--- a/lisp/nnmaildir.el
+++ b/lisp/nnmaildir.el
@@ -127,16 +127,6 @@ SUFFIX should start with \":2,\"."
 	 (new-flags (concat (delq flag flags-as-list))))
     (concat ":2," new-flags)))
 
-(defun nnmaildir--article-set-flags (article new-suffix curdir)
-  (let* ((prefix (nnmaildir--art-prefix article))
-	 (suffix (nnmaildir--art-suffix article))
-	 (article-file (concat curdir prefix suffix))
-	 (new-name (concat curdir prefix new-suffix)))
-    (unless (file-exists-p article-file)
-      (error "Couldn't find article file %s" article-file))
-    (rename-file article-file new-name 'replace)
-    (setf (nnmaildir--art-suffix article) new-suffix)))
-
 (defvar nnmaildir-article-file-name nil
   "*The filename of the most recently requested article.  This variable is set
 by nnmaildir-request-article.")
@@ -212,6 +202,16 @@ by nnmaildir-request-article.")
   (gnm        	 nil)                      ;; flag: split from mail-sources?
   (target-prefix nil :type string))        ;; symlink target prefix
 
+(defun nnmaildir--article-set-flags (article new-suffix curdir)
+  (let* ((prefix (nnmaildir--art-prefix article))
+	 (suffix (nnmaildir--art-suffix article))
+	 (article-file (concat curdir prefix suffix))
+	 (new-name (concat curdir prefix new-suffix)))
+    (unless (file-exists-p article-file)
+      (error "Couldn't find article file %s" article-file))
+    (rename-file article-file new-name 'replace)
+    (setf (nnmaildir--art-suffix article) new-suffix)))
+
 (defun nnmaildir--expired-article (group article)
   (setf (nnmaildir--art-nov article) nil)
   (let ((flist  (nnmaildir--grp-flist group))

This bug report was last modified 12 years and 282 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.