Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / f7 / 52f5e0ac99eef859234f21d4bfa6bca7d96fd0
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 8406A431FD2\r
6         for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 17:43:27 -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 K7Ugb7iAWe9y for <notmuch@notmuchmail.org>;\r
17         Sun, 29 Jan 2012 17:43:27 -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 CB7CB431FBC\r
22         for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 17:43:26 -0800 (PST)\r
23 Received: by bke11 with SMTP id 11so938426bke.26\r
24         for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 17:43:25 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=from:to:cc:subject:in-reply-to:references:user-agent:date\r
27         :message-id:mime-version:content-type;\r
28         bh=FfBbOIQNS711ELXh+SpK0tHJQvVtZBHRh2tRw0VIZ+4=;\r
29         b=g+BnZ/ujfZaAvLC8LS8Q32VLCkYwVDlkjA+4Jhj+2kYBOc7jTd0b0hrBUhgT7DVh3t\r
30         sWE1ZHgDyyXU8Jhh0jw5XHWkIXIXjHmQY6mEK9R0iAHa4Ei/CiupVa0gw9T4MV8waZZR\r
31         BDShJkxCiiK3Loe0meTYqlcOU4HbOZ1rvaeIE=\r
32 Received: by 10.204.154.28 with SMTP id m28mr7563761bkw.54.1327887805387;\r
33         Sun, 29 Jan 2012 17:43:25 -0800 (PST)\r
34 Received: from localhost ([91.144.186.21])\r
35         by mx.google.com with ESMTPS id sp6sm34046003bkb.2.2012.01.29.17.43.24\r
36         (version=TLSv1/SSLv3 cipher=OTHER);\r
37         Sun, 29 Jan 2012 17:43:24 -0800 (PST)\r
38 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
39 To: Austin Clements <amdragon@MIT.EDU>\r
40 Subject: Re: [PATCH 6/6] emacs: separate history for operations which accept\r
41         single and multiple tags\r
42 In-Reply-To: <20120129230229.GI17991@mit.edu>\r
43 References: <1327725684-5887-1-git-send-email-dmitry.kurochkin@gmail.com>\r
44         <1327725684-5887-6-git-send-email-dmitry.kurochkin@gmail.com>\r
45         <20120129230229.GI17991@mit.edu>\r
46 User-Agent: Notmuch/0.11+134~g7ddba9d (http://notmuchmail.org) Emacs/23.3.1\r
47         (x86_64-pc-linux-gnu)\r
48 Date: Mon, 30 Jan 2012 05:42:15 +0400\r
49 Message-ID: <8739ay7yq0.fsf@gmail.com>\r
50 MIME-Version: 1.0\r
51 Content-Type: text/plain; charset=us-ascii\r
52 Cc: notmuch@notmuchmail.org\r
53 X-BeenThere: notmuch@notmuchmail.org\r
54 X-Mailman-Version: 2.1.13\r
55 Precedence: list\r
56 List-Id: "Use and development of the notmuch mail system."\r
57         <notmuch.notmuchmail.org>\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
61 List-Post: <mailto:notmuch@notmuchmail.org>\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
65 X-List-Received-Date: Mon, 30 Jan 2012 01:43:27 -0000\r
66 \r
67 On Sun, 29 Jan 2012 18:02:29 -0500, Austin Clements <amdragon@MIT.EDU> wrote:\r
68 > Quoth Dmitry Kurochkin on Jan 28 at  8:41 am:\r
69 > > Some tag-related operations accept a single tag without prefix\r
70 > > (`notmuch-select-tag-with-completion'), others accept multiple tags\r
71 > > prefixed with '+' or '-' (`notmuch-select-tags-with-completion').\r
72 > > Before the change, both functions used a single default minibuffer\r
73 > > history.  This is inconvenient because you have to skip options with\r
74 > > incompatible format when going through the history.  The patch adds\r
75 > > separate history lists for the two functions.  Note that functions\r
76 > > that accept the same input format (e.g. "+", "-", "*") share the\r
77 > > history list as before.\r
78 > > ---\r
79 > >  emacs/notmuch.el |   12 ++++++++++--\r
80 > >  1 files changed, 10 insertions(+), 2 deletions(-)\r
81 > > \r
82 > > diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
83 > > index 24b0ea3..9813e0a 100644\r
84 > > --- a/emacs/notmuch.el\r
85 > > +++ b/emacs/notmuch.el\r
86 > > @@ -76,6 +76,14 @@ For example:\r
87 > >  (defvar notmuch-query-history nil\r
88 > >    "Variable to store minibuffer history for notmuch queries")\r
89 > >  \r
90 > > +(defvar notmuch-select-tag-history nil\r
91 > > +  "Variable to store notmuch tag history for\r
92 > > +  `notmuch-select-tag-with-completion'.")\r
93 > > +\r
94 > > +(defvar notmuch-select-tags-history nil\r
95 > > +  "Variable to store notmuch tags history for\r
96 > > +  `notmuch-select-tags-with-completion'.")\r
97 > > +\r
98\r
99 > Really these are minibuffer or input histories, not "notmuch tag\r
100 > history".  Also, the second line shouldn't be indented.  (Definitely\r
101 > nits, but if you roll a new version, you might as well fix these.)\r
102\r
103 \r
104 fixed\r
105 \r
106 Regards,\r
107   Dmitry\r
108 \r
109 > >  (defun notmuch-tag-completions (&optional search-terms)\r
110 > >    (split-string\r
111 > >     (with-output-to-string\r
112 > > @@ -86,7 +94,7 @@ For example:\r
113 > >  \r
114 > >  (defun notmuch-select-tag-with-completion (prompt &rest search-terms)\r
115 > >    (let ((tag-list (notmuch-tag-completions search-terms)))\r
116 > > -    (completing-read prompt tag-list)))\r
117 > > +    (completing-read prompt tag-list nil nil nil 'notmuch-select-tag-history)))\r
118 > >  \r
119 > >  (defun notmuch-select-tags-with-completion (&optional initial-input &rest search-terms)\r
120 > >    (let* ((add-tag-list (mapcar (apply-partially 'concat "+")\r
121 > > @@ -105,7 +113,7 @@ For example:\r
122 > >         map)))\r
123 > >      (delete "" (completing-read-multiple\r
124 > >             "Operations (+add -drop): notmuch tag " tag-list nil\r
125 > > -           nil initial-input))))\r
126 > > +           nil initial-input 'notmuch-select-tags-history))))\r
127 > >  \r
128 > >  (defun notmuch-update-tags (current-tags changed-tags)\r
129 > >    "Update `current-tags' with `changed-tags' and return the result.\r