[PATCH] configure: add --without-api-docs option
[notmuch-archives.git] / d8 / c7a48a27e7cb2fa91593f92a5d71a0898ba5a3
1 Return-Path: <prvs=jrosenthal=67314af46@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 90D18431FBC\r
6         for <notmuch@notmuchmail.org>; Fri,  5 Mar 2010 06:39:41 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -3.501\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-3.501 tagged_above=-999 required=5 tests=[AWL=0.498,\r
12         BAYES_50=0.001, RCVD_IN_DNSWL_MED=-4] 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 txtMhCmWzG+D for <notmuch@notmuchmail.org>;\r
16         Fri,  5 Mar 2010 06:39:40 -0800 (PST)\r
17 Received: from ipex1.johnshopkins.edu (ipex1.johnshopkins.edu [162.129.8.141])\r
18         by olra.theworths.org (Postfix) with ESMTP id 6F1BE431FAE\r
19         for <notmuch@notmuchmail.org>; Fri,  5 Mar 2010 06:39:40 -0800 (PST)\r
20 X-IronPort-AV: E=Sophos;i="4.49,587,1262581200"; d="scan'208";a="303227190"\r
21 Received: from c-69-255-36-229.hsd1.md.comcast.net (HELO lucky)\r
22         ([69.255.36.229])\r
23         by ipex1.johnshopkins.edu with ESMTP/TLS/AES256-SHA;\r
24         05 Mar 2010 09:39:28 -0500\r
25 Received: from jkr by lucky with local (Exim 4.69)\r
26         (envelope-from <jrosenthal@jhu.edu>)\r
27         id 1NnYgM-0004q1-7r; Fri, 05 Mar 2010 09:39:14 -0500\r
28 From: Jesse Rosenthal <jrosenthal@jhu.edu>\r
29 To: notmuch@notmuchmail.org\r
30 Date: Fri, 05 Mar 2010 09:39:14 -0500\r
31 Message-ID: <87pr3iygrx.fsf@jhu.edu>\r
32 MIME-Version: 1.0\r
33 Content-Type: text/plain; charset=us-ascii\r
34 Subject: [notmuch] auto-tagging replied messages\r
35 X-BeenThere: notmuch@notmuchmail.org\r
36 X-Mailman-Version: 2.1.13\r
37 Precedence: list\r
38 List-Id: "Use and development of the notmuch mail system."\r
39         <notmuch.notmuchmail.org>\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
43 List-Post: <mailto:notmuch@notmuchmail.org>\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
47 X-List-Received-Date: Fri, 05 Mar 2010 14:39:41 -0000\r
48 \r
49 Dear All,\r
50 \r
51 One element of traditional clients that I've missed in notmuch is the\r
52 ability to easily see which messages have been replied to. A look at the\r
53 thread structure will often make that clear, but for both searching and\r
54 syncing, an "answered" tag would be nice.\r
55 \r
56 To solve this, I have added the following to my .emacs, and I wanted to\r
57 share it in case others might find it useful. You can add an arbitrary\r
58 number of tags to the list "notmuch-answered-tags" and it will apply\r
59 them (or remove them) when the reply is sent. So you could use it to\r
60 automatically mark and email "answered" and remove it from the inbox, or\r
61 remove a "todo" or "reply_later" tag.\r
62 \r
63 This relies on the "In-Reply-To" header, so if that's not there, it\r
64 won't mark the original message. But then, if that's not there,\r
65 threading won't work either, so you'll have bigger problems in notmuch.\r
66 \r
67 Thanks to David, who took a look and offered some suggestions on IRC.\r
68 \r
69 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
70 \r
71 ;; A set of tags to be added or, if prefaced with a `-', removed\r
72 ;; e.g. (setq notmuch-answered-tags '("replied" "-todo" "-inbox"))\r
73 (setq notmuch-answered-tags '("answered"))\r
74 \r
75 (defun jkr/notmuch-mark-answered ()\r
76   ;; get the in-reply-to header and parse it for the message id. \r
77   (let ((rep (mail-header-parse-addresses (message-field-value "In-Reply-To"))))\r
78     (when (and notmuch-answered-tags rep)\r
79       ;; add a "+" to any tag that is doesn't already begin with a "+"\r
80       ;; or "-"\r
81       (let ((tags (mapcar '(lambda (str)\r
82                              (if (not (string-match "^[+-]" str))\r
83                                  (concat "+" str)\r
84                                str))\r
85                           notmuch-answered-tags)))\r
86         (apply 'notmuch-call-notmuch-process "tag"\r
87                (append tags (list (concat "id:" (car (car rep)))) nil))))))\r
88 \r
89 (add-hook 'message-sent-hook 'jkr/notmuch-mark-answered)\r
90 \r
91 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
92 \r
93 By the way, the reason that I didn't submit this as a patch to\r
94 notmuch.el is that I'm not sure how we want to deal with things that are\r
95 actually more about message-mode, and could possibly affect other\r
96 programs using message-mode (gnus). There are a couple of ways to deal\r
97 with this (e.g., notmuch minor-mode in message-mode, custom headers) but\r
98 my sense is that we should keep notmuch.el from being too imperious at\r
99 the moment.\r
100 \r
101 Best,\r
102 Jesse\r
103 \r
104 \r
105 \r