Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / 95 / 63d28650af4b552f38d85ff605d98bcfc0f3f2
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 A962E4196F0\r
6         for <notmuch@notmuchmail.org>; Tue, 27 Apr 2010 10:19:34 -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=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 2JnuF9XrBY1F for <notmuch@notmuchmail.org>;\r
16         Tue, 27 Apr 2010 10:19:33 -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 B0D68431FC1\r
20         for <notmuch@notmuchmail.org>; Tue, 27 Apr 2010 10:19:33 -0700 (PDT)\r
21 X-IronPort-AV: E=Sophos;i="4.52,282,1270440000"; d="scan'208";a="380330369"\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         27 Apr 2010 13:19:33 -0400\r
26 Received: from jkr by lucky with local (Exim 4.69)\r
27         (envelope-from <jrosenthal@jhu.edu>)\r
28         id 1O6oRX-00030g-R4; Tue, 27 Apr 2010 13:19:31 -0400\r
29 From: Jesse Rosenthal <jrosenthal@jhu.edu>\r
30 To: Notmuch developer list <notmuch@notmuchmail.org>\r
31 Subject: [PATCH 2/3] emacs: Add customization and hook for tach-mode to\r
32         notmuch-message.el\r
33 In-Reply-To: <878w88ke5s.fsf@jhu.edu>\r
34 References: <878w88ke5s.fsf@jhu.edu>\r
35 User-Agent: Notmuch/0.3 (http://notmuchmail.org) Emacs/23.1.1\r
36         (i486-pc-linux-gnu)\r
37 Date: Tue, 27 Apr 2010 13:19:31 -0400\r
38 Message-ID: <87633cke3g.fsf@jhu.edu>\r
39 MIME-Version: 1.0\r
40 Content-Type: text/plain; charset=us-ascii\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Tue, 27 Apr 2010 17:19:34 -0000\r
54 \r
55 \r
56 This adds a customization option "notmuch-message-attachment-interface" to\r
57 notmuch-message.el. If set to t, tach-mode will be used as an attachment\r
58 interface for composing in message mode. If set to nil, it will not be\r
59 used. The default is nil, but if people like it, we can default to t in\r
60 the future.\r
61 \r
62 This also adds a hook to message-mode, which only loads tach and adds the\r
63 minor mode if the customization is set. In the future, this will likely be\r
64 changed to a hook for notmuch-message-mode.\r
65 ---\r
66  emacs/notmuch-message.el |   19 +++++++++++++++++++\r
67  1 files changed, 19 insertions(+), 0 deletions(-)\r
68 \r
69 diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el\r
70 index d5c96c2..094d3fc 100644\r
71 --- a/emacs/notmuch-message.el\r
72 +++ b/emacs/notmuch-message.el\r
73 @@ -33,6 +33,17 @@ the \"inbox\" and \"todo\", you would set\r
74    :type 'list\r
75    :group 'notmuch)\r
76  \r
77 +(defcustom notmuch-message-attachment-interface nil\r
78 +  "Whether or not to use a menu-based user-interface for attaching messages, rather than mml-mode\r
79 +\r
80 +If this is non-nil, the tach minor-mode for attachments will be added.\r
81 +The user can add attachments by pressing `C-cC-a' in message-mode,\r
82 +or by typing `tach-goto'. Any attachments will be converted to mml-markup\r
83 +prior to sending."\r
84 +  :type 'boolean\r
85 +  :group 'notmuch)\r
86 +  \r
87 +\r
88  (defun notmuch-message-mark-replied ()\r
89    ;; get the in-reply-to header and parse it for the message id.\r
90    (let ((rep (mail-header-parse-addresses (message-field-value "In-Reply-To"))))\r
91 @@ -49,4 +60,12 @@ the \"inbox\" and \"todo\", you would set\r
92  \r
93  (add-hook 'message-send-hook 'notmuch-message-mark-replied)\r
94  \r
95 +(add-hook 'message-mode-hook '(lambda ()\r
96 +                               (when notmuch-message-attachment-interface\r
97 +                                 (require 'tach)\r
98 +                                 (tach-minor-mode))))\r
99 +                               \r
100 +\r
101 +                       \r
102 +\r
103  (provide 'notmuch-message)\r
104 -- \r
105 1.6.3.3\r
106 \r