From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/80892 Path: news.gmane.org!not-for-mail From: Richard Riley Newsgroups: gmane.emacs.gnus.general Subject: Re: smtpmail authentication again Date: Fri, 13 Jan 2012 00:47:38 +0100 Organization: aich tea tea pea dicky riley dot net Message-ID: References: <87d3awtgda.fsf@lifelogs.com> <878vlktfy6.fsf@lifelogs.com> <874nw7slnv.fsf@lifelogs.com> <87fwfqouk3.fsf@lifelogs.com> <87wr8zei8c.fsf@lifelogs.com> <87k44zehr5.fsf@lifelogs.com> <87ty429x4u.fsf@lifelogs.com> Reply-To: ding@gnus.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1326412176 2623 80.91.229.12 (12 Jan 2012 23:49:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 12 Jan 2012 23:49:36 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M29174@lists.math.uh.edu Fri Jan 13 00:49:31 2012 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RlUOf-0003x4-Vj for ding-account@gmane.org; Fri, 13 Jan 2012 00:49:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1RlUNB-000601-FP; Thu, 12 Jan 2012 17:47:57 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1RlUNA-0005zs-BQ for ding@lists.math.uh.edu; Thu, 12 Jan 2012 17:47:56 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RlUN8-0003p9-Qa for ding@lists.math.uh.edu; Thu, 12 Jan 2012 17:47:55 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1RlUN6-0004QC-1A for ding@gnus.org; Fri, 13 Jan 2012 00:47:52 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RlUN5-0003L2-OJ for ding@gnus.org; Fri, 13 Jan 2012 00:47:51 +0100 Original-Received: from 85.183.18.158 ([85.183.18.158]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 Jan 2012 00:47:51 +0100 Original-Received: from rileyrg by 85.183.18.158 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 13 Jan 2012 00:47:51 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 61 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 85.183.18.158 Mail-Copies-To: never User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.92 (gnu/linux) Cancel-Lock: sha1:segU2HX53/Zmm5WoUzg/xUoe3ho= X-Spam-Score: -2.8 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:80892 Archived-At: Ted Zlatanov writes: > On Wed, 11 Jan 2012 06:45:23 +0100 Richard Riley wrote: > > RR> I pulled nognus from git but this function is not there. there is > RR> an -or-password funtion > > RR> (auth-source-user-or-password MODE HOST PORT &optional USERNAME > RR> CREATE-MISSING) > > RR> but that takes different args. Can you confirm > RR> which repo this new function is in and sorry if Im wasting your time. > > It's in the Gnut Git repo. You did something wrong. Here's the > function, anyhow: > > > > #+begin_src lisp > (defun auth-source-user-and-password (host &optional user) > (let* ((auth-info (car > (if user > (auth-source-search > :host host > :user "yourusername" > :max 1 > :require '(:user :secret) > :create nil) > (auth-source-search > :host host > :max 1 > :require '(:user :secret) > :create nil)))) > (user (plist-get auth-info :user)) > (password (plist-get auth-info :secret))) > (when (functionp password) > (setq password (funcall password))) > (list user password auth-info))) > > #+end_src > > > > The old `auth-source-user-or-password' is obsolete. I named this one > slightly differently to liven things up a bit (think "who's on first?" > "user-or-password?" "no, user-AND-password" "AND is on second?" etc. :) > > Ted > > > > Problem isolated but not properly fixed : have some sort of nasty race issue/ side affect from loading nognus using el-get. Not relying on el-get to set the path and manually setting the path to my nognus installation BEFORE allowing el-get to do its stuff solved the issue. Cheers for the function, I think you see the value or use more clearly now - certainly my hidden password files are now a thing of the path and everything is in the authinfo gpg file.