[PATCH 2/2] emacs: add stash thread-id function to notmuch-search mode
[notmuch-archives.git] / 4d / 6e01afe9e282b38102e8382ee399a594443526
1 Return-Path: <prvs=jrosenthal=72618203d@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 CAB1B431FC1\r
6         for <notmuch@notmuchmail.org>; Mon, 26 Apr 2010 20:08:39 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -4.2\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-4.2 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3] autolearn=unavailable\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 bzw9lh1ohh7P for <notmuch@notmuchmail.org>;\r
16         Mon, 26 Apr 2010 20:08:38 -0700 (PDT)\r
17 Received: from ipex3.johnshopkins.edu (ipex3.johnshopkins.edu\r
18         [128.220.161.140])\r
19         by olra.theworths.org (Postfix) with ESMTP id 152ED4196F2\r
20         for <notmuch@notmuchmail.org>; Mon, 26 Apr 2010 20:08:37 -0700 (PDT)\r
21 X-IronPort-AV: E=Sophos;i="4.52,277,1270440000"; d="scan'208";a="380012497"\r
22 Received: from c-69-255-36-229.hsd1.md.comcast.net (HELO lucky)\r
23         ([69.255.36.229])\r
24         by ipex3.johnshopkins.edu with ESMTP/TLS/AES256-SHA;\r
25         26 Apr 2010 23:08:37 -0400\r
26 Received: from jkr by lucky with local (Exim 4.69)\r
27         (envelope-from <jrosenthal@jhu.edu>)\r
28         id 1O6bA3-00005y-FY; Mon, 26 Apr 2010 23:08:35 -0400\r
29 From: Jesse Rosenthal <jrosenthal@jhu.edu>\r
30 To: Sebastian Spaeth <Sebastian@SSpaeth.de>,\r
31         Notmuch developer list <notmuch@notmuchmail.org>\r
32 Subject: [PATCH] emacs: Ensure that message-directory for Fcc has a trailing\r
33         slash\r
34 In-Reply-To: <87wrvtvfvq.fsf@jhu.edu>\r
35 References: <m3bpd8tpjk.fsf@x200.gr8dns.org>\r
36         <1272270198-28357-4-git-send-email-Sebastian@SSpaeth.de>\r
37         <87mxwpd9g8.fsf@jhu.edu> <87wrvtvfvq.fsf@jhu.edu>\r
38 User-Agent: Notmuch/0.2-151-gec6d78a (http://notmuchmail.org) Emacs/23.1.1\r
39         (i486-pc-linux-gnu)\r
40 Date: Mon, 26 Apr 2010 23:08:34 -0400\r
41 Message-ID: <87sk6hvbgt.fsf@jhu.edu>\r
42 MIME-Version: 1.0\r
43 Content-Type: text/plain; charset=us-ascii\r
44 X-BeenThere: notmuch@notmuchmail.org\r
45 X-Mailman-Version: 2.1.13\r
46 Precedence: list\r
47 List-Id: "Use and development of the notmuch mail system."\r
48         <notmuch.notmuchmail.org>\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
52 List-Post: <mailto:notmuch@notmuchmail.org>\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
56 X-List-Received-Date: Tue, 27 Apr 2010 03:08:39 -0000\r
57 \r
58 \r
59 Use `file-name-as-directory' to ensure that message-directory has a\r
60 trailing slash so it can be combined with the notmuch-fcc-dirs\r
61 correctly.\r
62 ---\r
63  emacs/notmuch-maildir-fcc.el |    4 +++-\r
64  1 files changed, 3 insertions(+), 1 deletions(-)\r
65 \r
66 diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el\r
67 index 6d75b11..ecb65e7 100644\r
68 --- a/emacs/notmuch-maildir-fcc.el\r
69 +++ b/emacs/notmuch-maildir-fcc.el\r
70 @@ -71,7 +71,9 @@\r
71            (cdr (assoc-string (message-fetch-field "from") notmuch-fcc-dirs t))))\r
72       (if (eq subdir nil) (setq subdir (car (car notmuch-fcc-dirs))))\r
73       (unless (message-fetch-field "fcc")\r
74 -       (message-add-header (concat "Fcc: " message-directory subdir)))\r
75 +       (message-add-header (concat "Fcc: " \r
76 +                                  (file-name-as-directory message-directory) \r
77 +                                  subdir)))\r
78       (let ((fcc-header (message-fetch-field "fcc")))\r
79       (unless (notmuch-maildir-fcc-dir-is-maildir-p fcc-header)\r
80         (cond ((not (file-writable-p fcc-header))\r
81 -- \r
82 1.6.3.3\r
83 \r