1 Return-Path: <jrosenthal@jhu.edu>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id C7232431FBC
\r
6 for <notmuch@notmuchmail.org>; Thu, 21 Jan 2010 10:36:50 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.391 tagged_above=-999 required=5
\r
12 tests=[AWL=-0.392, BAYES_50=0.001] autolearn=ham
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id uA8onqIV5nJ4 for <notmuch@notmuchmail.org>;
\r
16 Thu, 21 Jan 2010 10:36:50 -0800 (PST)
\r
17 Received: from batman.acm.jhu.edu (batman.acm.jhu.edu [128.220.251.35])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 23DC8431FAE
\r
19 for <notmuch@notmuchmail.org>; Thu, 21 Jan 2010 10:36:50 -0800 (PST)
\r
20 Received: from batman.acm.jhu.edu (localhost.localdomain [127.0.0.1])
\r
21 by batman.acm.jhu.edu (Postfix) with ESMTP id 7A996CED7B;
\r
22 Thu, 21 Jan 2010 13:36:47 -0500 (EST)
\r
23 Received: by batman.acm.jhu.edu (Postfix, from userid 99)
\r
24 id 6FAE6CEE4E; Thu, 21 Jan 2010 13:36:47 -0500 (EST)
\r
25 Received: from lucky (c-69-255-36-229.hsd1.md.comcast.net [69.255.36.229])
\r
26 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
\r
27 (Client did not present a certificate)
\r
28 by batman.acm.jhu.edu (Postfix) with ESMTPSA id B1AFCCED7B;
\r
29 Thu, 21 Jan 2010 13:36:43 -0500 (EST)
\r
30 Received: by lucky (Postfix, from userid 1000)
\r
31 id 9273433475F; Thu, 21 Jan 2010 13:36:38 -0500 (EST)
\r
32 From: Jesse Rosenthal <jrosenthal@jhu.edu>
\r
33 To: notmuch@notmuchmail.org
\r
34 Date: Thu, 21 Jan 2010 13:36:38 -0500
\r
35 Message-ID: <873a1zs3t5.fsf@jhu.edu>
\r
37 Content-Type: text/plain; charset=us-ascii
\r
38 X-Virus-Scanned: ClamAV using ClamSMTP
\r
39 Subject: [notmuch] Fcc, Maildir, and Emacs message-mode -- a bit of code
\r
40 X-BeenThere: notmuch@notmuchmail.org
\r
41 X-Mailman-Version: 2.1.13
\r
43 List-Id: "Use and development of the notmuch mail system."
\r
44 <notmuch.notmuchmail.org>
\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
48 List-Post: <mailto:notmuch@notmuchmail.org>
\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
52 X-List-Received-Date: Thu, 21 Jan 2010 18:36:50 -0000
\r
57 First of all, many thanks to Carl and others for writing notmuch.
\r
59 Some folks on IRC were bemoaning message-mode's annoying inability to
\r
60 save sent-mail to a Maildir using Fcc. I mentioned that I had written a
\r
61 bit of Maildir elisp code for that purpose a while back, and it was
\r
62 suggested that I share it with the list.
\r
66 - I've tested this a good number of times, but not very robustly, since
\r
67 I don't actually use it (I found that I prefer blind-copying
\r
68 myself). Please test it out somewhere safe, on a maildir you can
\r
71 - The hardlinking performed by `add-name-to-file' might be platform and
\r
72 filesystem specific. I'm using linux/ext3, and it works here. I don't
\r
73 know what will happen anywhere else.
\r
75 - I imagine there's a much better implementation inside of Wanderlust,
\r
76 if you can dig through all the libraries.
\r
78 - It's not really commented, but I hope the function names are pretty
\r
81 - It requires that the directory in the `Fcc:' header already exist and
\r
82 be a maildir (i.e. have cur/, new/, and tmp/). It should be pretty
\r
83 simple to add in a prompt for creating a directory if it points to a
\r
88 http://jkr.acm.jhu.edu/jkr-maildir.el
\r
90 To use it, set one of the following:
\r
92 If you want Fcc'd messages to be marked as read:
\r
94 (setq message-fcc-handler-function
\r
96 (jkr/maildir-write-buffer-to-maildir destdir t)))
\r
98 If you want Fcc'd messages to be marked as new:
\r
100 (setq message-fcc-handler-function
\r
101 '(lambda (destdir)
\r
102 (jkr/maildir-write-buffer-to-maildir destdir nil)))
\r