From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/76602 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: Sat, 12 Feb 2011 07:49:46 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87d3mxjrb9.fsf@lifelogs.com> References: <87oc6j8qjt.fsf@lifelogs.com> <87k4h7dlse.fsf@gmx.de> <87fwru8yn6.fsf@lifelogs.com> <87hbcacytm.fsf@gmx.de> <877hd61nwc.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1297518636 2407 80.91.229.12 (12 Feb 2011 13:50:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 12 Feb 2011 13:50:36 +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 Sat Feb 12 14:50:32 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 1PoFrq-0003Xr-G5 for ged-emacs-devel@m.gmane.org; Sat, 12 Feb 2011 14:50:30 +0100 Original-Received: from localhost ([127.0.0.1]:51449 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PoFro-0000eZ-Hp for ged-emacs-devel@m.gmane.org; Sat, 12 Feb 2011 08:50:28 -0500 Original-Received: from [140.186.70.92] (port=43570 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PoFrk-0000eO-Bq for emacs-devel@gnu.org; Sat, 12 Feb 2011 08:50:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PoFri-0001uk-TG for emacs-devel@gnu.org; Sat, 12 Feb 2011 08:50:24 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:35910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PoFri-0001uH-I6 for emacs-devel@gnu.org; Sat, 12 Feb 2011 08:50:22 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PoFre-0003TJ-HY for emacs-devel@gnu.org; Sat, 12 Feb 2011 14:50:18 +0100 Original-Received: from c-67-186-102-106.hsd1.il.comcast.net ([67.186.102.106]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 12 Feb 2011 14:50:18 +0100 Original-Received: from tzz by c-67-186-102-106.hsd1.il.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 12 Feb 2011 14:50:18 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 33 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-67-186-102-106.hsd1.il.comcast.net 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:VXsHsYpcrvYiMlZKH4VLrEqsFk4= 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:135943 gmane.emacs.tramp:7650 gmane.emacs.gnus.general:76602 Archived-At: On Fri, 11 Feb 2011 11:28:35 -0600 Ted Zlatanov wrote: TZ> 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. TZ> How about this: TZ> (setq auth-info TZ> (tramp-compat-funcall TZ> 'auth-source-search TZ> :max 1 TZ> :user (or tramp-current-user t) TZ> :host tramp-current-host TZ> :port tramp-current-method)) TZ> That will match any user if tramp-current-user is nil. Michael, I'll wait for your reply before comitting my patch in Emacs. The backwards compatible wrapper of `auth-source-user-or-password' should be OK until then. Thanks Ted