From: Gnus developers Date: Tue, 22 Feb 2011 13:31:15 +0000 (+0000) Subject: Merge changes made in Gnus trunk. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~767 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8e22bee0402f250c522f58acaa7ebebfa283615a;p=emacs.git Merge changes made in Gnus trunk. gnus.texi (Article Date): Clarify gnus-article-update-date-headers. gnus-msg.el (gnus-inews-add-send-actions): Restore the winconf name after exit. gnus-sum.el (gnus-summary-show-article): When called with t as the value, show the raw article. nnimap.el (nnimap-open-connection-1): Revert last change, since auth-source now accepts numbers. auth-source.el (auth-source-netrc-parse): Accept a number as the port spec, too. (auth-source-ensure-strings): New function. gnus-art.el (gnus-article-update-date-headers): Doc fix. (gnus-article-setup-buffer): Always restart the date timer so that user changes to the frequency is respected. nnimap.el (nnimap-open-connection-1): auth-source expects strings as port numbers, so make sure it gets that if nnimap-server-port is explicit. nnimap.el (nnimap-inbox): Doc fix. --- diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 7d32b16790e..217702b7c0f 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2011-02-21 Lars Ingebrigtsen + + * gnus.texi (Article Date): Clarify gnus-article-update-date-headers. + 2011-02-20 Lars Ingebrigtsen * gnus.texi (Window Layout): Document layout names. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index d40522a44d5..f990ee69a08 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -9502,8 +9502,11 @@ Say how much time has elapsed between the article was posted and now Date: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago @end example -This line is updated continually by default. If you wish to switch -that off, say: +This line is updated continually by default. The frequency (in +seconds) is controlled by the @code{gnus-article-update-date-headers} +variable. + +If you wish to switch updating off, say: @vindex gnus-article-update-date-headers @lisp diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index ff48920e69c..3695b94b510 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,32 @@ +2011-02-22 Lars Ingebrigtsen + + * gnus-msg.el (gnus-inews-add-send-actions): Restore the winconf name + after exit. + + * gnus-sum.el (gnus-summary-show-article): When called with t as the + value, show the raw article. + +2011-02-21 Lars Ingebrigtsen + + * nnimap.el (nnimap-open-connection-1): Revert last change, since + auth-source now accepts numbers. + + * auth-source.el (auth-source-netrc-parse): Accept a number as the port + spec, too. + (auth-source-ensure-strings): New function. + + * gnus-art.el (gnus-article-update-date-headers): Doc fix. + (gnus-article-setup-buffer): Always restart the date timer so that user + changes to the frequency is respected. + + * nnimap.el (nnimap-open-connection-1): auth-source expects strings as + port numbers, so make sure it gets that if nnimap-server-port is + explicit. + +2011-02-21 Simon Josefsson + + * nnimap.el (nnimap-inbox): Doc fix. + 2011-02-20 Chong Yidong * shr-color.el (shr-color->hexadecimal): Use renamed function names diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index e033b01ae97..57fecc7ae32 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el @@ -680,6 +680,15 @@ while \(:host t) would find all host entries." ;;; Backend specific parsing: netrc/authinfo backend +(defun auth-source-ensure-strings (values) + (unless (listp values) + (setq values (list values))) + (mapcar (lambda (value) + (if (numberp value) + (format "%s" value) + value)) + values)) + (defvar auth-source-netrc-cache nil) ;;; (auth-source-netrc-parse "~/.authinfo.gpg") @@ -693,6 +702,7 @@ Note that the MAX parameter is used so we can exit the parse early." ;; We got already parsed contents; just return it. file (when (file-exists-p file) + (setq port (auth-source-ensure-strings port)) (with-temp-buffer (let ((tokens '("machine" "host" "default" "login" "user" "password" "account" "macdef" "force" diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 19eee78ab17..2a36c43130c 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -1040,7 +1040,7 @@ Some of these headers are updated automatically. See (item :tag "User-defined" :value 'user-defined))) (defcustom gnus-article-update-date-headers 1 - "How often to update the date header. + "A number that says how often to update the date header (in seconds). If nil, don't update it at all." :version "24.1" :group 'gnus-article-headers @@ -4505,13 +4505,10 @@ commands: (setq gnus-summary-buffer (gnus-summary-buffer-name gnus-newsgroup-name)) (gnus-summary-set-local-parameters gnus-newsgroup-name) - (cond - ((and gnus-article-update-date-headers - (not article-lapsed-timer)) + (when article-lapsed-timer + (gnus-stop-date-timer)) + (when gnus-article-update-date-headers (gnus-start-date-timer gnus-article-update-date-headers)) - ((and (not gnus-article-update-date-headers) - article-lapsed-timer) - (gnus-stop-date-timer))) (current-buffer))))) ;; Set article window start at LINE, where LINE is the number of lines diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index b199dcc572c..29ac43115c8 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -388,6 +388,7 @@ Thank you for your help in stamping out bugs. (yanked (make-symbol "gnus-setup-yanked-articles")) (group (make-symbol "gnus-setup-message-group"))) `(let ((,winconf (current-window-configuration)) + (,winconf-name gnus-current-window-configuration) (,buffer (buffer-name (current-buffer))) (,article gnus-article-reply) (,yanked gnus-article-yanked-articles) @@ -432,7 +433,7 @@ Thank you for your help in stamping out bugs. (progn ,@forms) (gnus-inews-add-send-actions ,winconf ,buffer ,article ,config - ,yanked) + ,yanked ,winconf-name) (setq gnus-message-buffer (current-buffer)) (set (make-local-variable 'gnus-message-group-art) (cons ,group ,article)) @@ -527,7 +528,8 @@ Gcc: header for archiving purposes." (throw 'found (cons (cadr elem) (caddr elem))))))))) (defun gnus-inews-add-send-actions (winconf buffer article - &optional config yanked) + &optional config yanked + winconf-name) (gnus-make-local-hook 'message-sent-hook) (add-hook 'message-sent-hook (if gnus-agent 'gnus-agent-possibly-do-gcc 'gnus-inews-do-gcc) nil t) @@ -538,8 +540,10 @@ Gcc: header for archiving purposes." `(lambda (&optional arg) (gnus-post-method arg ,gnus-newsgroup-name))) (message-add-action - `(when (gnus-buffer-exists-p ,buffer) - (set-window-configuration ,winconf)) + `(progn + (setq gnus-current-window-configuration ,winconf-name) + (when (gnus-buffer-exists-p ,buffer) + (set-window-configuration ,winconf))) 'exit 'postpone 'kill) (let ((to-be-marked (cond (yanked diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 789308c4ab9..2d78a5698df 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -9525,8 +9525,7 @@ C-u g', show the raw article." ((not arg) ;; Select the article the normal way. (gnus-summary-select-article nil 'force)) - ((or (equal arg '(16)) - (eq arg t)) + ((equal arg '(16)) ;; C-u C-u g (let ((gnus-inhibit-article-treatments t)) (gnus-summary-select-article nil 'force))) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 83b8c416283..138875ba477 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -72,14 +72,15 @@ The default is to try `ssl' first, and then `network'.") "ssh %s imapd")) (defvoo nnimap-inbox nil - "The mail box where incoming mail arrives and should be split out of.") + "The mail box where incoming mail arrives and should be split out of. +For example, \"INBOX\".") (defvoo nnimap-split-methods nil "How mail is split. -Uses the same syntax as nnmail-split-methods") +Uses the same syntax as `nnmail-split-methods'.") (defvoo nnimap-split-fancy nil - "Uses the same syntax as nnmail-split-fancy.") + "Uses the same syntax as `nnmail-split-fancy'.") (defvoo nnimap-unsplittable-articles '(%Deleted %Seen) "Articles with the flags in the list will not be considered when splitting.")