From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/75998 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.gnus.general Subject: Re: auth-source.el rewrite Date: Wed, 26 Jan 2011 20:35:34 +0100 Message-ID: <87fwsfihkp.fsf@gmx.de> References: <87d3qylr29.fsf@marauder.physik.uni-ulm.de> <87fwvu5ele.fsf_-_@lifelogs.com> <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> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1296070564 26521 80.91.229.12 (26 Jan 2011 19:36:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 26 Jan 2011 19:36:04 +0000 (UTC) Cc: ding@gnus.org To: Ted Zlatanov Original-X-From: ding-owner+M24350@lists.math.uh.edu Wed Jan 26 20:36:00 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 1PiB9r-0007mm-Tg for ding-account@gmane.org; Wed, 26 Jan 2011 20:36:00 +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 1PiB9h-0004ht-6C; Wed, 26 Jan 2011 13:35:49 -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 1PiB9f-0004hj-N2 for ding@lists.math.uh.edu; Wed, 26 Jan 2011 13:35:47 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PiB9c-0005SJ-Tk for ding@lists.math.uh.edu; Wed, 26 Jan 2011 13:35:47 -0600 Original-Received: from mailout-de.gmx.net ([213.165.64.23]) by quimby.gnus.org with smtp (Exim 4.72) (envelope-from ) id 1PiB9b-0000DQ-2M for ding@gnus.org; Wed, 26 Jan 2011 20:35:43 +0100 Original-Received: (qmail invoked by alias); 26 Jan 2011 19:35:37 -0000 Original-Received: from p57BBD4A2.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.212.162] by mail.gmx.net (mp051) with SMTP; 26 Jan 2011 20:35:37 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX19Gn0ddvEdGe+AwIViy9SNk6Pc8bDO1Jei0qqOR7y djHy8xwLbXBhQl In-Reply-To: <8739ofzjfb.fsf@lifelogs.com> (Ted Zlatanov's message of "Wed, 26 Jan 2011 11:03:36 -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:75998 Archived-At: --=-=-= Content-Type: text/plain Ted Zlatanov writes: > MA> OK, but short tests help me to understand the API better. And if it > MA> comes to creation of new entries, I would like to *see* how it works. > > Bah. Now I have to write auth-source-netrc-create before the weekend :) For the rest, I've played already around. In general, the new API looks good to me. Appended is a patch for some few minor things I've observed during the game. And now waiting for the creation thingie ... > Ted Best regards, Michael. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment *** /home/albinus/lisp/auth-source.el.~1~ 2011-01-25 13:55:05.000000000 +0100 --- /home/albinus/lisp/auth-source.el 2011-01-26 17:41:59.223404487 +0100 *************** *** 41,46 **** --- 41,47 ---- (require 'gnus-util) (require 'netrc) + (require 'assoc) (eval-when-compile (require 'cl)) (eval-when-compile (require 'eieio)) *************** *** 93,104 **** ;;(auth-source-backend "netrc" :type 'netrc) - (defcustom auth-source-do-cache t - "Whether auth-source should cache information." - :group 'auth-source - :version "23.2" ;; No Gnus - :type `boolean) - (defcustom auth-source-protocols '((imap "imap" "imaps" "143" "993") (pop3 "pop3" "pop" "pop3s" "110" "995") (ssh "ssh" "22") --- 94,99 ---- *************** *** 173,179 **** It's best to customize this with `M-x customize-variable' because the choices can get pretty complex." :group 'auth-source ! :version "23.2" ;; No Gnus :type `(repeat :tag "Authentication Sources" (choice (string :tag "Just a file") --- 168,174 ---- It's best to customize this with `M-x customize-variable' because the choices can get pretty complex." :group 'auth-source ! :version "24.1" ;; No Gnus :type `(repeat :tag "Authentication Sources" (choice (string :tag "Just a file") *************** *** 216,222 **** "List of recipient keys that `authinfo.gpg' encrypted to. If the value is not a list, symmetric encryption will be used." :group 'auth-source ! :version "23.2" ;; No Gnus :type '(choice (const :tag "Symmetric encryption" t) (repeat :tag "Recipient public keys" (string :tag "Recipient public key")))) --- 211,217 ---- "List of recipient keys that `authinfo.gpg' encrypted to. If the value is not a list, symmetric encryption will be used." :group 'auth-source ! :version "24.1" ;; No Gnus :type '(choice (const :tag "Symmetric encryption" t) (repeat :tag "Recipient public keys" (string :tag "Recipient public key")))) *************** *** 592,598 **** "Given a property list SPEC, return search matches from the :backend. See `auth-source-search' for details on SPEC." ;; just in case, check that the type is correct ! (assert (eq type (oref backend type))) (let ((results (auth-source-netrc-normalize (auth-source-netrc-parse --- 587,593 ---- "Given a property list SPEC, return search matches from the :backend. See `auth-source-search' for details on SPEC." ;; just in case, check that the type is correct ! (assert (or (null type) (eq type (oref backend type)))) (let ((results (auth-source-netrc-normalize (auth-source-netrc-parse *************** *** 860,866 **** host protocol username) found) ; return the found data ;; else, if not found ! (let ((choices (apply 'auth-source-pick search))) (dolist (choice choices) (if delete-existing (apply 'auth-source-delete choice search) --- 855,861 ---- host protocol username) found) ; return the found data ;; else, if not found ! (let ((choices (apply 'auth-source-search search))) (dolist (choice choices) (if delete-existing (apply 'auth-source-delete choice search) --=-=-=--