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 CAB1B431FC1 for ; Mon, 26 Apr 2010 20:08:39 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -4.2 X-Spam-Level: X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] autolearn=unavailable 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 bzw9lh1ohh7P for ; Mon, 26 Apr 2010 20:08:38 -0700 (PDT) Received: from ipex3.johnshopkins.edu (ipex3.johnshopkins.edu [128.220.161.140]) by olra.theworths.org (Postfix) with ESMTP id 152ED4196F2 for ; Mon, 26 Apr 2010 20:08:37 -0700 (PDT) X-IronPort-AV: E=Sophos;i="4.52,277,1270440000"; d="scan'208";a="380012497" Received: from c-69-255-36-229.hsd1.md.comcast.net (HELO lucky) ([69.255.36.229]) by ipex3.johnshopkins.edu with ESMTP/TLS/AES256-SHA; 26 Apr 2010 23:08:37 -0400 Received: from jkr by lucky with local (Exim 4.69) (envelope-from ) id 1O6bA3-00005y-FY; Mon, 26 Apr 2010 23:08:35 -0400 From: Jesse Rosenthal To: Sebastian Spaeth , Notmuch developer list Subject: [PATCH] emacs: Ensure that message-directory for Fcc has a trailing slash In-Reply-To: <87wrvtvfvq.fsf@jhu.edu> References: <1272270198-28357-4-git-send-email-Sebastian@SSpaeth.de> <87mxwpd9g8.fsf@jhu.edu> <87wrvtvfvq.fsf@jhu.edu> User-Agent: Notmuch/0.2-151-gec6d78a (http://notmuchmail.org) Emacs/23.1.1 (i486-pc-linux-gnu) Date: Mon, 26 Apr 2010 23:08:34 -0400 Message-ID: <87sk6hvbgt.fsf@jhu.edu> 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: Tue, 27 Apr 2010 03:08:39 -0000 Use `file-name-as-directory' to ensure that message-directory has a trailing slash so it can be combined with the notmuch-fcc-dirs correctly. --- emacs/notmuch-maildir-fcc.el | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el index 6d75b11..ecb65e7 100644 --- a/emacs/notmuch-maildir-fcc.el +++ b/emacs/notmuch-maildir-fcc.el @@ -71,7 +71,9 @@ (cdr (assoc-string (message-fetch-field "from") notmuch-fcc-dirs t)))) (if (eq subdir nil) (setq subdir (car (car notmuch-fcc-dirs)))) (unless (message-fetch-field "fcc") - (message-add-header (concat "Fcc: " message-directory subdir))) + (message-add-header (concat "Fcc: " + (file-name-as-directory message-directory) + subdir))) (let ((fcc-header (message-fetch-field "fcc"))) (unless (notmuch-maildir-fcc-dir-is-maildir-p fcc-header) (cond ((not (file-writable-p fcc-header)) -- 1.6.3.3