Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 30 / cd47712991856f67c6df3b64186ec2b837b0ac
1 Return-Path: <servilio@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 EE1CD4196F0\r
6         for <notmuch@notmuchmail.org>; Thu, 15 Apr 2010 05:16:10 -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.1\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5\r
12         tests=[BAYES_20=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,\r
13         DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001] autolearn=ham\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 HIxSRnVaXZuw for <notmuch@notmuchmail.org>;\r
17         Thu, 15 Apr 2010 05:16:10 -0700 (PDT)\r
18 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com\r
19         [74.125.82.181])\r
20         by olra.theworths.org (Postfix) with ESMTP id DF353431FC1\r
21         for <notmuch@notmuchmail.org>; Thu, 15 Apr 2010 05:16:09 -0700 (PDT)\r
22 Received: by wyj26 with SMTP id 26so582999wyj.26\r
23         for <notmuch@notmuchmail.org>; Thu, 15 Apr 2010 05:16:09 -0700 (PDT)\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
25         h=domainkey-signature:mime-version:received:date:received:message-id\r
26         :subject:from:to:content-type;\r
27         bh=pCvtkoEOS5eS5I1azm73Nv6LyLppT289MCdXDPny8fE=;\r
28         b=TuuVhAMVght8xOY0sD+OoGBtxfXZjzyfUnCUxkKMrb4hp4B1RwZiuX0LxeCWJu2/A7\r
29         8xkfzJg0bRmpnU32TUQ8hMeOX+xCKwEWKFWWpJZSVD0OfaijaOfU1ao1I5n+b6Ms/CvQ\r
30         yuz74R8KF6HKS90Jtm1nvvZRbFjV3u8LAs+Vg=\r
31 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
32         h=mime-version:date:message-id:subject:from:to:content-type;\r
33         b=UgDhYRvW07ab301Jsh8S+CAQHekHLlvnyXPSmS4ft2wAvIA70WnpxyvItX9VjYEnWT\r
34         9BxDZUGc2e4NlCKCb/2KBmRV+FrG+nmu4d1eHT3dsul1lKeCMVB0UPRF4iqs9R9CExow\r
35         hUOWvJ231YhP6QChNkLjlSjZxM6z9YeWLotkA=\r
36 MIME-Version: 1.0\r
37 Received: by 10.216.89.140 with HTTP; Thu, 15 Apr 2010 05:16:09 -0700 (PDT)\r
38 Date: Thu, 15 Apr 2010 08:16:09 -0400\r
39 Received: by 10.216.164.21 with SMTP id b21mr3463wel.46.1271333769069; Thu, 15\r
40         Apr 2010 05:16:09 -0700 (PDT)\r
41 Message-ID: <r2sb22065d01004150516jf099f3dcw180a7db0dc972c76@mail.gmail.com>\r
42 Subject: [PATCH] Try to provide search buffers with titles from \r
43         notmuch-folders.\r
44 From: Servilio Afre Puentes <servilio@gmail.com>\r
45 To: notmuch <notmuch@notmuchmail.org>\r
46 Content-Type: text/plain; charset=ISO-8859-1\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Thu, 15 Apr 2010 12:16:11 -0000\r
60 \r
61 ---\r
62  emacs/notmuch.el |   11 ++++++++++-\r
63  1 files changed, 10 insertions(+), 1 deletions(-)\r
64 \r
65 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
66 index be09f42..17e0e86 100644\r
67 --- a/emacs/notmuch.el\r
68 +++ b/emacs/notmuch.el\r
69 @@ -696,6 +696,15 @@ characters as well as `_.+-'.\r
70      (apply 'notmuch-call-notmuch-process "tag"\r
71            (append action-split (list notmuch-search-query-string) nil))))\r
72 \r
73 +(defun notmuch-search-buffer-title (query)\r
74 +  "Returns the title for a buffer with notmuch search results."\r
75 +  (let ((folder (car (rassoc query notmuch-folders))))\r
76 +       (if folder\r
77 +          (concat "*notmuch-folder-" folder "*")\r
78 +        (concat "*notmuch-search-" query "*"))\r
79 +       )\r
80 +)\r
81 +\r
82  ;;;###autoload\r
83  (defun notmuch-search (query &optional oldest-first target-thread target-line)\r
84    "Run \"notmuch search\" with the given query string and display results.\r
85 @@ -708,7 +717,7 @@ The optional parameters are used as follows:\r
86    target-line: The line number to move to if the target thread does not\r
87                 appear in the search results."\r
88    (interactive "sNotmuch search: ")\r
89 -  (let ((buffer (get-buffer-create (concat "*notmuch-search-" query "*"))))\r
90 +  (let ((buffer (get-buffer-create (notmuch-search-buffer-title query))))\r
91      (switch-to-buffer buffer)\r
92      (notmuch-search-mode)\r
93      (set 'notmuch-search-query-string query)\r
94 -- \r
95 1.7.0.4\r