From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Subject: Re: auth-source.el and eieio
Date: Mon, 14 Feb 2011 10:54:16 -0600 [thread overview]
Message-ID: <87hbc6sgjr.fsf@lifelogs.com> (raw)
In-Reply-To: <87hbc6k48p.fsf@gmx.de>
[-- Attachment #1: Type: text/plain, Size: 850 bytes --]
On Mon, 14 Feb 2011 16:47:18 +0100 Michael Albinus <michael.albinus@gmx.de> wrote:
MA> Ted Zlatanov <tzz@lifelogs.com> writes:
>> It's all autoloaded, so the user will get an error when he searches. I
>> can do an assert in `auth-source-secrets-search' to fail early or fail
>> even earlier in `auth-source-backend-parse'. WDYT?
MA> If there are no compilation errors, I believe it is OK to fail with a
MA> meaningful message.
MA> However, it gives the burden to the user to initialize auth-sources
MA> depending on availability of secrets.el. So maybe it is more convenient
MA> to ignore :secrets entries in such a case, raising a warning (with
MA> confirmation to continue).
Something like this, except using another warning facility besides
`auth-source-do-debug'? I assume (featurep 'secrets) will work even
if autoloading is used.
Ted
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: auth-nosecrets.patch --]
[-- Type: text/x-diff, Size: 1129 bytes --]
diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index 0692dbb..6a2e500 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -312,12 +312,19 @@ If the value is not a list, symmetric encryption will be used."
(setq source (or (secrets-get-alias (symbol-name source))
"Login")))
- (auth-source-backend
- (format "Secrets API (%s)" source)
- :source source
- :type 'secrets
- :search-function 'auth-source-secrets-search
- :create-function 'auth-source-secrets-create)))
+ (if (featurep 'secrets)
+ (auth-source-backend
+ (format "Secrets API (%s)" source)
+ :source source
+ :type 'secrets
+ :search-function 'auth-source-secrets-search
+ :create-function 'auth-source-secrets-create)
+ (auth-source-do-debug
+ "auth-source-backend-parse: no Secrets API, ignoring spec: %S" entry)
+ (auth-source-backend
+ (format "Ignored Secrets API (%s)" source)
+ :source ""
+ :type 'ignore))))
;; none of them
(t
prev parent reply other threads:[~2011-02-14 16:54 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-14 1:25 Katsumi Yamaoka
2011-02-14 1:45 ` Lars Ingebrigtsen
2011-02-14 15:33 ` Ted Zlatanov
2011-02-14 15:40 ` Richard Riley
2011-02-14 16:49 ` Ted Zlatanov
2011-02-14 17:39 ` David Engster
2011-02-14 18:02 ` Ted Zlatanov
2011-02-14 20:16 ` Lars Ingebrigtsen
2011-02-14 20:44 ` David Engster
2011-02-14 20:45 ` Reiner Steib
2011-02-14 21:09 ` Lars Ingebrigtsen
2011-02-14 22:01 ` Steinar Bang
2011-02-16 9:20 ` Reiner Steib
2011-02-16 19:10 ` Ted Zlatanov
2011-02-16 20:59 ` David Engster
2011-02-14 21:07 ` Ted Zlatanov
2011-02-14 21:18 ` Lars Ingebrigtsen
2011-02-14 21:26 ` David Engster
2011-02-14 21:39 ` Ted Zlatanov
2011-02-14 21:53 ` David Engster
2011-02-14 21:57 ` Lars Ingebrigtsen
2011-02-14 22:07 ` Ted Zlatanov
2011-02-14 22:20 ` Lars Ingebrigtsen
2011-02-14 22:33 ` Ted Zlatanov
2011-02-15 8:11 ` Reiner Steib
2011-02-15 8:41 ` David Engster
2011-02-15 13:43 ` Ted Zlatanov
2011-02-15 14:11 ` Steinar Bang
2011-02-16 20:28 ` Reiner Steib
2011-02-16 20:50 ` Ted Zlatanov
2011-02-16 22:16 ` Ted Zlatanov
2011-02-17 0:31 ` Katsumi Yamaoka
2011-02-17 0:40 ` Matt Lundin
2011-02-17 14:02 ` Steinar Bang
2011-02-17 17:06 ` Ted Zlatanov
2011-02-17 18:46 ` Steinar Bang
2011-02-17 22:01 ` Steinar Bang
2011-02-17 22:39 ` Lars Ingebrigtsen
2011-02-18 8:48 ` Steinar Bang
2011-02-18 10:52 ` Steinar Bang
2011-02-18 12:22 ` Steinar Bang
2011-02-18 20:26 ` Ted Zlatanov
2011-02-18 21:33 ` Charles Philip Chan
2011-02-19 18:00 ` Charles Philip Chan
2011-02-21 16:53 ` Charles Philip Chan
2011-02-18 22:11 ` Lars Ingebrigtsen
2011-02-22 21:53 ` Ted Zlatanov
2011-02-14 22:46 ` David Engster
2011-02-15 8:37 ` Steinar Bang
2011-02-14 22:18 ` David Engster
2011-02-14 22:04 ` Steinar Bang
2011-02-15 8:13 ` Jochen Hein
2011-02-16 20:15 ` Jochen Hein
2011-02-14 9:49 ` Michael Albinus
2011-02-14 15:26 ` Ted Zlatanov
2011-02-14 15:47 ` Michael Albinus
2011-02-14 16:54 ` Ted Zlatanov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hbc6sgjr.fsf@lifelogs.com \
--to=tzz@lifelogs.com \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).