Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id CD7BD4196F2 for ; Thu, 22 Apr 2010 02:06:15 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.001 X-Spam-Level: X-Spam-Status: No, score=-0.001 tagged_above=-999 required=5 tests=[BAYES_20=-0.001] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JuH-KQ34sh+K for ; Thu, 22 Apr 2010 02:06:14 -0700 (PDT) Received: from homiemail-a19.g.dreamhost.com (caiajhbdcbef.dreamhost.com [208.97.132.145]) by olra.theworths.org (Postfix) with ESMTP id 7DE54431FC1 for ; Thu, 22 Apr 2010 02:06:14 -0700 (PDT) Received: from sspaeth.de (mtec-hg-docking-1-dhcp-204.ethz.ch [129.132.133.204]) (Authenticated sender: sebastian@sspaeth.de) by homiemail-a19.g.dreamhost.com (Postfix) with ESMTPA id A779B604061; Thu, 22 Apr 2010 02:06:06 -0700 (PDT) Received: by sspaeth.de (sSMTP sendmail emulation); Thu, 22 Apr 2010 11:06:04 +0200 From: "Sebastian Spaeth" To: Jesse Rosenthal , notmuch@notmuchmail.org Subject: Re: [notmuch] Fcc, Maildir, and Emacs message-mode -- a bit of code In-Reply-To: <873a1zs3t5.fsf@jhu.edu> References: <873a1zs3t5.fsf@jhu.edu> Date: Thu, 22 Apr 2010 11:06:04 +0200 Message-ID: <87ochbx3er.fsf@SSpaeth.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2010 09:06:16 -0000 As Carl stated that he would probably merge this one if someone tested it, here it comes: I tested it and it works great. When I define a non-existing directory as maildir it aborts with an error message that is visible to the user. I put this in a branch based on cworth/master and with Jesse's permission, I renamed the functions and did some further cleanup (It's also integrated in the build system) The git branch is here: http://github.com/spaetz/notmuch-all-feature/tree/feature/elisp-fcc It's not enabled by default. Enable it with: (setq message-fcc-handler-function '(lambda (destdir) (notmuch-maildir-fcc-write-buffer-to-maildir destdir t))) (add-hook 'message-send-hook '(lambda () (message-add-header "Fcc: ~/mail/INBOX.Sent"))) in your .emacs for now. I'll send the patch series by mail in a second. I have the slight problem that offlineimap takes the message from INBOX.Sent/cur and stuffs it in INBOX.Sent/new (but that cannot really be related to this as the mail ends up correctly in /cur after sending it). Sebastian