From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/76120 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.gnus.general Subject: Re: auth-source.el rewrite Date: Sat, 29 Jan 2011 15:11:48 +0100 Message-ID: <87y663hk9n.fsf@gmx.de> References: <87wrp4yjtk.fsf@lifelogs.com> <87eiarj0eu.fsf@lifelogs.com> <87pqu795st.fsf@gmx.de> <87tyjjpfkw.fsf@lifelogs.com> <87ipzz8a79.fsf@gmx.de> <87k4ked3fq.fsf@lifelogs.com> <87pqu6vajx.fsf@gmx.de> <87bp36dxfc.fsf_-_@lifelogs.com> <87ipxdlvqd.fsf@gnus.org> <8762tc538p.fsf@lifelogs.com> <87k4hsitc0.fsf@gmx.de> <877hds1x07.fsf@lifelogs.com> <87ei80oyj9.fsf@gmx.de> <8739ofzjfb.fsf@lifelogs.com> <87fwsfihkp.fsf@gmx.de> <877hdrxv27.fsf@lifelogs.com> <8739ofxqf8.fsf@lifelogs.com> <87mxmm47hm.fsf@gmx.de> <87ei7yumj2.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1296310385 16694 80.91.229.12 (29 Jan 2011 14:13:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 29 Jan 2011 14:13:05 +0000 (UTC) Cc: ding@gnus.org To: Ted Zlatanov Original-X-From: ding-owner+M24472@lists.math.uh.edu Sat Jan 29 15:13:01 2011 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 1PjBXw-0008Q5-PM for ding-account@gmane.org; Sat, 29 Jan 2011 15:13:01 +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 1PjBX4-0006pn-Lo; Sat, 29 Jan 2011 08:12:06 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PjBX1-0006pa-VZ for ding@lists.math.uh.edu; Sat, 29 Jan 2011 08:12:03 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PjBWz-0001nR-S7 for ding@lists.math.uh.edu; Sat, 29 Jan 2011 08:12:03 -0600 Original-Received: from mailout-de.gmx.net ([213.165.64.22]) by quimby.gnus.org with smtp (Exim 4.72) (envelope-from ) id 1PjBWy-0003g5-AC for ding@gnus.org; Sat, 29 Jan 2011 15:12:00 +0100 Original-Received: (qmail invoked by alias); 29 Jan 2011 14:11:54 -0000 Original-Received: from p57BBC5A8.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.197.168] by mail.gmx.net (mp014) with SMTP; 29 Jan 2011 15:11:54 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX19P6Kokkb1PBBcw4AjtxmGLxsQqlt2PnxpqNlwjyh 53BtRPcReXk4Vm In-Reply-To: <87ei7yumj2.fsf@lifelogs.com> (Ted Zlatanov's message of "Thu, 27 Jan 2011 14:20:01 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:76120 Archived-At: Ted Zlatanov writes: > MA> Is it necessary to pass them as list with the keyword :create-extra-keys? > MA> Just allow them to be added to SPEC, and if they don't belong to the > MA> well known keywords, they are ignored during search, and used during > MA> creation. > > The problem is that you don't know which SPEC keywords should be used > for creation and some backends may not support some keywords. I'd > rather make it explicit, where there's a base list (for netrc: host user > protocol secret) and the user can augment it. That's also the only way > to pass the default prompt, meaning a value we'd like to suggest to the > user but which they can override. For example this: > > (auth-source-search :host '("nonesuch" "twosuch") :type 'netrc :max 1 > :create t :create-extra-keys '((A "default A") (B))) This results in Debugger entered--Lisp error: (void-variable A) symbol-value(A) (and (symbol-value r) (listp (symbol-value r))) For me, the argument list looks a little bit ugly. Couldn't we merge at least :create and :create-extra-keys, and use keys for the extra keys? Something like (auth-source-search :host '("nonesuch" "twosuch") :type 'netrc :max 1 :create '(:A "default A" :B)) The value for :create could also be t, when there are no extra keys. :replace-existing could be a special key in the list, which is not added to the new entry. > MA> What about using password-cache? If a user does not like password > MA> caching (for security reasons, or so), she could set password-cache to nil. > > MA> There is no need for an additional auth-source-do-cache then. > > Hmmm. But we're caching more than the password. It could work if the > key was not required to be a valid symbol name, so it could be a > serialized SPEC (the value doesn't have any restrictions). Right now > password-cache-* won't work. Any string works as key. In Tramp, I do it similar (serializing method, user, host, protocol). No big deal. > Ted Best regards, Michael.