[gnus git] branch master updated: n0-17-82-g7940bfe =1= auth-source.el (auth-source-netrc-create): Don't print all tokens in %S format, since that looks odd. (auth-sources): Prefer the ~/.authinfo file over the ~/.authinfo.gpg file, especially when saving.

Katsumi Yamaoka <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  7940bfecf607ddc4b5e444f930fb028b8a7f9751 (commit)
      from  b8995ceb12e4f0105a993f729936f972311f8105 (commit)


- Log -----------------------------------------------------------------
commit 7940bfecf607ddc4b5e444f930fb028b8a7f9751
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Tue Jun 21 22:17:14 2011 +0000

    auth-source.el (auth-source-netrc-create): Don't print all tokens in %S format, since that looks odd.
     (auth-sources): Prefer the ~/.authinfo file over the ~/.authinfo.gpg file, especially when saving.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 812ca82..3ce932f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2011-06-21  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* auth-source.el (auth-source-netrc-create): Don't print all tokens in
+	%S format, since that looks odd.
+	(auth-sources): Prefer the ~/.authinfo file over the ~/.authinfo.gpg
+	file, especially when saving.
+
 2011-06-21  Andrew Cohen  <[email protected]>
 
 	* nnimap.el (nnimap-find-article-by-message-id): return nil when no
diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index 0f2622a..e0da445 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -218,7 +218,7 @@ If the value is a function, debug messages are logged by calling
           (function :tag "Function that takes arguments like `message'")
           (const :tag "Don't log anything" nil)))
 
-(defcustom auth-sources '("~/.authinfo.gpg" "~/.authinfo" "~/.netrc")
+(defcustom auth-sources '("~/.authinfo" "~/.authinfo.gpg" "~/.netrc")
   "List of authentication sources.
 
 The default will get login and password information from
@@ -1291,7 +1291,7 @@ See `auth-source-search' for details on SPEC."
           (let ((printer (lambda ()
                            ;; append the key (the symbol name of r)
                            ;; and the value in r
-                           (format "%s%s %S"
+                           (format "%s%s %s"
                                    ;; prepend a space
                                    (if (zerop (length add)) "" " ")
                                    ;; remap auth-source tokens to netrc
@@ -1301,8 +1301,9 @@ See `auth-source-search' for details on SPEC."
                                      (secret "password")
                                      (port   "port") ; redundant but clearer
                                      (t (symbol-name r)))
-                                   ;; the value will be printed in %S format
-                                   data))))
+				   (if (string-match "[\" ]" data)
+				       (format "%S" data)
+				     data)))))
             (setq add (concat add (funcall printer)))))))
 
     (plist-put

-----------------------------------------------------------------------
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      |    7 +++++++
 lisp/auth-source.el |    9 +++++----
 2 files changed, 12 insertions(+), 4 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.