[gnus git] branch master updated: n0-17-87-gabc687f =5= Default to using the built-in gnutls support, if available. ; (auth-source-netrc-create): Don't query the bits that we already know. ; Merge branch 'master' of https://git.gnus.org/gnus ; Don't print all tokens in %S format, since that looks odd. Prefer the ~/.authinfo file over the ~/.authinfo.gpg file, especially when saving. ; Indent.

Lars Magne Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  abc687f25eb2159d5a04eb481b57396158265054 (commit)
       via  800de1cf6fbf50ac4ae911e66e432a8288a6a440 (commit)
       via  ae00ae88f84af9b21708cbb2ac32e2d2498d193c (commit)
       via  02fc1fe4f62db5f080b82588676a9efb6280978c (commit)
       via  570afb61f96d9cccd350f03364e4ac89d69886a8 (commit)
      from  7940bfecf607ddc4b5e444f930fb028b8a7f9751 (commit)


- Log -----------------------------------------------------------------
commit abc687f25eb2159d5a04eb481b57396158265054
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Thu Jun 23 01:42:09 2011 +0200

    Default to using the built-in gnutls support, if available.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ad0255a..2e4ac53 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
 2011-06-22  Lars Magne Ingebrigtsen  <[email protected]>
 
+	* proto-stream.el (proto-stream-open-starttls): Use
+	`gnutls-available-p' to see whether we have built-in support.
+
 	* auth-source.el (auth-source-netrc-create): Don't query the bits that
 	we already know.
 	(auth-source-forget-all-cached): Clear auth-source-netrc-cache, too.
diff --git a/lisp/proto-stream.el b/lisp/proto-stream.el
index 11eecf4..13afd4d 100644
--- a/lisp/proto-stream.el
+++ b/lisp/proto-stream.el
@@ -51,7 +51,8 @@
 (require 'tls)
 (require 'starttls)
 
-(declare-function gnutls-negotiate "gnutls" t t) ; defun*
+(autoload 'gnutls-negotiate "gnutls")
+(autoload 'open-gnutls-stream "gnutls")
 
 ;;;###autoload
 (defun open-protocol-stream (name buffer host service &rest parameters)
@@ -157,11 +158,13 @@ PARAMETERS should be a sequence of keywords and values:
 			 (proto-stream-command stream
 					       capability-command eoc)))
 	 (resulting-type 'plain)
+	 (builtin-starttls (and (fboundp 'gnutls-available-p)
+				(gnutls-available-p)))
 	 starttls-command)
 
     ;; If we have built-in STARTTLS support, try to upgrade the
     ;; connection.
-    (when (and (or (fboundp 'open-gnutls-stream)
+    (when (and (or builtin-starttls
 		   (and require-tls
 			(executable-find "gnutls-cli")))
 	       capabilities success-string starttls-function
@@ -169,7 +172,7 @@ PARAMETERS should be a sequence of keywords and values:
 		     (funcall starttls-function capabilities)))
       ;; If using external STARTTLS, drop this connection and start
       ;; anew with `starttls-open-stream'.
