Re: [PATCH 1/2] Add Google Inc. to AUTHORS as a contributor.
[notmuch-archives.git] / 74 / 12c6adeb40d868ae269500aeaff8749e90c69a
1 Return-Path: <sfischmeister@uwaterloo.ca>\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 3EFDD431FBD\r
6         for <notmuch@notmuchmail.org>; Tue, 21 Jan 2014 14:31:17 -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: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id BG2oT7Rs2mrJ for <notmuch@notmuchmail.org>;\r
16         Tue, 21 Jan 2014 14:31:11 -0800 (PST)\r
17 X-Greylist: delayed 859 seconds by postgrey-1.32 at olra;\r
18         Tue, 21 Jan 2014 14:31:11 PST\r
19 Received: from mailchk-m05.uwaterloo.ca (mailservices.uwaterloo.ca\r
20         [129.97.128.141])\r
21         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
22         (No client certificate requested)\r
23         by olra.theworths.org (Postfix) with ESMTPS id A9C1D431FAF\r
24         for <notmuch@notmuchmail.org>; Tue, 21 Jan 2014 14:31:11 -0800 (PST)\r
25 Received: from connect.uwaterloo.ca (connhub2.connect.uwaterloo.ca\r
26         [129.97.149.119])\r
27         by mailchk-m05.uwaterloo.ca (8.14.4/8.14.4) with ESMTP id\r
28         s0LMGXSb013415\r
29         (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=OK)\r
30         for <notmuch@notmuchmail.org>; Tue, 21 Jan 2014 17:16:50 -0500\r
31 Received: from uwaterloo.ca (10.20.190.150) by connhub2.connect.uwaterloo.ca\r
32         (129.97.149.119) with Microsoft SMTP Server (TLS) id 14.3.174.1;\r
33         Tue, 21 Jan 2014 17:16:46 -0500\r
34 From: Sebastian Fischmeister <sfischme@uwaterloo.ca>\r
35 To: <notmuch@notmuchmail.org>\r
36 Subject: ido address lookup for notmuch\r
37 User-Agent: Notmuch/0.17+27~gae47d61 (http://notmuchmail.org) Emacs/24.3.1\r
38         (x86_64-unknown-linux-gnu)\r
39 X-Homepage: http://esg.uwaterloo.ca\r
40 Date: Tue, 21 Jan 2014 17:13:16 -0500\r
41 Message-ID: <87a9ep0yrn.fsf@uwaterloo.ca>\r
42 MIME-Version: 1.0\r
43 Content-Type: text/plain\r
44 X-Miltered: at mailchk-m05 with ID 52DEF1C1.006 by Joe's j-chkmail\r
45         (http://j-chkmail.ensmp.fr)!\r
46 X-Virus-Scanned: clamav-milter 0.98 at mailchk-m05\r
47 X-Virus-Status: Clean\r
48 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3\r
49         (mailchk-m05.uwaterloo.ca [129.97.128.141]);\r
50         Tue, 21 Jan 2014 17:16:50 -0500 (EST)\r
51 X-BeenThere: notmuch@notmuchmail.org\r
52 X-Mailman-Version: 2.1.13\r
53 Precedence: list\r
54 List-Id: "Use and development of the notmuch mail system."\r
55         <notmuch.notmuchmail.org>\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
59 List-Post: <mailto:notmuch@notmuchmail.org>\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
62         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
63 X-List-Received-Date: Tue, 21 Jan 2014 22:31:17 -0000\r
64 \r
65 Hi,\r
66 \r
67 This is a function that I find really useful. I adapted it a bit based\r
68 on the original from Jacek Generowicz. Maybe others will find it helpful\r
69 as well.\r
70 \r
71   Sebastian\r
72 \r
73 ;; original https://groups.google.com/group/mu-discuss/browse_thread/thread/551b7a6487a0aeb3\r
74 \r
75 (setq notmuch-compose-complete-ignore-address-regexp (regexp-opt '("failed" "DO NOT REPLY" "donotreply" "no-reply" "noreply" "Google Drive")))\r
76 \r
77 (defun jmg/ido-select-recipient ()\r
78   "Inserts a contact from the addrlookup cache.\r
79 Uses ido to select the contact from all those present in the database."\r
80   (interactive)\r
81   (insert\r
82    (ido-completing-read\r
83     "Recipient: "\r
84     (mapcar (lambda (contact-string)\r
85               (let* ((data (split-string contact-string "       "))\r
86                      (address (car data))\r
87                      (name (when (> (length (cadr data)) 0) (cadr data)))\r
88                      )\r
89                 (if name\r
90                     (format "%s <%s>" name address)\r
91                   address)))\r
92             (remove-if (lambda (string) (string-match notmuch-compose-complete-ignore-address-regexp string))\r
93                        (remove-if (lambda (string) (= 0 (length string)))\r
94                                   (split-string (shell-command-to-string (concat "addrlookup " (thing-at-point 'word) )) "\n")))))))\r
95 \r
96 \r
97 \r