Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 22 / 5493bc9e4ae07e84e475b0a6afe9f5c24819ea
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 0CB21431FC7\r
6         for <notmuch@notmuchmail.org>; Mon,  2 Apr 2012 01:46:05 -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.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 vxrxGQBNc427 for <notmuch@notmuchmail.org>;\r
17         Mon,  2 Apr 2012 01:46:04 -0700 (PDT)\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 2DE9D431FC2\r
22         for <notmuch@notmuchmail.org>; Mon,  2 Apr 2012 01:46:04 -0700 (PDT)\r
23 Received: by bkwj4 with SMTP id j4so2268844bkw.26\r
24         for <notmuch@notmuchmail.org>; Mon, 02 Apr 2012 01:46:02 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=from:to:subject:in-reply-to:references:date:message-id:mime-version\r
27         :content-type; bh=YPx3CbtnXE9A9WQ9+Txqlpc+6iSY5BTzADWCxW1SZ58=;\r
28         b=AbmiHFKval4icQ/E39BXIDI428ENOsoeCWoB4iFg2WyXBl1jIo+lJlPlkwrxb6z8LZ\r
29         Pqgut6oJ+bDKrranlh8BKO+wQtqe49pfXPMyDrbG/omkfmYObIoCb3bFr5LUzdpEzzu3\r
30         iUeW7fiC5lm6khOc6KD+VNblLlS13E0fs2xxGDozVD7RiGNha53qojPG97XxkRoS/8PE\r
31         +liDoyDdmHIe7LxpE7fZqqkTVvS4XPQfBqlVzFtxTbJIN1ZEAATyumAXXNXJLYXl0k/r\r
32         s0eHFhHhAFn2rjvIXLBjZKo1F4tTGEeK3pjcmSkxBY9psG7NjUOCO2bJdWxE/RAa2rJP\r
33         IyNA==\r
34 Received: by 10.205.136.12 with SMTP id ii12mr2984691bkc.98.1333356362895;\r
35         Mon, 02 Apr 2012 01:46:02 -0700 (PDT)\r
36 Received: from localhost ([91.144.186.21])\r
37         by mx.google.com with ESMTPS id z14sm33708804bky.15.2012.04.02.01.46.01\r
38         (version=TLSv1/SSLv3 cipher=OTHER);\r
39         Mon, 02 Apr 2012 01:46:01 -0700 (PDT)\r
40 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
41 To: Jameson Graef Rollins <jrollins@finestructure.net>,\r
42         Notmuch Mail <notmuch@notmuchmail.org>\r
43 Subject: Re: [PATCH 3/6] emacs: modify notmuch-search-tag to not prompt if\r
44         tags provided as argument\r
45 In-Reply-To: <1333354853-25729-4-git-send-email-jrollins@finestructure.net>\r
46 References: <1333354853-25729-1-git-send-email-jrollins@finestructure.net>\r
47         <1333354853-25729-2-git-send-email-jrollins@finestructure.net>\r
48         <1333354853-25729-3-git-send-email-jrollins@finestructure.net>\r
49         <1333354853-25729-4-git-send-email-jrollins@finestructure.net>User-Agent:\r
50         Notmuch/0.12+70~g06ecbeb (http://notmuchmail.org) Emacs/23.4.1\r
51         (x86_64-pc-linux-gnu)\r
52 Date: Mon, 02 Apr 2012 12:44:21 +0400\r
53 Message-ID: <874nt2ikuy.fsf@gmail.com>\r
54 MIME-Version: 1.0\r
55 Content-Type: text/plain; charset=us-ascii\r
56 X-BeenThere: notmuch@notmuchmail.org\r
57 X-Mailman-Version: 2.1.13\r
58 Precedence: list\r
59 List-Id: "Use and development of the notmuch mail system."\r
60         <notmuch.notmuchmail.org>\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
64 List-Post: <mailto:notmuch@notmuchmail.org>\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
67         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
68 X-List-Received-Date: Mon, 02 Apr 2012 08:46:05 -0000\r
69 \r
70 Jameson Graef Rollins <jrollins@finestructure.net> writes:\r
71 \r
72 > If the argument is a full string or a list, the function will assume\r
73 > this is a tag string or list and will not prompt the user.  If the\r
74 > argument is nil or the exact strings "-" or "+" then the user will be\r
75 > prompted.\r
76 >\r
77 > The function doc is updated accordingly.\r
78 > ---\r
79 >  emacs/notmuch.el |   16 ++++++++++++----\r
80 >  1 files changed, 12 insertions(+), 4 deletions(-)\r
81 >\r
82 > diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
83 > index 0ab8fc2..3b78584 100644\r
84 > --- a/emacs/notmuch.el\r
85 > +++ b/emacs/notmuch.el\r
86 > @@ -646,13 +646,21 @@ added or removed for all threads in the region from BEG to END."\r
87 >          (notmuch-update-tags (notmuch-search-get-tags) tag-changes))\r
88 >         (forward-line))))))\r
89 >  \r
90 > -(defun notmuch-search-tag (&optional initial-input)\r
91 > -  "Change tags for the currently selected thread or region."\r
92 > +(defun notmuch-search-tag (&optional tags)\r
93 > +  "Change tags for the currently selected thread or region.\r
94 > +\r
95 > +If TAGS is a string or list it will be interpreted as tags to\r
96 > +apply to the selected messages.  If TAGS is nil or either of the\r
97 > +strings `-' or `+' the user will be prompted to enter tags (with\r
98 > +tab completion)."\r
99 \r
100 The TAGS argument name may be confusing.  Other tagging functions tend\r
101 to use TAG-CHANGES for these.  Can you please change the argument name\r
102 here for consistency?\r
103 \r
104 >    (interactive)\r
105 >    (let* ((beg (if (region-active-p) (region-beginning) (point)))\r
106 >        (end (if (region-active-p) (region-end) (point)))\r
107 > -      (search-string (notmuch-search-find-thread-id-region-search beg end))\r
108 > -      (tags (notmuch-read-tag-changes initial-input search-string)))\r
109 > +      (search-string (notmuch-search-find-thread-id-region-search beg end)))\r
110 > +    (if (string-or-null-p tags)\r
111 > +     (if (or (string= tags "-") (string= tags "+") (eq tags nil))\r
112 \r
113 Should we add a check for an empty string?\r
114 \r
115 Please use `null'.\r
116 \r
117 > +         (setq tags (notmuch-read-tag-changes tags search-string))\r
118 > +       (setq tags (list tags))))\r
119 \r
120 Should we change `notmuch-tag' to accept strings instead of handling it\r
121 here?\r
122 \r
123 Regards,\r
124   Dmitry\r
125 \r
126 >      (apply 'notmuch-search-tag-region beg end tags)))\r
127 >  \r
128 >  (defun notmuch-search-add-tag ()\r
129 > -- \r
130 > 1.7.9.1\r
131 >\r
132 > _______________________________________________\r
133 > notmuch mailing list\r
134 > notmuch@notmuchmail.org\r
135 > http://notmuchmail.org/mailman/listinfo/notmuch\r