all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Magnus Henoch <magnus.henoch@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 8055@debbugs.gnu.org
Subject: bug#8055: Patch for handling Maildir flags in nnmaildir
Date: Wed, 05 Sep 2012 19:12:38 +0100	[thread overview]
Message-ID: <m2ipbs72zt.fsf@gmail.com> (raw)
In-Reply-To: <87wr08d3o7.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 05 Sep 2012 15:01:28 +0200")

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Lars Ingebrigtsen <larsi@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...)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nnmaildir-fix.patch --]
[-- Type: text/x-patch, Size: 1704 bytes --]

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))

  reply	other threads:[~2012-09-05 18:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-16 14:24 bug#8055: 24.0.50; [nnmaildir/Gnus] please support in-filename Maildir flags Luca Capello
2011-06-29 23:34 ` Lars Magne Ingebrigtsen
2011-06-29 23:47   ` Glenn Morris
2011-06-29 23:53     ` Lars Magne Ingebrigtsen
2011-06-30 19:27       ` Stefan Monnier
2011-06-30 19:53         ` Lars Magne Ingebrigtsen
2011-06-30 21:36           ` Stefan Monnier
2011-07-06 13:36   ` Luca Capello
2012-08-11 18:25 ` bug#8055: Patch for handling Maildir flags in nnmaildir Magnus Henoch
2012-09-05 12:57   ` Lars Ingebrigtsen
2012-09-05 13:01     ` Lars Ingebrigtsen
2012-09-05 18:12       ` Magnus Henoch [this message]
2012-09-05 22:30         ` Lars Ingebrigtsen
2012-08-26  2:49 ` bug#8055: Review of Bug#8055 patch Chong Yidong
2012-09-03 16:09   ` Lars Ingebrigtsen
     [not found]   ` <87r4qj2imn.fsf@gnus.org>
2012-09-04  6:50     ` Zweimueller Wolfgang
     [not found]     ` <w7s7gsae0yr.fsf@salk.at>
2012-09-05  8:17       ` Magnus Henoch
2012-09-05 10:33         ` Zweimueller Wolfgang

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=m2ipbs72zt.fsf@gmail.com \
    --to=magnus.henoch@gmail.com \
    --cc=8055@debbugs.gnu.org \
    --cc=larsi@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.