[gnus git] branch master updated: =2= * auth.texi (Help for users): Login collection is "Login" and not "login". ; Remove CL functions. Fix Secrets Login collection name.
Ted Zlatanov <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via c66426e1fb22d2f7767c57015af4ea5eff9fa6ea (commit)
via 348d29a61ad11c0a4cd5075fee37455795d8cf5f (commit)
from cf3ead3300a44aabfdbed5c101fc751c1205ee4c (commit)
- Log -----------------------------------------------------------------
commit c66426e1fb22d2f7767c57015af4ea5eff9fa6ea
Author: Ted Zlatanov <[email protected]>
Date: Mon Feb 14 08:48:31 2011 -0600
* auth.texi (Help for users): Login collection is "Login" and not "login".
diff --git a/texi/ChangeLog b/texi/ChangeLog
index 10efc8f..41e8909 100644
--- a/texi/ChangeLog
+++ b/texi/ChangeLog
@@ -1,3 +1,7 @@
+2011-02-14 Teodor Zlatanov <[email protected]>
+
+ * auth.texi (Help for users): Login collection is "Login" and not "login".
+
2011-02-11 Teodor Zlatanov <[email protected]>
* auth.texi (Overview, Help for users, Help for developers): Update docs.
diff --git a/texi/auth.texi b/texi/auth.texi
index 62a958d..d1208d5 100644
--- a/texi/auth.texi
+++ b/texi/auth.texi
@@ -161,8 +161,8 @@ and simplest configuration is:
(setq auth-sources '((:source "~/.authinfo.gpg")))
;;; even shorter and the @emph{default}:
(setq auth-sources '("~/.authinfo.gpg" "~/.authinfo"))
-;;; use the Secrets API @var{login} collection (@pxref{Secret Service API})
-(setq auth-sources '("secrets:login"))
+;;; use the Secrets API @var{Login} collection (@pxref{Secret Service API})
+(setq auth-sources '("secrets:Login"))
@end lisp
By adding multiple entries to @code{auth-sources} with a particular
commit 348d29a61ad11c0a4cd5075fee37455795d8cf5f
Author: Ted Zlatanov <[email protected]>
Date: Mon Feb 14 08:47:59 2011 -0600
Remove CL functions. Fix Secrets Login collection name.
* auth-source.el (auth-source-secrets-search): Use `delete-dups',
`append mapcar', and `butlast' instead of `remove-duplicates',
`mapcan', and `subseq'.
(auth-sources, auth-source-backend-parse, auth-source-secrets-search):
Login collection is "Login" and not "login".
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 310947c..79d6423 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -3,6 +3,10 @@
* auth-source.el (auth-source-backend-parse-parameters): Don't rely on
`plist-get' to accept non-list parameters (XEmacs issue). Fix
docstring.
+ (auth-source-secrets-search): Use `delete-dups', `append mapcar', and
+ `butlast' instead of `remove-duplicates', `mapcan', and `subseq'.
+ (auth-sources, auth-source-backend-parse, auth-source-secrets-search):
+ Login collection is "Login" and not "login".
2011-02-14 Lars Ingebrigtsen <[email protected]>
diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index be698ad..0692dbb 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -173,7 +173,7 @@ can get pretty complex."
(choice
(string :tag "Just a file")
(const :tag "Default Secrets API Collection" 'default)
- (const :tag "Login Secrets API Collection" "secrets:login")
+ (const :tag "Login Secrets API Collection" "secrets:Login")
(const :tag "Temp Secrets API Collection" "secrets:session")
(list :tag "Source definition"
(const :format "" :value :source)
@@ -185,7 +185,7 @@ can get pretty complex."
(choice :tag "Collection to use"
(string :tag "Collection name")
(const :tag "Default" 'default)
- (const :tag "Login" "login")
+ (const :tag "Login" "Login")
(const
:tag "Temporary" "session"))))
(repeat :tag "Extra Parameters" :inline t
@@ -252,19 +252,19 @@ If the value is not a list, symmetric encryption will be used."
;; (auth-source-pick t :host "any" :protocol 'imap :user "joe")
;; (setq auth-sources '((:source (:secrets default) :host t :protocol t :user "joe")
;; (:source (:secrets "session") :host t :protocol t :user "joe")
-;; (:source (:secrets "login") :host t :protocol t)
+;; (:source (:secrets "Login") :host t :protocol t)
;; (:source "~/.authinfo.gpg" :host t :protocol t)))
;; (setq auth-sources '((:source (:secrets default) :host t :protocol t :user "joe")
;; (:source (:secrets "session") :host t :protocol t :user "joe")
-;; (:source (:secrets "login") :host t :protocol t)
+;; (:source (:secrets "Login") :host t :protocol t)
;; ))
;; (setq auth-sources '((:source "~/.authinfo.gpg" :host t :protocol t)))
;; (auth-source-backend-parse "myfile.gpg")
;; (auth-source-backend-parse 'default)
-;; (auth-source-backend-parse "secrets:login")
+;; (auth-source-backend-parse "secrets:Login")
(defun auth-source-backend-parse (entry)
"Creates an auth-source-backend from an ENTRY in `auth-sources'."
@@ -307,10 +307,10 @@ If the value is not a list, symmetric encryption will be used."
"session")))
;; if the source is a symbol, we look for the alias named so,
- ;; and if that alias is missing, we use "login"
+ ;; and if that alias is missing, we use "Login"
(when (symbolp source)
(setq source (or (secrets-get-alias (symbol-name source))
- "login")))
+ "Login")))
(auth-source-backend
(format "Secrets API (%s)" source)
@@ -938,8 +938,8 @@ See `auth-source-search' for details on SPEC."
;;; (let ((auth-sources '(default))) (auth-source-search :max 1 :delete t))
;;; (let ((auth-sources '(default))) (auth-source-search :max 1))
;;; (let ((auth-sources '(default))) (auth-source-search))
-;;; (let ((auth-sources '("secrets:login"))) (auth-source-search :max 1))
-;;; (let ((auth-sources '("secrets:login"))) (auth-source-search :max 1 :signon_realm "https://git.gnus.org/Git"))
+;;; (let ((auth-sources '("secrets:Login"))) (auth-source-search :max 1))
+;;; (let ((auth-sources '("secrets:Login"))) (auth-source-search :max 1 :signon_realm "https://git.gnus.org/Git"))
(defun* auth-source-secrets-search (&rest
spec
@@ -957,23 +957,23 @@ matching, do a wider search and narrow it down yourself.
You'll get back all the properties of the token as a plist.
-Here's an example that looks for the first item in the 'login'
+Here's an example that looks for the first item in the 'Login'
Secrets collection:
- \(let ((auth-sources '(\"secrets:login\")))
+ \(let ((auth-sources '(\"secrets:Login\")))
(auth-source-search :max 1)
-Here's another that looks for the first item in the 'login'
+Here's another that looks for the first item in the 'Login'
Secrets collection whose label contains 'gnus':
- \(let ((auth-sources '(\"secrets:login\")))
+ \(let ((auth-sources '(\"secrets:Login\")))
(auth-source-search :max 1 :label \"gnus\")
-And this one looks for the first item in the 'login' Secrets
+And this one looks for the first item in the 'Login' Secrets
collection that's a Google Chrome entry for the git.gnus.org site
-login:
+authentication tokens:
- \(let ((auth-sources '(\"secrets:login\")))
+ \(let ((auth-sources '(\"secrets:Login\")))
(auth-source-search :max 1 :signon_realm \"https://git.gnus.org/Git\"))
"
@@ -993,13 +993,15 @@ login:
collect (nth i spec)))
;; build a search spec without the ignored keys
;; if a search key is nil or t (match anything), we skip it
- (search-spec (mapcan (lambda (k) (if (or (null (plist-get spec k))
+ (search-spec (apply 'append (mapcar
+ (lambda (k)
+ (if (or (null (plist-get spec k))
(eq t (plist-get spec k)))
nil
(list k (plist-get spec k))))
- search-keys))
+ search-keys)))
;; needed keys (always including host, login, protocol, and secret)
- (returned-keys (remove-duplicates (append
+ (returned-keys (delete-dups (append
'(:host :login :protocol :secret)
search-keys)))
(items (loop for item in (apply 'secrets-search-items coll search-spec)
@@ -1007,7 +1009,7 @@ login:
(not (string-match label item)))
collect item))
;; TODO: respect max in `secrets-search-items', not after the fact
- (items (subseq items 0 (min (length items) max)))
+ (items (butlast items (- (length items) max)))
;; convert the item name to a full plist
(items (mapcar (lambda (item)
(append
@@ -1017,18 +1019,20 @@ login:
(lexical-let ((v (secrets-get-secret coll item)))
(lambda () v)))
;; rewrite the entry from ((k1 v1) (k2 v2)) to plist
- (mapcan (lambda (entry)
+ (apply 'append
+ (mapcar (lambda (entry)
(list (car entry) (cdr entry)))
- (secrets-get-attributes coll item))))
+ (secrets-get-attributes coll item)))))
items))
;; ensure each item has each key in `returned-keys'
(items (mapcar (lambda (plist)
(append
- (mapcan (lambda (req)
+ (apply 'append
+ (mapcar (lambda (req)
(if (plist-get plist req)
nil
(list req nil)))
- returned-keys)
+ returned-keys))
plist))
items)))
items))
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 4 +++
lisp/auth-source.el | 70 +++++++++++++++++++++++++++------------------------
texi/ChangeLog | 4 +++
texi/auth.texi | 4 +-
4 files changed, 47 insertions(+), 35 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project