[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: auth-source.el API change: Gnus and Emacs sync

From: Ted Zlatanov
Subject: Re: auth-source.el API change: Gnus and Emacs sync
Date: Fri, 11 Feb 2011 11:28:35 -0600
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

On Fri, 11 Feb 2011 17:37:09 +0100 Michael Albinus <address@hidden> wrote: 

MA> Ted Zlatanov <address@hidden> 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
         :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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]