On Mon, 15 Nov 2010 17:03:30 +0100 Michael Albinus wrote: MA> Ted Zlatanov writes: >> OK, final revision I hope... Note all backends will just throw an error >> rather than changing the return value when creation fails. I think >> that's the least surprising behavior. MA> I'm OK with this. The auth-sources info pages might show some examples, MA> though. Attached is a version of auth-source.el I finally did over the weekend that implements: 1) defclass auth-source-backend (using eioio) which gives us a lot of flexibility, including the ability to let users customize the backends directly. 2) accepts auth-sources in the format '("~/.authinfo.gpg" "~/.authinfo") and the other ones that Customize can produce through the function auth-source-backend-parse 3) auth-source-search (the documentation is mostly unchanged, except for "You probably want at least a :secret property if you specify :create."). It returns early if :max is set. 4) netrc backend: auth-source-netrc-parse, auth-source-netrc-normalize, auth-source-netrc-search; not done: auth-source-netrc-create. This removes the dependency on netrc.el and simplifies things a bit. Note the alist-to-plist rewrite and key aliasing are done in auth-source-netrc-normalize. I didn't want to rewrite auth-source-netrc-parse too much from the starting point of netrc-parse. Also note the :secret key is a function now and clients have to expect that. I think that's a good thing. Everything after ;;; older API is unchanged from before and will probably be rewritten. Look it over and let me know what you think. I'm still not sure how the creation should work exactly and hope you will tell me how the rewrite "feels," especially considered against the Secrets API. Ted