Re: [feature request] emacs: use `notmuch insert` for FCC
[notmuch-archives.git] / b5 / 5450ef62d255caf838e8aea8375c790ca42a62
1 Return-Path: <markwalters1009@gmail.com>\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 45FFD431FC0\r
6         for <notmuch@notmuchmail.org>; Sat, 28 Apr 2012 17:06:36 -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: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id LXxyojUmPJaq for <notmuch@notmuchmail.org>;\r
18         Sat, 28 Apr 2012 17:06:35 -0700 (PDT)\r
19 Received: from mail-we0-f181.google.com (mail-we0-f181.google.com\r
20         [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id A1B92431FAE\r
23         for <notmuch@notmuchmail.org>; Sat, 28 Apr 2012 17:06:35 -0700 (PDT)\r
24 Received: by werm13 with SMTP id m13so1420031wer.26\r
25         for <notmuch@notmuchmail.org>; Sat, 28 Apr 2012 17:06:34 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
28         bh=GYkBzW2NW7GNllB69VmV8L43QIIgGBt7aGIuXAkVU50=;\r
29         b=RwzRHEovdJRwDo3USJhqYnDHdb6E2ordwH6vsvhSXGVQ/0ZGs4WkkSsz9s3z4vIaxh\r
30         0rrl9HezLxeClMpUnZB8+VXHWfVq+iavv8ZXT7Bqmx5O63D5+G9vPnw5vWPeh14O96Ee\r
31         +vhteQX8l8rKshQ8zvcRzn5dx2lT58a9N61At2twUFcXRuI4SQTxRAaBLLYKGIl0WOHV\r
32         4Q7wocyLoDDmn0BfCdN0N8k4YHoJvdD5B0bnLXlEhAVMpOTM7qnAEb3R7ybU5TbpUQvr\r
33         GbS65NsAAXpFLjooGr3mmZcJEdKlUGt73IQxG7JvxH69mqlrolyXPjqpiBGsZ1JVJzEO\r
34         wRFg==\r
35 Received: by 10.216.136.100 with SMTP id v78mr5521608wei.88.1335657994264;\r
36         Sat, 28 Apr 2012 17:06:34 -0700 (PDT)\r
37 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
38  [94.192.233.223])      by mx.google.com with ESMTPS id\r
39  ca3sm16566793wib.6.2012.04.28.17.06.33 (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Sat, 28 Apr 2012 17:06:33 -0700 (PDT)\r
41 From: Mark Walters <markwalters1009@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [Patch v4 1/3] emacs: split notmuch-show-apply-state\r
44 Date: Sun, 29 Apr 2012 01:06:44 +0100\r
45 Message-Id: <1335658006-20161-2-git-send-email-markwalters1009@gmail.com>\r
46 X-Mailer: git-send-email 1.7.9.1\r
47 In-Reply-To: <1335658006-20161-1-git-send-email-markwalters1009@gmail.com>\r
48 References: <1335658006-20161-1-git-send-email-markwalters1009@gmail.com>\r
49 X-BeenThere: notmuch@notmuchmail.org\r
50 X-Mailman-Version: 2.1.13\r
51 Precedence: list\r
52 List-Id: "Use and development of the notmuch mail system."\r
53         <notmuch.notmuchmail.org>\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
57 List-Post: <mailto:notmuch@notmuchmail.org>\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
61 X-List-Received-Date: Sun, 29 Apr 2012 00:06:36 -0000\r
62 \r
63 Separate out a notmuch-show-goto-msg-id sub-function from\r
64 notmuch-show-apply-state. There should be no functional change but the\r
65 next patch will call the new function.\r
66 ---\r
67  emacs/notmuch-show.el |   18 +++++++++++-------\r
68  1 files changed, 11 insertions(+), 7 deletions(-)\r
69 \r
70 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
71 index 30b26d1..3bd9a64 100644\r
72 --- a/emacs/notmuch-show.el\r
73 +++ b/emacs/notmuch-show.el\r
74 @@ -1085,6 +1085,16 @@ This includes:\r
75   - the current message."\r
76    (list (notmuch-show-get-message-id) (notmuch-show-get-message-ids-for-open-messages)))\r
77  \r
78 +(defun notmuch-show-goto-message (msg-id)\r
79 +  "Go to message with msg-id."\r
80 +  (goto-char (point-min))\r
81 +  (unless (loop if (string= msg-id (notmuch-show-get-message-id))\r
82 +               return t\r
83 +               until (not (notmuch-show-goto-message-next)))\r
84 +    (goto-char (point-min))\r
85 +    (message "Message-id not found."))\r
86 +  (notmuch-show-message-adjust))\r
87 +\r
88  (defun notmuch-show-apply-state (state)\r
89    "Apply STATE to the current buffer.\r
90  \r
91 @@ -1102,13 +1112,7 @@ This includes:\r
92           until (not (notmuch-show-goto-message-next)))\r
93  \r
94      ;; Go to the previously open message.\r
95 -    (goto-char (point-min))\r
96 -    (unless (loop if (string= current (notmuch-show-get-message-id))\r
97 -                 return t\r
98 -                 until (not (notmuch-show-goto-message-next)))\r
99 -      (goto-char (point-min))\r
100 -      (message "Previously current message not found."))\r
101 -    (notmuch-show-message-adjust)))\r
102 +    (notmuch-show-goto-message current)))\r
103  \r
104  (defun notmuch-show-refresh-view (&optional reset-state)\r
105    "Refresh the current view.\r
106 -- \r
107 1.7.9.1\r
108 \r