Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 46 / ff9eb120ecbdb0678f322922fbdc3df309d444
1 Return-Path: <dmitry.kurochkin@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 5BABE431FBC\r
6         for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 18:28:32 -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.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, 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 l-0ztimkQMUy for <notmuch@notmuchmail.org>;\r
17         Sun, 29 Jan 2012 18:28:31 -0800 (PST)\r
18 Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com\r
19         [209.85.214.53]) (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 EC93B421189\r
22         for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 18:27:58 -0800 (PST)\r
23 Received: by mail-bk0-f53.google.com with SMTP id 11so960260bke.26\r
24         for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 18:27:58 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=from:to:subject:date:message-id:x-mailer:in-reply-to:references;\r
27         bh=OK0Sm2NBMtyTBG2LqvCWVI2W5QUQOcJU9gqHoAofFEs=;\r
28         b=WAEx6/9IgCTG4rCVgcmgDM9u4YqqbBG82U/wHne7rf/Fu3AeD7QOHUxJpLyiYqhbd1\r
29         W8BzHveH9pJ4uilaG5sfzbqPeWVs6m1L4bdApu2stBDkEDU1aGUrjlqNkEz/ov87Qc+f\r
30         oAc2/0IVXa7eFk7CPdwxnJBw0Pjj7JmT7ZDjs=\r
31 Received: by 10.204.152.15 with SMTP id e15mr7762044bkw.108.1327890478716;\r
32         Sun, 29 Jan 2012 18:27:58 -0800 (PST)\r
33 Received: from localhost ([91.144.186.21])\r
34         by mx.google.com with ESMTPS id z15sm31387095bkd.7.2012.01.29.18.27.57\r
35         (version=TLSv1/SSLv3 cipher=OTHER);\r
36         Sun, 29 Jan 2012 18:27:58 -0800 (PST)\r
37 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
38 To: notmuch@notmuchmail.org\r
39 Subject: [PATCH v2 12/13] emacs: accept empty tag list in `notmuch-tag'\r
40 Date: Mon, 30 Jan 2012 06:26:21 +0400\r
41 Message-Id: <1327890382-548-13-git-send-email-dmitry.kurochkin@gmail.com>\r
42 X-Mailer: git-send-email 1.7.8.3\r
43 In-Reply-To: <1327890382-548-1-git-send-email-dmitry.kurochkin@gmail.com>\r
44 References: <1327725684-5887-1-git-send-email-dmitry.kurochkin@gmail.com>\r
45         <1327890382-548-1-git-send-email-dmitry.kurochkin@gmail.com>\r
46 X-BeenThere: notmuch@notmuchmail.org\r
47 X-Mailman-Version: 2.1.13\r
48 Precedence: list\r
49 List-Id: "Use and development of the notmuch mail system."\r
50         <notmuch.notmuchmail.org>\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
54 List-Post: <mailto:notmuch@notmuchmail.org>\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
58 X-List-Received-Date: Mon, 30 Jan 2012 02:28:32 -0000\r
59 \r
60 Since `notmuch-tag' is a non-interactive function and hence is meant\r
61 to be invoked programmatically, it should accept zero tags.  Also, the\r
62 tagging operations (bound to "*", "+", "-") would accept empty input\r
63 without an error.\r
64 ---\r
65  emacs/notmuch.el |   10 +++++-----\r
66  1 files changed, 5 insertions(+), 5 deletions(-)\r
67 \r
68 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
69 index 7e8f185..1b7a835 100644\r
70 --- a/emacs/notmuch.el\r
71 +++ b/emacs/notmuch.el\r
72 @@ -555,15 +555,15 @@ messages instead of running (notmuch-call-notmuch-process \"tag\" ..)\r
73  directly, so that hooks specified in notmuch-before-tag-hook and\r
74  notmuch-after-tag-hook will be run."\r
75    ;; Perform some validation\r
76 -  (when (null tags) (error "No tags given"))\r
77    (mapc (lambda (tag)\r
78           (unless (string-match-p "^[-+]\\S-+$" tag)\r
79             (error "Tag must be of the form `+this_tag' or `-that_tag'")))\r
80         tags)\r
81 -  (run-hooks 'notmuch-before-tag-hook)\r
82 -  (apply 'notmuch-call-notmuch-process\r
83 -        (append (list "tag") tags (list "--" query)))\r
84 -  (run-hooks 'notmuch-after-tag-hook))\r
85 +  (unless (null tags)\r
86 +    (run-hooks 'notmuch-before-tag-hook)\r
87 +    (apply 'notmuch-call-notmuch-process "tag"\r
88 +          (append tags (list "--" query)))\r
89 +    (run-hooks 'notmuch-after-tag-hook)))\r
90  \r
91  (defcustom notmuch-before-tag-hook nil\r
92    "Hooks that are run before tags of a message are modified.\r
93 -- \r
94 1.7.8.3\r
95 \r