From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Cc: tramp-devel@mail.freesoftware.fsf.org, ding@gnus.org
Subject: Re: auth-source.el API change: Gnus and Emacs sync
Date: Fri, 11 Feb 2011 11:28:35 -0600 [thread overview]
Message-ID: <877hd61nwc.fsf@lifelogs.com> (raw)
In-Reply-To: 87hbcacytm.fsf@gmx.de
On Fri, 11 Feb 2011 17:37:09 +0100 Michael Albinus <michael.albinus@gmx.de> wrote:
MA> Ted Zlatanov <tzz@lifelogs.com> writes:
>> I attach a revised patch against Emacs that DTRT inside tramp.el itself
>> (I think). Please check the logic because I don't know the Tramp
>> internals so well. Also we could pass `tramp-current-user' with the
>> :user search key to `auth-source-search', if it's known. I don't know
>> if that's TRT for Tramp.
MA> You're patch looks OK to me (but I haven't tested). If a user is given
MA> in the remote file name, it is set in `tramp-current-user', indeed;
MA> otherwise `tramp-current-user' is nil. So you could check it and use it
MA> when non-nil.
How about this:
(setq auth-info
(tramp-compat-funcall
'auth-source-search
:max 1
:user (or tramp-current-user t)
:host tramp-current-host
:port tramp-current-method))
That will match any user if tramp-current-user is nil.
Ted
next prev parent reply other threads:[~2011-02-11 17:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-10 22:37 auth-source.el API change: Gnus and Emacs sync Ted Zlatanov
2011-02-11 8:21 ` Michael Albinus
2011-02-11 13:54 ` Ted Zlatanov
2011-02-11 16:37 ` Michael Albinus
2011-02-11 17:28 ` Ted Zlatanov [this message]
2011-02-12 13:49 ` Ted Zlatanov
2011-02-12 14:05 ` Michael Albinus
2011-02-12 18:00 ` Ted Zlatanov
2011-02-11 17:30 ` tramp-imap removal? (was: auth-source.el API change: Gnus and Emacs sync) Ted Zlatanov
2011-02-11 18:15 ` tramp-imap removal? Robert Pluim
2011-02-12 13:55 ` Ted Zlatanov
2011-02-13 13:00 ` Michael Albinus
2011-02-13 13:27 ` imap-hash.el and imap.el removed (was: tramp-imap removal?) Ted Zlatanov
2011-02-12 13:48 ` auth-source.el API change: Gnus and Emacs sync Ted Zlatanov
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://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877hd61nwc.fsf@lifelogs.com \
--to=tzz@lifelogs.com \
--cc=ding@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=tramp-devel@mail.freesoftware.fsf.org \
/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://git.savannah.gnu.org/cgit/emacs.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).