-      (unless (fboundp 'open-gnutls-stream)
+      (unless builtin-starttls
 	(delete-process stream)
 	(setq start (with-current-buffer buffer (point-max)))
 	(let* ((starttls-use-gnutls t)
@@ -184,7 +187,7 @@ PARAMETERS should be a sequence of keywords and values:
       (when (string-match success-string
 			  (proto-stream-command stream starttls-command eoc))
 	;; The server said it was OK to begin STARTTLS negotiations.
-	(if (fboundp 'open-gnutls-stream)
+	(if builtin-starttls
 	    (gnutls-negotiate :process stream :hostname host)
 	  (unless (starttls-negotiate stream)
 	    (delete-process stream)))
@@ -228,9 +231,11 @@ PARAMETERS should be a sequence of keywords and values:
 
 (defun proto-stream-open-tls (name buffer host service parameters)
   (with-current-buffer buffer
-    (let ((start (point-max))
+    (let* ((start (point-max))
+	   (builtin-starttls (and (fboundp 'gnutls-available-p)
+				  (gnutls-available-p)))
 	  (stream
-	   (funcall (if (fboundp 'open-gnutls-stream)
+	    (funcall (if builtin-starttls
 			'open-gnutls-stream
 		      'open-tls-stream)
 		    name buffer host service))
@@ -239,7 +244,7 @@ PARAMETERS should be a sequence of keywords and values:
 	  (list nil nil nil 'plain)
 	;; If we're using tls.el, we have to delete the output from
 	;; openssl/gnutls-cli.
-	(unless (fboundp 'open-gnutls-stream)
+	(unless builtin-starttls
 	  (proto-stream-get-response stream start eoc)
 	  (goto-char (point-min))
 	  (when (re-search-forward eoc nil t)

commit 800de1cf6fbf50ac4ae911e66e432a8288a6a440
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Wed Jun 22 16:47:24 2011 +0200

    (auth-source-netrc-create): Don't query the bits that we already know.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3ce932f..ad0255a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2011-06-22  Lars Magne Ingebrigtsen  <[email protected]>
+
+	* auth-source.el (auth-source-netrc-create): Don't query the bits that
+	we already know.
+	(auth-source-forget-all-cached): Clear auth-source-netrc-cache, too.
+	(auth-source-netrc-create): Don't prompt for the stuff we already know.
+
 2011-06-21  Lars Magne Ingebrigtsen  <[email protected]>
 
 	* auth-source.el (auth-source-netrc-create): Don't print all tokens in
diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index e0da445..daa3983 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -723,7 +723,8 @@ Returns the deleted entries."
         when (string-match (concat "^" auth-source-magic)
                            (symbol-name sym))
         ;; remove that key
-        do (password-cache-remove (symbol-name sym))))
+        do (password-cache-remove (symbol-name sym)))
+  (setq auth-source-netrc-cache nil))
 
 (defun auth-source-remember (spec found)
   "Remember FOUND search results for SPEC."
@@ -1154,6 +1155,9 @@ See `auth-source-search' for details on SPEC."
          ;; we know (because of an assertion in auth-source-search) that the
          ;; :create parameter is either t or a list (which includes nil)
          (create-extra (if (eq t create) nil create))
+	 (current-data (car (auth-source-search :max 1
+						:host host
+						:port port)))
          (required (append base-required create-extra))
          (file (oref backend source))
          (add "")
@@ -1188,7 +1192,9 @@ See `auth-source-search' for details on SPEC."
     (dolist (r required)
       (let* ((data (aget valist r))
              ;; take the first element if the data is a list
-             (data (auth-source-netrc-element-or-first data))
+             (data (or (auth-source-netrc-element-or-first data)
+		       (plist-get current-data
+				  (intern (format ":%s" r) obarray))))
              ;; this is the default to be offered
              (given-default (aget auth-source-creation-defaults r))
              ;; the default supplementals are simple:

commit ae00ae88f84af9b21708cbb2ac32e2d2498d193c
Merge: 02fc1fe 7940bfe
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Wed Jun 22 16:47:03 2011 +0200

    Merge branch 'master' of https://git.gnus.org/gnus


commit 02fc1fe4f62db5f080b82588676a9efb6280978c
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Tue Jun 21 23:14:01 2011 +0200

    Don't print all tokens in %S format, since that looks odd.
    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

commit 570afb61f96d9cccd350f03364e4ac89d69886a8
Author: Lars Magne Ingebrigtsen <[email protected]>
Date:   Tue Jun 21 22:08:50 2011 +0200

    Indent.


-----------------------------------------------------------------------
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       |   10 ++++++++++
 lisp/auth-source.el  |   10 ++++++++--
 lisp/nnimap.el       |    6 +++---
 lisp/proto-stream.el |   29 +++++++++++++++++------------
 4 files changed, 38 insertions(+), 17 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.