emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104663: Prefer the ~/.authinfo file


From: Lars Magne Ingebrigtsen
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104663: Prefer the ~/.authinfo file over the ~/.authinfo.gpg file, especially when saving.
Date: Tue, 21 Jun 2011 22:51:45 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104663
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Tue 2011-06-21 22:51:45 +0200
message:
  Prefer the ~/.authinfo file over the ~/.authinfo.gpg file, especially when 
saving.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/auth-source.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2011-06-18 22:23:55 +0000
+++ b/lisp/gnus/ChangeLog       2011-06-21 20:51:45 +0000
@@ -1,3 +1,10 @@
+2011-06-21  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * 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  <address@hidden>
 
        * auth-source.el (auth-source-netrc-use-gpg-tokens): Replace

=== modified file 'lisp/gnus/auth-source.el'
--- a/lisp/gnus/auth-source.el  2011-06-18 22:23:55 +0000
+++ b/lisp/gnus/auth-source.el  2011-06-21 20:51:45 +0000
@@ -208,7 +208,7 @@
           (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 @@
           (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 @@
                                      (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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]