summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGnus developers <ding@gnus.org>2010-10-13 22:21:20 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2010-10-13 22:21:20 +0000
commita1d16a7bd90d15d6a1a5aa804c08ae62d38646b5 (patch)
tree5ed6a0a90d5403d55ea1af16d52197067ef89d16
parent2e288d54f05ba6e72a227ed3857a8098ca585b50 (diff)
downloademacs-a1d16a7bd90d15d6a1a5aa804c08ae62d38646b5.tar.gz
emacs-a1d16a7bd90d15d6a1a5aa804c08ae62d38646b5.tar.bz2
emacs-a1d16a7bd90d15d6a1a5aa804c08ae62d38646b5.zip
Merge changes made in Gnus trunk.
auth.texi (GnuPG and EasyPG Assistant Configuration): Fix syntax and trim sentence. shr.el (shr-current-column): Remove buggy and unnecessary function. auth.texi: Fix up pxref/xref. auth.texi (GnuPG and EasyPG Assistant Configuration): Fix up the @item syntax for in-Emacs makeinfo. gnus-spec.el (gnus-parse-simple-format): princ doesn't really insert anything in Emacs. mm-decode.el (mm-shr): Allow use from non-Gnus users. nnimap.el (nnimap-parse-flags): Be more strict when looking for FETCH responses. nnimap.el, tls.el: Rip the STARTTLS stuff out of tls.el again, and just bind it directly from nnimap. shr.el (shr-find-fill-point): Use a filling algorithm that should probably work for CJVK text, too. nnimap.el (nnimap-open-connection): Fix open-tls-stream call. nnimap.el (nnimap-parse-flags): Fix regexp. tls.el (tls-program): Remove spurious %s from openssl. shr.el (shr-find-fill-point): Don't inloop on indented text.
-rw-r--r--doc/misc/ChangeLog10
-rw-r--r--doc/misc/auth.texi24
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/gnus/ChangeLog27
-rw-r--r--lisp/gnus/gnus-spec.el2
-rw-r--r--lisp/gnus/mm-decode.el7
-rw-r--r--lisp/gnus/nnimap.el20
-rw-r--r--lisp/gnus/shr.el21
-rw-r--r--lisp/net/tls.el16
9 files changed, 75 insertions, 59 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index adf5fd9b010..d3ecce317f3 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,13 @@
+2010-10-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * auth.texi (GnuPG and EasyPG Assistant Configuration): Fix up the
+ @item syntax for in-Emacs makeinfo.
+
+2010-10-13 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * auth.texi (GnuPG and EasyPG Assistant Configuration): Fix syntax and
+ trim sentence.
+
2010-10-12 Daiki Ueno <ueno@unixuser.org>
* epa.texi (Caching Passphrases):
diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi
index 66fe860fc0d..e6c23e9435a 100644
--- a/doc/misc/auth.texi
+++ b/doc/misc/auth.texi
@@ -177,8 +177,8 @@ for details.
If you don't customize @code{auth-sources}, you'll have to live with
the defaults: any host and any port are looked up in the netrc
-file @code{~/.authinfo.gpg}, which is a GnuPG encrypted file.
-@xref{GnuPG and EasyPG Assistant Configuration}.
+file @code{~/.authinfo.gpg}, which is a GnuPG encrypted file
+(@pxref{GnuPG and EasyPG Assistant Configuration}).
The simplest working netrc line example is one without a port.
@@ -271,9 +271,8 @@ If you don't customize @code{auth-sources}, the auth-source library
reads @code{~/.authinfo.gpg}, which is a GnuPG encrypted file.
In Emacs 23 or later there is an option @code{auto-encryption-mode} to
-automatically decrypt @code{*.gpg} files. It is enabled by default so
-there is no setting is needed. If you are using earlier versions of
-Emacs, you will need:
+automatically decrypt @code{*.gpg} files. It is enabled by default.
+If you are using earlier versions of Emacs, you will need:
@lisp
(require 'epa-file)
@@ -282,14 +281,17 @@ Emacs, you will need:
If you want your GnuPG passwords to be cached, set up @code{gpg-agent}
or EasyPG Assitant
-@pxref{Caching Passphrases, , Caching Passphrases, epa}
+@xref{Caching Passphrases, , Caching Passphrases, epa}
To quick start, here are some questions:
@enumerate
-@item Do you use GnuPG version 2 instead of GnuPG version 1?
-@item Do you use symmetric encryption rather than public key encryption?
-@item Do you want to use gpg-agent?
+@item
+Do you use GnuPG version 2 instead of GnuPG version 1?
+@item
+Do you use symmetric encryption rather than public key encryption?
+@item
+Do you want to use gpg-agent?
@end enumerate
Here are configurations depending on your answers:
@@ -306,8 +308,8 @@ Here are configurations depending on your answers:
@item No @tab No @tab No @tab You can't, without gpg-agent.
@end multitable
-To set up gpg-agent, follow the instruction in GnuPG manual.
-@pxref{Invoking GPG-AGENT, , Invoking GPG-AGENT, gnupg}.
+To set up gpg-agent, follow the instruction in GnuPG manual
+(@pxref{Invoking GPG-AGENT, , Invoking GPG-AGENT, gnupg}).
To set up elisp passphrase cache, set
@code{epa-file-cache-passphrase-for-symmetric-encryption}.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 190feab75bf..8660ded07b1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2010-10-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * net/tls.el (tls-program): Remove spurious %s from openssl.
+ (tls-starttls-switches): Remove starttls hack.
+ (open-tls-stream): Ditto.
+ (tls-find-starttls-argument): Ditto.
+
2010-10-13 Juanma Barranquero <lekktu@gmail.com>
* image.el (image-library-alist): Declare as obsolete alias.
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index a568a530927..fe642f09b1e 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,30 @@
+2010-10-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * shr.el (shr-find-fill-point): Don't inloop on indented text.
+
+ * nnimap.el (nnimap-open-connection): Fix open-tls-stream call.
+ (nnimap-parse-flags): Fix regexp.
+
+ * shr.el (shr-find-fill-point): Use a filling algorithm that should
+ probably work for CJVK text, too.
+
+ * nnimap.el (nnimap-extend-tls-programs): Removed.
+ (nnimap-open-connection): Bind STARTTLS to openssl explicitly.
+
+2010-10-13 Julien Danjou <julien@danjou.info>
+
+ * nnimap.el (nnimap-parse-flags): Be more strict when looking for FETCH
+ responses.
+
+2010-10-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * mm-decode.el (mm-shr): Allow use from non-Gnus users.
+
+ * gnus-spec.el (gnus-parse-simple-format): princ doesn't really insert
+ anything in Emacs.
+
+ * shr.el (shr-current-column): Remove buggy and unnecessary function.
+
2010-10-13 Julien Danjou <julien@danjou.info>
* shr.el (shr-width): Make shr-width a defcustom with default to
diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el
index b354793b056..31e440e22dd 100644
--- a/lisp/gnus/gnus-spec.el
+++ b/lisp/gnus/gnus-spec.el
@@ -680,7 +680,7 @@ are supported for %s."
((string= fstring "%d")
(setq dontinsert t)
(if insert
- (list `(princ ,(car flist)))
+ `(insert (int-to-string ,(car flist)))
(list `(int-to-string ,(car flist)))))
;; Just lots of chars and strings.
((string-match "\\`\\(%[cs]\\)+\\'" fstring)
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 8be4bb7047c..ba29a64d9de 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -1691,8 +1691,11 @@ If RECURSIVE, search recursively."
;; Require since we bind its variables.
(require 'shr)
(let ((article-buffer (current-buffer))
- (shr-blocked-images (with-current-buffer gnus-summary-buffer
- gnus-blocked-images))
+ (shr-blocked-images (if (and (boundp 'gnus-summary-buffer)
+ (buffer-name gnus-summary-buffer))
+ (with-current-buffer gnus-summary-buffer
+ gnus-blocked-images)
+ shr-blocked-images))
(shr-content-function (lambda (id)
(let ((handle (mm-get-content-id id)))
(when handle
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index c6c8787a6c0..5aca6f3c835 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -318,11 +318,10 @@ textual parts.")
(setq port (or nnimap-server-port "imap")))
'("imap"))
((eq nnimap-stream 'starttls)
- (let ((tls-program (nnimap-extend-tls-programs)))
+ (let ((tls-program "openssl s_client %s -connect %h:%p -no_ssl2 -ign_eof -starttls imap"))
(open-tls-stream
"*nnimap*" (current-buffer) nnimap-address
- (setq port (or nnimap-server-port "imap"))
- 'starttls))
+ (setq port (or nnimap-server-port "imap"))))
'("imap"))
((memq nnimap-stream '(ssl tls))
(funcall (if (fboundp 'open-gnutls-stream)
@@ -419,19 +418,6 @@ textual parts.")
(nnimap-command "ENABLE QRESYNC"))
(nnimap-process nnimap-object))))))))
-(defun nnimap-extend-tls-programs ()
- (let ((programs tls-program)
- result)
- (unless (consp programs)
- (setq programs (list programs)))
- (dolist (program programs)
- (when (assoc (car (split-string program)) tls-starttls-switches)
- (push (if (not (string-match "%s" program))
- (concat program " " "%s")
- program)
- result)))
- (nreverse result)))
-
(defun nnimap-find-parameter (parameter elems)
(let (result)
(dolist (elem elems)
@@ -1303,7 +1289,7 @@ textual parts.")
(setq start end))
(setq start (point))
(goto-char end))
- (while (search-forward " FETCH " start t)
+ (while (re-search-forward "^\\* [0-9]+ FETCH " start t)
(setq elems (read (current-buffer)))
(push (cons (cadr (memq 'UID elems))
(cadr (memq 'FLAGS elems)))
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el
index 8a0e814bca3..119fd97edc0 100644
--- a/lisp/gnus/shr.el
+++ b/lisp/gnus/shr.el
@@ -219,8 +219,8 @@ redirects somewhere else."
(unless shr-start
(setq shr-start (point)))
(insert elem)
- (when (> (shr-current-column) shr-width)
- (if (not (search-backward " " (line-beginning-position) t))
+ (while (> (current-column) shr-width)
+ (if (not (shr-find-fill-point))
(insert "\n")
(delete-char 1)
(insert "\n")
@@ -235,23 +235,16 @@ redirects somewhere else."
(defun shr-find-fill-point ()
(let ((found nil))
(while (and (not found)
- (not (bolp)))
- (when (or (eq (preceding-char) ? )
- (aref fill-find-break-point-function-table (preceding-char)))
+ (> (current-column) shr-indentation))
+ (when (and (or (eq (preceding-char) ? )
+ (aref fill-find-break-point-function-table
+ (preceding-char)))
+ (<= (current-column) shr-width))
(setq found (point)))
(backward-char 1))
(or found
(end-of-line))))
-(defun shr-current-column ()
- (let ((column 0))
- (save-excursion
- (beginning-of-line)
- (while (not (eolp))
- (incf column (char-width (following-char)))
- (forward-char 1)))
- column))
-
(defun shr-ensure-newline ()
(unless (zerop (current-column))
(insert "\n")))
diff --git a/lisp/net/tls.el b/lisp/net/tls.el
index daa1c18c8bf..0ab4293f0d6 100644
--- a/lisp/net/tls.el
+++ b/lisp/net/tls.el
@@ -75,13 +75,9 @@ and `gnutls-cli' (version 2.0.1) output."
:type 'regexp
:group 'tls)
-(defvar tls-starttls-switches
- '(("openssl" "-starttls imap"))
- "Alist of programs and the switches necessary to get starttls behaviour.")
-
(defcustom tls-program '("gnutls-cli --insecure -p %p %h"
"gnutls-cli --insecure -p %p %h --protocols ssl3"
- "openssl s_client %s -connect %h:%p -no_ssl2 -ign_eof")
+ "openssl s_client -connect %h:%p -no_ssl2 -ign_eof")
"List of strings containing commands to start TLS stream to a host.
Each entry in the list is tried until a connection is successful.
%h is replaced with server hostname, %p with port to connect to.
@@ -203,7 +199,7 @@ Used by `tls-certificate-information'."
(push (cons (match-string 1) (match-string 2)) vals))
(nreverse vals))))))
-(defun open-tls-stream (name buffer host port &optional starttlsp)
+(defun open-tls-stream (name buffer host port)
"Open a TLS connection for a port to a host.
Returns a subprocess-object to represent the connection.
Input and output work as for subprocesses; `delete-process' closes it.
@@ -233,9 +229,6 @@ Fourth arg PORT is an integer specifying a port to connect to."
(format-spec
cmd
(format-spec-make
- ?s (if starttlsp
- (tls-find-starttls-argument cmd)
- "")
?h host
?p (if (integerp port)
(int-to-string port)
@@ -307,11 +300,6 @@ match `%s'. Connect anyway? " host))))))
(kill-buffer buffer))
done))
-(defun tls-find-starttls-argument (command)
- (let ((command (car (split-string command))))
- (or (cadr (assoc command tls-starttls-switches))
- "")))
-
(provide 'tls)
;;; tls.el ends here