[feature request] emacs: use `notmuch insert` for FCC
[notmuch-archives.git] / 76 / 69279dff5a34ed0cbba62f5ed5f7a01d801d43
1 Return-Path: <jani@nikula.org>\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 22614431FDA\r
6         for <notmuch@notmuchmail.org>; Thu,  6 Sep 2012 08:32:58 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
9 X-Spam-Flag: NO\r
10 X-Spam-Score: -0.7\r
11 X-Spam-Level: \r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
13         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id Dc1QBNvQj2kd for <notmuch@notmuchmail.org>;\r
17         Thu,  6 Sep 2012 08:32:56 -0700 (PDT)\r
18 Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com\r
19         [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id DFF3C429E2F\r
22         for <notmuch@notmuchmail.org>; Thu,  6 Sep 2012 08:32:55 -0700 (PDT)\r
23 Received: by mail-lb0-f181.google.com with SMTP id gk1so1344042lbb.26\r
24         for <notmuch@notmuchmail.org>; Thu, 06 Sep 2012 08:32:55 -0700 (PDT)\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
26         d=google.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references\r
28         :in-reply-to:references:x-gm-message-state;\r
29         bh=Mkn9TK1sHf5CySfoiOCqgWqcUzogWz45q6lpv8KJebg=;\r
30         b=Nrxo3+A6Sb/0k5N2qsuK1eDgIb14GluaBaFMSCXijUiWTlfN465VBhHfKTkIRpsX4I\r
31         mtCPP5YWX3mBjbSkchfBWYWxizuhnVlNuQ8p5DoHZneCItKlYNiGUpSwq7PN+jRudtt2\r
32         zkEFFiOULoIVSUTc9zLEFIFb6nsKDNvZxX+g0iDbzDPI6SKK665brWuSe4/RCpUIbGhk\r
33         zymQLuWjgm+TYox4sWUKIbRamvPyqljgQXBn46vo8fNVoJ0rXoqctNXnxAAADgS/VPxO\r
34         uveaQERhfqKCutI36yHkthYNmOZaD9S4UllNtg0mp/eJH0uy4Sabxdbxfq6wXnO7IsQy\r
35         p9nQ==\r
36 Received: by 10.112.26.106 with SMTP id k10mr1022798lbg.100.1346945575441;\r
37         Thu, 06 Sep 2012 08:32:55 -0700 (PDT)\r
38 Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.\r
39         [80.223.81.27])\r
40         by mx.google.com with ESMTPS id p7sm488554lbg.17.2012.09.06.08.32.53\r
41         (version=SSLv3 cipher=OTHER); Thu, 06 Sep 2012 08:32:54 -0700 (PDT)\r
42 From: Jani Nikula <jani@nikula.org>\r
43 To: notmuch@notmuchmail.org\r
44 Subject: [PATCH v2 3/6] emacs: use new tag change helper to mark messages as\r
45         replied\r
46 Date: Thu,  6 Sep 2012 18:32:39 +0300\r
47 Message-Id:\r
48  <db3d1f28f4bb4444a0b913236fd05aed0055c6d3.1346945257.git.jani@nikula.org>\r
49 X-Mailer: git-send-email 1.7.9.5\r
50 In-Reply-To: <cover.1346945257.git.jani@nikula.org>\r
51 References: <cover.1346945257.git.jani@nikula.org>\r
52 In-Reply-To: <cover.1346945257.git.jani@nikula.org>\r
53 References: <cover.1346945257.git.jani@nikula.org>\r
54 X-Gm-Message-State:\r
55  ALoCoQlRxyKQPgTjN2E2ri2ug3DDD1cIwIVYKWl0KcwZ8nhZ5lYordMcaJK//kAoHlpGtZtgxzsw\r
56 Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Thu, 06 Sep 2012 15:32:58 -0000\r
70 \r
71 Clarify documentation while at it.\r
72 ---\r
73  emacs/notmuch-message.el |   24 ++++++++++--------------\r
74  1 file changed, 10 insertions(+), 14 deletions(-)\r
75 \r
76 diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el\r
77 index 3798046..4dc4883 100644\r
78 --- a/emacs/notmuch-message.el\r
79 +++ b/emacs/notmuch-message.el\r
80 @@ -23,14 +23,16 @@\r
81  (require 'notmuch-tag)\r
82  (require 'notmuch-mua)\r
83  \r
84 -(defcustom notmuch-message-replied-tags '("replied")\r
85 -  "Tags to be automatically added to or removed from a message when it is replied to.\r
86 -Any tag in the list will be added to a replied message or,\r
87 -if it is prefaced with a \"-\", removed.\r
88 +(defcustom notmuch-message-replied-tags '("+replied")\r
89 +  "List of tag changes to apply to a message when it has been replied to.\r
90 +\r
91 +Tags starting with \"+\" (or not starting with either \"+\" or\r
92 +\"-\") in the list will be added, and tags starting with \"-\"\r
93 +will be removed from the message being replied to.\r
94  \r
95  For example, if you wanted to add a \"replied\" tag and remove\r
96 -the \"inbox\" and \"todo\", you would set\r
97 -    (\"replied\" \"-inbox\" \"-todo\"\)"\r
98 +the \"inbox\" and \"todo\" tags, you would set:\r
99 +    (\"+replied\" \"-inbox\" \"-todo\"\)"\r
100    :type '(repeat string)\r
101    :group 'notmuch-send)\r
102  \r
103 @@ -38,14 +40,8 @@ the \"inbox\" and \"todo\", you would set\r
104    ;; get the in-reply-to header and parse it for the message id.\r
105    (let ((rep (mail-header-parse-addresses (message-field-value "In-Reply-To"))))\r
106      (when (and notmuch-message-replied-tags rep)\r
107 -      ;; add a "+" to any tag that is doesn't already begin with a "+"\r
108 -      ;; or "-"\r
109 -      (let ((tags (mapcar (lambda (str)\r
110 -                           (if (not (string-match "^[+-]" str))\r
111 -                               (concat "+" str)\r
112 -                             str))\r
113 -                         notmuch-message-replied-tags)))\r
114 -       (funcall 'notmuch-tag (notmuch-id-to-query (car (car rep))) tags)))))\r
115 +      (funcall 'notmuch-tag (notmuch-id-to-query (car (car rep)))\r
116 +              (notmuch-tag-change-list notmuch-message-replied-tags)))))\r
117  \r
118  (add-hook 'message-send-hook 'notmuch-message-mark-replied)\r
119  \r
120 -- \r
121 1.7.9.5\r
122 \r