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 arlo.cworth.org (Postfix) with ESMTP id 893E26DE13CC
\r
6 for <notmuch@notmuchmail.org>; Sat, 13 Jun 2015 01:08:21 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=0.36 tagged_above=-999 required=5 tests=[AWL=0.930,
\r
12 DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
\r
14 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01,
\r
15 RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled
\r
16 Received: from arlo.cworth.org ([127.0.0.1])
\r
17 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
18 with ESMTP id 1Zr_ntRvlP2q for <notmuch@notmuchmail.org>;
\r
19 Sat, 13 Jun 2015 01:08:19 -0700 (PDT)
\r
20 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com
\r
22 by arlo.cworth.org (Postfix) with ESMTPS id 7DC296DE0948
\r
23 for <notmuch@notmuchmail.org>; Sat, 13 Jun 2015 01:08:19 -0700 (PDT)
\r
24 Received: by wiwd19 with SMTP id d19so34376595wiw.0
\r
25 for <notmuch@notmuchmail.org>; Sat, 13 Jun 2015 01:08:18 -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:in-reply-to:references;
\r
28 bh=tgqlQKTBy2YvwWWyEg35QHhem87c/FVNaTBV+k3/aes=;
\r
29 b=a/0/E9ZqIt0ulZsDgRCc5fOXn32YM+jdWtiCCOVxl2Usom7HV+sKD6uTIiowF8idcT
\r
30 M3peEKT2AKzkiaPzvFm3d1N7XKVMDKN0k5kKAHe7mZhmYdVSHAA65tSTxgyySFS3Oqxt
\r
31 1yCAH4BR4FEU1LQBjbEOP/iBPxgUSEFY8BYSmZ62ymBBh80JtAh8K3CdmCcnf1bNAMC3
\r
32 rHAQvtc/RG0k47k7ssgHMFJstSZmL9zmpH8uoRnCDBtflCHe/251q8XF68tryaV7TYXw
\r
33 Ij3/VyyOpA9QMd+0F4dI+7NT7Xtfx+7uwQ6BN3tW9vzskreeM5BH5mRQQS2nEMO9x+Wn
\r
35 X-Received: by 10.194.203.138 with SMTP id
\r
36 kq10mr32636800wjc.124.1434182897993; Sat, 13 Jun 2015 01:08:17 -0700 (PDT)
\r
37 Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162])
\r
38 by mx.google.com with ESMTPSA id gz3sm6837975wib.0.2015.06.13.01.08.16
\r
39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
\r
40 Sat, 13 Jun 2015 01:08:17 -0700 (PDT)
\r
41 From: Mark Walters <markwalters1009@gmail.com>
\r
42 To: notmuch@notmuchmail.org
\r
43 Subject: [PATCH v5 1/3] emacs: split notmuch-show-apply-state
\r
44 Date: Sat, 13 Jun 2015 09:08:08 +0100
\r
45 Message-Id: <1434182890-8047-2-git-send-email-markwalters1009@gmail.com>
\r
46 X-Mailer: git-send-email 2.1.4
\r
47 In-Reply-To: <1434182890-8047-1-git-send-email-markwalters1009@gmail.com>
\r
48 References: <1434182890-8047-1-git-send-email-markwalters1009@gmail.com>
\r
49 X-BeenThere: notmuch@notmuchmail.org
\r
50 X-Mailman-Version: 2.1.18
\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: Sat, 13 Jun 2015 08:08:21 -0000
\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
67 emacs/notmuch-show.el | 18 +++++++++++-------
\r
68 1 file changed, 11 insertions(+), 7 deletions(-)
\r
70 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
71 index 2a53461..a978d3c 100644
\r
72 --- a/emacs/notmuch-show.el
\r
73 +++ b/emacs/notmuch-show.el
\r
74 @@ -1281,6 +1281,16 @@ (defun notmuch-show-get-query ()
\r
76 notmuch-show-thread-id))
\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
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
88 (defun notmuch-show-apply-state (state)
\r
89 "Apply STATE to the current buffer.
\r
91 @@ -1298,13 +1308,7 @@ (defun notmuch-show-apply-state (state)
\r
92 until (not (notmuch-show-goto-message-next)))
\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
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
104 (defun notmuch-show-refresh-view (&optional reset-state)
\r
105 "Refresh the current view.
\r