From: David Bremner <david@tethera.net>
To: Simon Campese <notmuchmail_org@campese.de>, notmuch@notmuchmail.org
Subject: Re: [BUG] inconsistent user context handling w/ tramp
Date: Sat, 02 Mar 2013 14:50:19 -0400 [thread overview]
Message-ID: <87sj4d63h0.fsf@zancas.localnet> (raw)
In-Reply-To: <874nguxbvq.fsf@tu-dortmund.de>
Simon Campese <notmuchmail_org@campese.de> writes:
> Hello,
>
> after using tramp to open a file using the 'su' or 'sudo' protocol as
> user X, the next time I run 'compose-mail' to compose a message it
> apparently looks in the home directory of user X for its config file,
> mail directory etc. In the compose window, I get the error message
>
> 'Error reading configuration file $X_homedir/.notmuch-config: No such
> file or directory'
>
> in all header fields (From, Fcc etc.) that should be filled by notmuch
> ($X_homedir is the home directory of user X from above).
>
I don't think this is specific to notmuch. Notmuch uses the HOME
environment variable to locate it's configuration file, and tramp is
modifying this environment variable.
To verify this:
Start emacs with "emacs -Q"
open a file use /su:user_@localhost:filename
run M-! (or M-x shell-command) echo $HOME
you will see that the variable is changed to the home directory of
user_x.
If you think this behaviour of tramp is wrong (I didn't think through
all the implications), then you could file an emacs bug.
Do you see this behaviour when running compose-mail from a buffer that
is not a tramp buffer?
All that said, the patches of
mid:2f89028f7986f67792478f1728ca1f1fdd382d3c.1359495450.git.jani@nikula.org
could be used to work around this "feature" of tramp. In fact since
they were stalled a bit waiting for a convincing use case, maybe your
report will help get them into notmuch more quickly.
Someone would still have to modify the emacs client side code, but at
least conceptually I don't think that would be difficult.
d
PS: all my tests where with Emacs 24.2.1
next prev parent reply other threads:[~2013-03-02 18:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-02 11:46 [BUG] inconsistent user context handling w/ tramp Simon Campese
2013-03-02 18:50 ` David Bremner [this message]
2013-03-08 13:04 ` [PATCH] emacs: introduce notmuch-command-to-string, replace use of shell-command-to-string david
2013-03-29 15:14 ` David Bremner
2013-03-29 15:54 ` Tomi Ollila
2013-04-01 13:33 ` David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sj4d63h0.fsf@zancas.localnet \
--to=david@tethera.net \
--cc=notmuch@notmuchmail.org \
--cc=notmuchmail_org@campese.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).