[PATCH] emacs: Ensure that message-directory for Fcc has a trailing slash
authorJesse Rosenthal <jrosenthal@jhu.edu>
Tue, 27 Apr 2010 03:08:34 +0000 (23:08 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:57 +0000 (09:36 -0800)
4d/6e01afe9e282b38102e8382ee399a594443526 [new file with mode: 0644]

diff --git a/4d/6e01afe9e282b38102e8382ee399a594443526 b/4d/6e01afe9e282b38102e8382ee399a594443526
new file mode 100644 (file)
index 0000000..b2d901a
--- /dev/null
@@ -0,0 +1,83 @@
+Return-Path: <prvs=jrosenthal=72618203d@jhu.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id CAB1B431FC1\r
+       for <notmuch@notmuchmail.org>; Mon, 26 Apr 2010 20:08:39 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -4.2\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5\r
+       tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] autolearn=unavailable\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id bzw9lh1ohh7P for <notmuch@notmuchmail.org>;\r
+       Mon, 26 Apr 2010 20:08:38 -0700 (PDT)\r
+Received: from ipex3.johnshopkins.edu (ipex3.johnshopkins.edu\r
+       [128.220.161.140])\r
+       by olra.theworths.org (Postfix) with ESMTP id 152ED4196F2\r
+       for <notmuch@notmuchmail.org>; Mon, 26 Apr 2010 20:08:37 -0700 (PDT)\r
+X-IronPort-AV: E=Sophos;i="4.52,277,1270440000"; d="scan'208";a="380012497"\r
+Received: from c-69-255-36-229.hsd1.md.comcast.net (HELO lucky)\r
+       ([69.255.36.229])\r
+       by ipex3.johnshopkins.edu with ESMTP/TLS/AES256-SHA;\r
+       26 Apr 2010 23:08:37 -0400\r
+Received: from jkr by lucky with local (Exim 4.69)\r
+       (envelope-from <jrosenthal@jhu.edu>)\r
+       id 1O6bA3-00005y-FY; Mon, 26 Apr 2010 23:08:35 -0400\r
+From: Jesse Rosenthal <jrosenthal@jhu.edu>\r
+To: Sebastian Spaeth <Sebastian@SSpaeth.de>,\r
+       Notmuch developer list <notmuch@notmuchmail.org>\r
+Subject: [PATCH] emacs: Ensure that message-directory for Fcc has a trailing\r
+       slash\r
+In-Reply-To: <87wrvtvfvq.fsf@jhu.edu>\r
+References: <m3bpd8tpjk.fsf@x200.gr8dns.org>\r
+       <1272270198-28357-4-git-send-email-Sebastian@SSpaeth.de>\r
+       <87mxwpd9g8.fsf@jhu.edu> <87wrvtvfvq.fsf@jhu.edu>\r
+User-Agent: Notmuch/0.2-151-gec6d78a (http://notmuchmail.org) Emacs/23.1.1\r
+       (i486-pc-linux-gnu)\r
+Date: Mon, 26 Apr 2010 23:08:34 -0400\r
+Message-ID: <87sk6hvbgt.fsf@jhu.edu>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 27 Apr 2010 03:08:39 -0000\r
+\r
+\r
+Use `file-name-as-directory' to ensure that message-directory has a\r
+trailing slash so it can be combined with the notmuch-fcc-dirs\r
+correctly.\r
+---\r
+ emacs/notmuch-maildir-fcc.el |    4 +++-\r
+ 1 files changed, 3 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el\r
+index 6d75b11..ecb65e7 100644\r
+--- a/emacs/notmuch-maildir-fcc.el\r
++++ b/emacs/notmuch-maildir-fcc.el\r
+@@ -71,7 +71,9 @@\r
+           (cdr (assoc-string (message-fetch-field "from") notmuch-fcc-dirs t))))\r
+      (if (eq subdir nil) (setq subdir (car (car notmuch-fcc-dirs))))\r
+      (unless (message-fetch-field "fcc")\r
+-       (message-add-header (concat "Fcc: " message-directory subdir)))\r
++       (message-add-header (concat "Fcc: " \r
++                                 (file-name-as-directory message-directory) \r
++                                 subdir)))\r
+      (let ((fcc-header (message-fetch-field "fcc")))\r
+      (unless (notmuch-maildir-fcc-dir-is-maildir-p fcc-header)\r
+        (cond ((not (file-writable-p fcc-header))\r
+-- \r
+1.6.3.3\r
+\r