From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel,gmane.emacs.tramp,gmane.emacs.gnus.general Subject: Re: auth-source.el API change: Gnus and Emacs sync Date: Fri, 11 Feb 2011 11:28:35 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <877hd61nwc.fsf@lifelogs.com> References: <87oc6j8qjt.fsf@lifelogs.com> <87k4h7dlse.fsf@gmx.de> <87fwru8yn6.fsf@lifelogs.com> <87hbcacytm.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1297445351 14447 80.91.229.12 (11 Feb 2011 17:29:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 11 Feb 2011 17:29:11 +0000 (UTC) Cc: tramp-devel@mail.freesoftware.fsf.org, ding@gnus.org To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 11 18:29:06 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pnwnq-0003ks-I6 for ged-emacs-devel@m.gmane.org; Fri, 11 Feb 2011 18:29:06 +0100 Original-Received: from localhost ([127.0.0.1]:55511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pnwnp-00048F-Ro for ged-emacs-devel@m.gmane.org; Fri, 11 Feb 2011 12:29:05 -0500 Original-Received: from [140.186.70.92] (port=47796 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pnwne-000431-Nd for emacs-devel@gnu.org; Fri, 11 Feb 2011 12:28:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pnwnd-0001ti-Fs for emacs-devel@gnu.org; Fri, 11 Feb 2011 12:28:54 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:55670) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pnwnd-0001tH-5a for emacs-devel@gnu.org; Fri, 11 Feb 2011 12:28:53 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Pnwna-0003YA-J1 for emacs-devel@gnu.org; Fri, 11 Feb 2011 18:28:50 +0100 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Feb 2011 18:28:50 +0100 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Feb 2011 18:28:50 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:MNsYZ8oAS5sU42RcBgcGFEkEd7s= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:135899 gmane.emacs.tramp:7646 gmane.emacs.gnus.general:76585 Archived-At: On Fri, 11 Feb 2011 17:37:09 +0100 Michael Albinus wrote: MA> Ted Zlatanov 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