]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefer the ~/.authinfo file over the ~/.authinfo.gpg file, especially when saving.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 21 Jun 2011 20:51:45 +0000 (22:51 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 21 Jun 2011 20:51:45 +0000 (22:51 +0200)
lisp/gnus/ChangeLog
lisp/gnus/auth-source.el

index 38c8a323eae356bf793818fd87ace714dadedaec..818440842cd509c25a2e07d6b7d430384fba6bb6 100644 (file)
@@ -1,3 +1,10 @@
+2011-06-21  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * 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-18  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * auth-source.el (auth-source-netrc-use-gpg-tokens): Replace
index e36bc9fbeddb98edd12f112a06723d574c46c454..d3261b137b2eb7f1220bd7dd732f2f6a2a87a979 100644 (file)
@@ -208,7 +208,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
@@ -1281,7 +1281,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
@@ -1291,8 +1291,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