diff options
| author | Gnus developers | 2010-10-13 22:21:20 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2010-10-13 22:21:20 +0000 |
| commit | a1d16a7bd90d15d6a1a5aa804c08ae62d38646b5 (patch) | |
| tree | 5ed6a0a90d5403d55ea1af16d52197067ef89d16 | |
| parent | 2e288d54f05ba6e72a227ed3857a8098ca585b50 (diff) | |
| download | emacs-a1d16a7bd90d15d6a1a5aa804c08ae62d38646b5.tar.gz 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/ChangeLog | 10 | ||||
| -rw-r--r-- | doc/misc/auth.texi | 24 | ||||
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/gnus/ChangeLog | 27 | ||||
| -rw-r--r-- | lisp/gnus/gnus-spec.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/mm-decode.el | 7 | ||||
| -rw-r--r-- | lisp/gnus/nnimap.el | 20 | ||||
| -rw-r--r-- | lisp/gnus/shr.el | 21 | ||||
| -rw-r--r-- | lisp/net/tls.el | 16 |
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 @@ | |||
| 1 | 2010-10-13 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * auth.texi (GnuPG and EasyPG Assistant Configuration): Fix up the | ||
| 4 | @item syntax for in-Emacs makeinfo. | ||
| 5 | |||
| 6 | 2010-10-13 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 7 | |||
| 8 | * auth.texi (GnuPG and EasyPG Assistant Configuration): Fix syntax and | ||
| 9 | trim sentence. | ||
| 10 | |||
| 1 | 2010-10-12 Daiki Ueno <ueno@unixuser.org> | 11 | 2010-10-12 Daiki Ueno <ueno@unixuser.org> |
| 2 | 12 | ||
| 3 | * epa.texi (Caching Passphrases): | 13 | * 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. | |||
| 177 | 177 | ||
| 178 | If you don't customize @code{auth-sources}, you'll have to live with | 178 | If you don't customize @code{auth-sources}, you'll have to live with |
| 179 | the defaults: any host and any port are looked up in the netrc | 179 | the defaults: any host and any port are looked up in the netrc |
| 180 | file @code{~/.authinfo.gpg}, which is a GnuPG encrypted file. | 180 | file @code{~/.authinfo.gpg}, which is a GnuPG encrypted file |
| 181 | @xref{GnuPG and EasyPG Assistant Configuration}. | 181 | (@pxref{GnuPG and EasyPG Assistant Configuration}). |
| 182 | 182 | ||
| 183 | The simplest working netrc line example is one without a port. | 183 | The simplest working netrc line example is one without a port. |
| 184 | 184 | ||
| @@ -271,9 +271,8 @@ If you don't customize @code{auth-sources}, the auth-source library | |||
| 271 | reads @code{~/.authinfo.gpg}, which is a GnuPG encrypted file. | 271 | reads @code{~/.authinfo.gpg}, which is a GnuPG encrypted file. |
| 272 | 272 | ||
| 273 | In Emacs 23 or later there is an option @code{auto-encryption-mode} to | 273 | In Emacs 23 or later there is an option @code{auto-encryption-mode} to |
| 274 | automatically decrypt @code{*.gpg} files. It is enabled by default so | 274 | automatically decrypt @code{*.gpg} files. It is enabled by default. |
| 275 | there is no setting is needed. If you are using earlier versions of | 275 | If you are using earlier versions of Emacs, you will need: |
| 276 | Emacs, you will need: | ||
| 277 | 276 | ||
| 278 | @lisp | 277 | @lisp |
| 279 | (require 'epa-file) | 278 | (require 'epa-file) |
| @@ -282,14 +281,17 @@ Emacs, you will need: | |||
| 282 | 281 | ||
| 283 | If you want your GnuPG passwords to be cached, set up @code{gpg-agent} | 282 | If you want your GnuPG passwords to be cached, set up @code{gpg-agent} |
| 284 | or EasyPG Assitant | 283 | or EasyPG Assitant |
| 285 | @pxref{Caching Passphrases, , Caching Passphrases, epa} | 284 | @xref{Caching Passphrases, , Caching Passphrases, epa} |
| 286 | 285 | ||
| 287 | To quick start, here are some questions: | 286 | To quick start, here are some questions: |
| 288 | 287 | ||
| 289 | @enumerate | 288 | @enumerate |
| 290 | @item Do you use GnuPG version 2 instead of GnuPG version 1? | 289 | @item |
| 291 | @item Do you use symmetric encryption rather than public key encryption? | 290 | Do you use GnuPG version 2 instead of GnuPG version 1? |
| 292 | @item Do you want to use gpg-agent? | 291 | @item |
| 292 | Do you use symmetric encryption rather than public key encryption? | ||
| 293 | @item | ||
| 294 | Do you want to use gpg-agent? | ||
| 293 | @end enumerate | 295 | @end enumerate |
| 294 | 296 | ||
| 295 | Here are configurations depending on your answers: | 297 | Here are configurations depending on your answers: |
| @@ -306,8 +308,8 @@ Here are configurations depending on your answers: | |||
| 306 | @item No @tab No @tab No @tab You can't, without gpg-agent. | 308 | @item No @tab No @tab No @tab You can't, without gpg-agent. |
| 307 | @end multitable | 309 | @end multitable |
| 308 | 310 | ||
| 309 | To set up gpg-agent, follow the instruction in GnuPG manual. | 311 | To set up gpg-agent, follow the instruction in GnuPG manual |
| 310 | @pxref{Invoking GPG-AGENT, , Invoking GPG-AGENT, gnupg}. | 312 | (@pxref{Invoking GPG-AGENT, , Invoking GPG-AGENT, gnupg}). |
| 311 | 313 | ||
| 312 | To set up elisp passphrase cache, set | 314 | To set up elisp passphrase cache, set |
| 313 | @code{epa-file-cache-passphrase-for-symmetric-encryption}. | 315 | @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 @@ | |||
| 1 | 2010-10-13 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * net/tls.el (tls-program): Remove spurious %s from openssl. | ||
| 4 | (tls-starttls-switches): Remove starttls hack. | ||
| 5 | (open-tls-stream): Ditto. | ||
| 6 | (tls-find-starttls-argument): Ditto. | ||
| 7 | |||
| 1 | 2010-10-13 Juanma Barranquero <lekktu@gmail.com> | 8 | 2010-10-13 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 9 | ||
| 3 | * image.el (image-library-alist): Declare as obsolete alias. | 10 | * 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 @@ | |||
| 1 | 2010-10-13 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * shr.el (shr-find-fill-point): Don't inloop on indented text. | ||
| 4 | |||
| 5 | * nnimap.el (nnimap-open-connection): Fix open-tls-stream call. | ||
| 6 | (nnimap-parse-flags): Fix regexp. | ||
| 7 | |||
| 8 | * shr.el (shr-find-fill-point): Use a filling algorithm that should | ||
| 9 | probably work for CJVK text, too. | ||
| 10 | |||
| 11 | * nnimap.el (nnimap-extend-tls-programs): Removed. | ||
| 12 | (nnimap-open-connection): Bind STARTTLS to openssl explicitly. | ||
| 13 | |||
| 14 | 2010-10-13 Julien Danjou <julien@danjou.info> | ||
| 15 | |||
| 16 | * nnimap.el (nnimap-parse-flags): Be more strict when looking for FETCH | ||
| 17 | responses. | ||
| 18 | |||
| 19 | 2010-10-13 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 20 | |||
| 21 | * mm-decode.el (mm-shr): Allow use from non-Gnus users. | ||
| 22 | |||
| 23 | * gnus-spec.el (gnus-parse-simple-format): princ doesn't really insert | ||
| 24 | anything in Emacs. | ||
| 25 | |||
| 26 | * shr.el (shr-current-column): Remove buggy and unnecessary function. | ||
| 27 | |||
| 1 | 2010-10-13 Julien Danjou <julien@danjou.info> | 28 | 2010-10-13 Julien Danjou <julien@danjou.info> |
| 2 | 29 | ||
| 3 | * shr.el (shr-width): Make shr-width a defcustom with default to | 30 | * 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." | |||
| 680 | ((string= fstring "%d") | 680 | ((string= fstring "%d") |
| 681 | (setq dontinsert t) | 681 | (setq dontinsert t) |
| 682 | (if insert | 682 | (if insert |
| 683 | (list `(princ ,(car flist))) | 683 | `(insert (int-to-string ,(car flist))) |
| 684 | (list `(int-to-string ,(car flist))))) | 684 | (list `(int-to-string ,(car flist))))) |
| 685 | ;; Just lots of chars and strings. | 685 | ;; Just lots of chars and strings. |
| 686 | ((string-match "\\`\\(%[cs]\\)+\\'" fstring) | 686 | ((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." | |||
| 1691 | ;; Require since we bind its variables. | 1691 | ;; Require since we bind its variables. |
| 1692 | (require 'shr) | 1692 | (require 'shr) |
| 1693 | (let ((article-buffer (current-buffer)) | 1693 | (let ((article-buffer (current-buffer)) |
| 1694 | (shr-blocked-images (with-current-buffer gnus-summary-buffer | 1694 | (shr-blocked-images (if (and (boundp 'gnus-summary-buffer) |
| 1695 | gnus-blocked-images)) | 1695 | (buffer-name gnus-summary-buffer)) |
| 1696 | (with-current-buffer gnus-summary-buffer | ||
| 1697 | gnus-blocked-images) | ||
| 1698 | shr-blocked-images)) | ||
| 1696 | (shr-content-function (lambda (id) | 1699 | (shr-content-function (lambda (id) |
| 1697 | (let ((handle (mm-get-content-id id))) | 1700 | (let ((handle (mm-get-content-id id))) |
| 1698 | (when handle | 1701 | (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.") | |||
| 318 | (setq port (or nnimap-server-port "imap"))) | 318 | (setq port (or nnimap-server-port "imap"))) |
| 319 | '("imap")) | 319 | '("imap")) |
| 320 | ((eq nnimap-stream 'starttls) | 320 | ((eq nnimap-stream 'starttls) |
| 321 | (let ((tls-program (nnimap-extend-tls-programs))) | 321 | (let ((tls-program "openssl s_client %s -connect %h:%p -no_ssl2 -ign_eof -starttls imap")) |
| 322 | (open-tls-stream | 322 | (open-tls-stream |
| 323 | "*nnimap*" (current-buffer) nnimap-address | 323 | "*nnimap*" (current-buffer) nnimap-address |
| 324 | (setq port (or nnimap-server-port "imap")) | 324 | (setq port (or nnimap-server-port "imap")))) |
| 325 | 'starttls)) | ||
| 326 | '("imap")) | 325 | '("imap")) |
| 327 | ((memq nnimap-stream '(ssl tls)) | 326 | ((memq nnimap-stream '(ssl tls)) |
| 328 | (funcall (if (fboundp 'open-gnutls-stream) | 327 | (funcall (if (fboundp 'open-gnutls-stream) |
| @@ -419,19 +418,6 @@ textual parts.") | |||
| 419 | (nnimap-command "ENABLE QRESYNC")) | 418 | (nnimap-command "ENABLE QRESYNC")) |
| 420 | (nnimap-process nnimap-object)))))))) | 419 | (nnimap-process nnimap-object)))))))) |
| 421 | 420 | ||
| 422 | (defun nnimap-extend-tls-programs () | ||
| 423 | (let ((programs tls-program) | ||
| 424 | result) | ||
| 425 | (unless (consp programs) | ||
| 426 | (setq programs (list programs))) | ||
| 427 | (dolist (program programs) | ||
| 428 | (when (assoc (car (split-string program)) tls-starttls-switches) | ||
| 429 | (push (if (not (string-match "%s" program)) | ||
| 430 | (concat program " " "%s") | ||
| 431 | program) | ||
| 432 | result))) | ||
| 433 | (nreverse result))) | ||
| 434 | |||
| 435 | (defun nnimap-find-parameter (parameter elems) | 421 | (defun nnimap-find-parameter (parameter elems) |
| 436 | (let (result) | 422 | (let (result) |
| 437 | (dolist (elem elems) | 423 | (dolist (elem elems) |
| @@ -1303,7 +1289,7 @@ textual parts.") | |||
| 1303 | (setq start end)) | 1289 | (setq start end)) |
| 1304 | (setq start (point)) | 1290 | (setq start (point)) |
| 1305 | (goto-char end)) | 1291 | (goto-char end)) |
| 1306 | (while (search-forward " FETCH " start t) | 1292 | (while (re-search-forward "^\\* [0-9]+ FETCH " start t) |
| 1307 | (setq elems (read (current-buffer))) | 1293 | (setq elems (read (current-buffer))) |
| 1308 | (push (cons (cadr (memq 'UID elems)) | 1294 | (push (cons (cadr (memq 'UID elems)) |
| 1309 | (cadr (memq 'FLAGS elems))) | 1295 | (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." | |||
| 219 | (unless shr-start | 219 | (unless shr-start |
| 220 | (setq shr-start (point))) | 220 | (setq shr-start (point))) |
| 221 | (insert elem) | 221 | (insert elem) |
| 222 | (when (> (shr-current-column) shr-width) | 222 | (while (> (current-column) shr-width) |
| 223 | (if (not (search-backward " " (line-beginning-position) t)) | 223 | (if (not (shr-find-fill-point)) |
| 224 | (insert "\n") | 224 | (insert "\n") |
| 225 | (delete-char 1) | 225 | (delete-char 1) |
| 226 | (insert "\n") | 226 | (insert "\n") |
| @@ -235,23 +235,16 @@ redirects somewhere else." | |||
| 235 | (defun shr-find-fill-point () | 235 | (defun shr-find-fill-point () |
| 236 | (let ((found nil)) | 236 | (let ((found nil)) |
| 237 | (while (and (not found) | 237 | (while (and (not found) |
| 238 | (not (bolp))) | 238 | (> (current-column) shr-indentation)) |
| 239 | (when (or (eq (preceding-char) ? ) | 239 | (when (and (or (eq (preceding-char) ? ) |
| 240 | (aref fill-find-break-point-function-table (preceding-char))) | 240 | (aref fill-find-break-point-function-table |
| 241 | (preceding-char))) | ||
| 242 | (<= (current-column) shr-width)) | ||
| 241 | (setq found (point))) | 243 | (setq found (point))) |
| 242 | (backward-char 1)) | 244 | (backward-char 1)) |
| 243 | (or found | 245 | (or found |
| 244 | (end-of-line)))) | 246 | (end-of-line)))) |
| 245 | 247 | ||
| 246 | (defun shr-current-column () | ||
| 247 | (let ((column 0)) | ||
| 248 | (save-excursion | ||
| 249 | (beginning-of-line) | ||
| 250 | (while (not (eolp)) | ||
| 251 | (incf column (char-width (following-char))) | ||
| 252 | (forward-char 1))) | ||
| 253 | column)) | ||
| 254 | |||
| 255 | (defun shr-ensure-newline () | 248 | (defun shr-ensure-newline () |
| 256 | (unless (zerop (current-column)) | 249 | (unless (zerop (current-column)) |
| 257 | (insert "\n"))) | 250 | (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." | |||
| 75 | :type 'regexp | 75 | :type 'regexp |
| 76 | :group 'tls) | 76 | :group 'tls) |
| 77 | 77 | ||
| 78 | (defvar tls-starttls-switches | ||
| 79 | '(("openssl" "-starttls imap")) | ||
| 80 | "Alist of programs and the switches necessary to get starttls behaviour.") | ||
| 81 | |||
| 82 | (defcustom tls-program '("gnutls-cli --insecure -p %p %h" | 78 | (defcustom tls-program '("gnutls-cli --insecure -p %p %h" |
| 83 | "gnutls-cli --insecure -p %p %h --protocols ssl3" | 79 | "gnutls-cli --insecure -p %p %h --protocols ssl3" |
| 84 | "openssl s_client %s -connect %h:%p -no_ssl2 -ign_eof") | 80 | "openssl s_client -connect %h:%p -no_ssl2 -ign_eof") |
| 85 | "List of strings containing commands to start TLS stream to a host. | 81 | "List of strings containing commands to start TLS stream to a host. |
| 86 | Each entry in the list is tried until a connection is successful. | 82 | Each entry in the list is tried until a connection is successful. |
| 87 | %h is replaced with server hostname, %p with port to connect to. | 83 | %h is replaced with server hostname, %p with port to connect to. |
| @@ -203,7 +199,7 @@ Used by `tls-certificate-information'." | |||
| 203 | (push (cons (match-string 1) (match-string 2)) vals)) | 199 | (push (cons (match-string 1) (match-string 2)) vals)) |
| 204 | (nreverse vals)))))) | 200 | (nreverse vals)))))) |
| 205 | 201 | ||
| 206 | (defun open-tls-stream (name buffer host port &optional starttlsp) | 202 | (defun open-tls-stream (name buffer host port) |
| 207 | "Open a TLS connection for a port to a host. | 203 | "Open a TLS connection for a port to a host. |
| 208 | Returns a subprocess-object to represent the connection. | 204 | Returns a subprocess-object to represent the connection. |
| 209 | Input and output work as for subprocesses; `delete-process' closes it. | 205 | 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." | |||
| 233 | (format-spec | 229 | (format-spec |
| 234 | cmd | 230 | cmd |
| 235 | (format-spec-make | 231 | (format-spec-make |
| 236 | ?s (if starttlsp | ||
| 237 | (tls-find-starttls-argument cmd) | ||
| 238 | "") | ||
| 239 | ?h host | 232 | ?h host |
| 240 | ?p (if (integerp port) | 233 | ?p (if (integerp port) |
| 241 | (int-to-string port) | 234 | (int-to-string port) |
| @@ -307,11 +300,6 @@ match `%s'. Connect anyway? " host)))))) | |||
| 307 | (kill-buffer buffer)) | 300 | (kill-buffer buffer)) |
| 308 | done)) | 301 | done)) |
| 309 | 302 | ||
| 310 | (defun tls-find-starttls-argument (command) | ||
| 311 | (let ((command (car (split-string command)))) | ||
| 312 | (or (cadr (assoc command tls-starttls-switches)) | ||
| 313 | ""))) | ||
| 314 | |||
| 315 | (provide 'tls) | 303 | (provide 'tls) |
| 316 | 304 | ||
| 317 | ;;; tls.el ends here | 305 | ;;; tls.el ends here |