database error
[notmuch-archives.git] / a4 / 162504eec44881af481b2d237d3003916c3ae7
1 Return-Path: <stewart@flamingspork.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 2078D431FD0\r
6         for <notmuch@notmuchmail.org>; Mon, 16 May 2011 02:29:12 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 UMb2pv5nlkgU for <notmuch@notmuchmail.org>;\r
16         Mon, 16 May 2011 02:29:09 -0700 (PDT)\r
17 Received: from kaylee.flamingspork.com (kaylee.flamingspork.com\r
18         [74.207.245.61])\r
19         by olra.theworths.org (Postfix) with ESMTP id 6CCB5431FB6\r
20         for <notmuch@notmuchmail.org>; Mon, 16 May 2011 02:29:09 -0700 (PDT)\r
21 Received: from willster.flamingspork.com (localhost [127.0.0.1])\r
22         by kaylee.flamingspork.com (Postfix) with ESMTPS id 30D0A609E\r
23         for <notmuch@notmuchmail.org>; Mon, 16 May 2011 09:28:45 +0000 (UTC)\r
24 Received: by willster.flamingspork.com (Postfix, from userid 1000)\r
25         id 2EE8825F0DE; Mon, 16 May 2011 19:29:07 +1000 (EST)\r
26 From: Stewart Smith <stewart@flamingspork.com>\r
27 To: notmuch <notmuch@notmuchmail.org>\r
28 Subject: Multiple sender identities (composing)\r
29 User-Agent: Notmuch/0.5-93-g5e4ed5b (http://notmuchmail.org) Emacs/23.2.1\r
30         (x86_64-pc-linux-gnu)\r
31 Date: Mon, 16 May 2011 19:29:07 +1000\r
32 Message-ID: <87vcxb0za4.fsf@flamingspork.com>\r
33 MIME-Version: 1.0\r
34 Content-Type: text/plain; charset=us-ascii\r
35 X-BeenThere: notmuch@notmuchmail.org\r
36 X-Mailman-Version: 2.1.13\r
37 Precedence: list\r
38 List-Id: "Use and development of the notmuch mail system."\r
39         <notmuch.notmuchmail.org>\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
43 List-Post: <mailto:notmuch@notmuchmail.org>\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
47 X-List-Received-Date: Mon, 16 May 2011 09:29:12 -0000\r
48 \r
49 Thought I'd share this bit of my .emacs snippet that may be useful to go\r
50 on the emacs tips page.\r
51 \r
52 This does the following:\r
53 - sets up a list of possible identities to have mail From\r
54 - on composing mail, it prompts you for who you want to send mail from\r
55 - pressing enter will give you the default (first in the list)\r
56 - otherwise you have tab completion\r
57 \r
58 You may also want to set this:\r
59  '(message-sendmail-envelope-from (quote header))\r
60 (in custom-set-variables) so that if you're doing postfix sender based routing\r
61 or the like, it gets the correct address and doesn't end up sending\r
62 things the wrong way.\r
63 \r
64 (setq stewart/mua-identities (list "Stewart Smith <stewart@flamingspork.com>" "Stewart Smith <stewart.smith@percona.com>"))\r
65 \r
66 (defun stewart/notmuch-mua-mail (&optional from)\r
67   (interactive)\r
68   (setq from (completing-read "Sender identity: " stewart/mua-identities\r
69                    nil t nil nil (car stewart/mua-identities)))\r
70   (notmuch-mua-mail nil nil (list (cons 'from from))))\r
71 \r
72 (define-key notmuch-show-mode-map "m"\r
73       (lambda ()\r
74         "send email"\r
75         (interactive)\r
76         (stewart/notmuch-mua-mail)))\r
77 \r
78 (define-key notmuch-search-mode-map "m"\r
79       (lambda ()\r
80         "send email"\r
81         (interactive)\r
82         (stewart/notmuch-mua-mail)))\r
83 \r
84 -- \r
85 Stewart Smith\r