Re: [PATCH v4 02/16] Move crypto.c into libutil
[notmuch-archives.git] / 6a / 15a6beb0d053c4090bc2d3b78793227a00f5d6
1 Return-Path: <bremner@unb.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 7CB13431FAF\r
6         for <notmuch@notmuchmail.org>; Sat,  2 Mar 2013 10:50:28 -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\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 i9+PcW56R5H0 for <notmuch@notmuchmail.org>;\r
16         Sat,  2 Mar 2013 10:50:28 -0800 (PST)\r
17 Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])\r
18         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id E7B5F431FAE\r
21         for <notmuch@notmuchmail.org>; Sat,  2 Mar 2013 10:50:27 -0800 (PST)\r
22 Received: from fctnnbsc30w-156034082078.dhcp-dynamic.fibreop.nb.bellaliant.net\r
23         ([156.34.82.78] helo=zancas.localnet)\r
24         by tesseract.cs.unb.ca with esmtpsa\r
25         (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80)\r
26         (envelope-from <bremner@unb.ca>)\r
27         id 1UBrVp-0008Lz-8K; Sat, 02 Mar 2013 14:50:26 -0400\r
28 Received: from bremner by zancas.localnet with local (Exim 4.80)\r
29         (envelope-from <bremner@unb.ca>)\r
30         id 1UBrVj-0002Ql-GI; Sat, 02 Mar 2013 14:50:19 -0400\r
31 From: David Bremner <david@tethera.net>\r
32 To: Simon Campese <notmuchmail_org@campese.de>, notmuch@notmuchmail.org\r
33 Subject: Re: [BUG] inconsistent user context handling w/ tramp\r
34 In-Reply-To: <874nguxbvq.fsf@tu-dortmund.de>\r
35 References: <874nguxbvq.fsf@tu-dortmund.de>\r
36 User-Agent: Notmuch/0.15.2+32~g16aa65b (http://notmuchmail.org) Emacs/24.2.1\r
37         (x86_64-pc-linux-gnu)\r
38 Date: Sat, 02 Mar 2013 14:50:19 -0400\r
39 Message-ID: <87sj4d63h0.fsf@zancas.localnet>\r
40 MIME-Version: 1.0\r
41 Content-Type: text/plain\r
42 X-Spam_bar: -\r
43 X-BeenThere: notmuch@notmuchmail.org\r
44 X-Mailman-Version: 2.1.13\r
45 Precedence: list\r
46 List-Id: "Use and development of the notmuch mail system."\r
47         <notmuch.notmuchmail.org>\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
51 List-Post: <mailto:notmuch@notmuchmail.org>\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
54         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
55 X-List-Received-Date: Sat, 02 Mar 2013 18:50:28 -0000\r
56 \r
57 Simon Campese <notmuchmail_org@campese.de> writes:\r
58 \r
59 > Hello,\r
60 >\r
61 > after using tramp to open a file using the 'su' or 'sudo' protocol as\r
62 > user X, the next time I run 'compose-mail' to compose a message it\r
63 > apparently looks in the home directory of user X for its config file,\r
64 > mail directory etc. In the compose window, I get the error message\r
65 >\r
66 > 'Error reading configuration file $X_homedir/.notmuch-config: No such\r
67 > file or directory'\r
68 >\r
69 > in all header fields (From, Fcc etc.) that should be filled by notmuch\r
70 > ($X_homedir  is the home directory of user X from above).\r
71 >\r
72 \r
73 I don't think this is specific to notmuch. Notmuch uses the HOME\r
74 environment variable to locate it's configuration file, and tramp is\r
75 modifying this environment variable. \r
76 \r
77 To verify this:\r
78 \r
79 Start emacs with "emacs -Q"\r
80 open a file use /su:user_@localhost:filename\r
81 run M-! (or M-x shell-command) echo $HOME\r
82 \r
83 you will see that the variable is changed to the home directory of\r
84 user_x.\r
85 \r
86 If you think this behaviour of tramp is wrong (I didn't think through\r
87 all the implications), then you could file an emacs bug.\r
88 \r
89 Do you see this behaviour when running compose-mail from a buffer that\r
90 is not a tramp buffer?\r
91 \r
92 All that said, the patches of \r
93 \r
94      mid:2f89028f7986f67792478f1728ca1f1fdd382d3c.1359495450.git.jani@nikula.org\r
95 \r
96 could be used to work around this "feature" of tramp.  In fact since\r
97 they were stalled a bit waiting for a convincing use case, maybe your\r
98 report will help get them into notmuch more quickly.\r
99 \r
100 Someone would still have to modify the emacs client side code, but at\r
101 least conceptually I don't think that would be difficult.\r
102 \r
103 d\r
104 \r
105 PS: all my tests where with Emacs 24.2.1\r
106 \r
107 \r