Re: [PATCH] Fix typo in Message.maildir_flags_to_tags
[notmuch-archives.git] / 27 / 6b3a34056ee849d1cc7611fa7afcbfe25cc3c1
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 0938E431FBF\r
6         for <notmuch@notmuchmail.org>; Sat, 24 Nov 2012 05:21:14 -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: 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 m0T+I-36IKhS for <notmuch@notmuchmail.org>;\r
18         Sat, 24 Nov 2012 05:21:12 -0800 (PST)\r
19 Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com\r
20         [209.85.212.179]) (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 0EEB2431FC7\r
23         for <notmuch@notmuchmail.org>; Sat, 24 Nov 2012 05:21:08 -0800 (PST)\r
24 Received: by mail-wi0-f179.google.com with SMTP id hj6so1746549wib.2\r
25         for <notmuch@notmuchmail.org>; Sat, 24 Nov 2012 05:21:07 -0800 (PST)\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=T0cV6BGIHKMheCCH3sdN+zTc6hl2ejG7dayUivgbzaY=;\r
29         b=Cks9utq/nMQ4lhyGGihV4RhSl7qPN7qD9yUnbIKdbkIcIWHezGpZJWI/LT1tlcVTHg\r
30         SbcYM3v+VgKWU3hFlU8JAsYJ4GrQjss2gt/r6NNAZ3XeMD3Yb6loyftCizUXWsWCSsLw\r
31         PX6gU6m6IP3yUxsWI1zNlEsYlyypnCl0thlum3H1/TrFD1js1p7uIuB5YKACeL6S9DsB\r
32         rmXD2lPCZ55yzcVFUUot/ty4C+mni4RdgY/pHTkE38XEJRiu1TTx6/U8M00AofZl739I\r
33         qAJbJieu4bmJo6xi0MPQK+shlOutL/Zi4xweN+F08NzWSn9U1utjQPrTnlfW1j2DUhg7\r
34         kfTw==\r
35 Received: by 10.216.209.70 with SMTP id r48mr2657561weo.196.1353763267753;\r
36         Sat, 24 Nov 2012 05:21:07 -0800 (PST)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPS id bz12sm14251167wib.5.2012.11.24.05.21.06\r
39         (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Sat, 24 Nov 2012 05:21:07 -0800 (PST)\r
41 From: markwalters1009 <markwalters1009@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH v2 3/7] emacs: notmuch.el split call-process into\r
44         call-process-region\r
45 Date: Sat, 24 Nov 2012 13:20:52 +0000\r
46 Message-Id: <1353763256-32336-4-git-send-email-markwalters1009@gmail.com>\r
47 X-Mailer: git-send-email 1.7.9.1\r
48 In-Reply-To: <1353763256-32336-1-git-send-email-markwalters1009@gmail.com>\r
49 References: <1353763256-32336-1-git-send-email-markwalters1009@gmail.com>\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Sat, 24 Nov 2012 13:21:14 -0000\r
63 \r
64 From: Mark Walters <markwalters1009@gmail.com>\r
65 \r
66 We add a new function notmuch-call-process-region so that functions\r
67 can call notmuch with some region sent to stdin. This is preparation\r
68 for using the new query from stdin functionality.\r
69 ---\r
70  emacs/notmuch.el |   19 ++++++++++++++-----\r
71  1 files changed, 14 insertions(+), 5 deletions(-)\r
72 \r
73 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
74 index f9454d8..64b9474 100644\r
75 --- a/emacs/notmuch.el\r
76 +++ b/emacs/notmuch.el\r
77 @@ -533,15 +533,17 @@ If BARE is set then do not prefix with \"thread:\""\r
78    (let ((message-id (notmuch-search-find-thread-id)))\r
79      (notmuch-mua-new-reply message-id prompt-for-sender nil)))\r
80  \r
81 -(defun notmuch-call-notmuch-process (&rest args)\r
82 -  "Synchronously invoke \"notmuch\" with the given list of arguments.\r
83 +(defun notmuch-call-notmuch-process-region (beg end &rest args)\r
84 +  "Synchronously invoke \"notmuch\" with the given list of arguments and pipe region.\r
85  \r
86 -Output from the process will be presented to the user as an error\r
87 -and will also appear in a buffer named \"*Notmuch errors*\"."\r
88 +The region from beg to end in the current buffer will be piped to\r
89 +stdin for the notmuch process.  Output from the process will be\r
90 +presented to the user as an error and will also appear in a\r
91 +buffer named \"*Notmuch errors*\"."\r
92    (let ((error-buffer (get-buffer-create "*Notmuch errors*")))\r
93      (with-current-buffer error-buffer\r
94         (erase-buffer))\r
95 -    (if (eq (apply 'call-process notmuch-command nil error-buffer nil args) 0)\r
96 +    (if (eq (apply 'call-process-region beg end notmuch-command nil error-buffer nil args) 0)\r
97         (point)\r
98        (progn\r
99         (with-current-buffer error-buffer\r
100 @@ -550,6 +552,13 @@ and will also appear in a buffer named \"*Notmuch errors*\"."\r
101             (error (buffer-substring beg end))\r
102             ))))))\r
103  \r
104 +(defun notmuch-call-notmuch-process (&rest args)\r
105 +  "Synchronously invoke \"notmuch\" with the given list of arguments.\r
106 +\r
107 +Output from the process will be presented to the user as an error\r
108 +and will also appear in a buffer named \"*Notmuch errors*\"."\r
109 +  (apply 'notmuch-call-notmuch-process-region (point) (point) args))\r
110 +\r
111  (defun notmuch-search-set-tags (tags &optional pos)\r
112    (let ((new-result (plist-put (notmuch-search-get-result pos) :tags tags)))\r
113      (notmuch-search-update-result new-result pos)))\r
114 -- \r
115 1.7.9.1\r
116 \r