From 06b840e0d96538cfa879eb524c9b030988f8e7c5 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 21 Feb 2011 13:29:15 +0000 Subject: [PATCH] Merge changes made in Gnus trunk. gnus.texi (Window Layout): Document layout names. nntp.el (nntp-finish-retrieve-group-infos): Add a kludge to use the given method as in the group name if we're using an extended method. (nntp-finish-retrieve-group-infos): Wait for the end of the LIST ACTIVE command, if we're using that, instead of waiting for the beginning. gnus-start.el (gnus-get-unread-articles): Extend the methods so that we're sure to get unique server names, and we don't output two async commands in the same buffer. This fixes an NNTP hang for some users. netrc.el (netrc-parse): Comment fix. gnus-sum.el (gnus-summary-next-article): Add a kludge to reselect the summary buffer before reading going to the next buffer. This avoids putting the point in the group buffer if you `C-g' the command. auth-source.el (auth-source-netrc-parse): Add an in-memory netrc cache (for now) to make ~/.authinfo.gpg files usable. nnfolder.el (copyright-update): Define for the compiler. auth-source.el (auth-source-search): Fix unbound variable. --- doc/misc/ChangeLog | 4 +++ doc/misc/gnus.texi | 75 ++++++++++++++++++++++++++++++++++++++++ lisp/ChangeLog | 4 +++ lisp/gnus/ChangeLog | 24 +++++++++++++ lisp/gnus/auth-source.el | 18 ++++++++-- lisp/gnus/gnus-start.el | 15 +++++++- lisp/gnus/gnus-sum.el | 5 +++ lisp/gnus/nnfolder.el | 2 ++ lisp/gnus/nntp.el | 15 ++++++-- lisp/net/netrc.el | 2 +- 10 files changed, 157 insertions(+), 7 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 8906c53aeed..7d32b16790e 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2011-02-20 Lars Ingebrigtsen + + * gnus.texi (Window Layout): Document layout names. + 2011-02-19 Eli Zaretskii * ada-mode.texi: Sync @dircategory with ../../info/dir. diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 5aa66deb946..d40522a44d5 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -22823,6 +22823,81 @@ window is displayed vertically next to another window, you may also want to fiddle with @code{gnus-tree-minimize-window} to avoid having the windows resized. +@subsection Window Configuration Names + +Here's a list of most of the currently known window configurations, +and when they're used: + +@itemize @code +@item group +The group buffer. + +@item summary +Entering a group and showing only the summary. + +@item article +Selecting an article. + +@item server +The server buffer. + +@item browse +Browsing groups from the server buffer. + +@item message +Composing a (new) message. + +@item only-article +Showing only the article buffer. + +@item edit-article +Editing an article. + +@item edit-form +Editing group parameters and the like. + +@item edit-score +Editing a server definition. + +@item post +Composing a news message. + +@item reply +Replying or following up an article without yanking the text. + +@item forward +Forwarding a message. + +@item reply-yank +Replying or following up an article with yanking the text. + +@item mail-bound +Bouncing a message. + +@item pipe +Sending an article to an external process. + +@item bug +Sending a bug report. + +@item score-trace +Displaying the score trace. + +@item score-words +Displaying the score words. + +@item split-trace +Displaying the split trace. + +@item compose-bounce +Composing a bounce message. + +@item mml-preview +Previewing a @acronym{MIME} part. + +@end itemize + + @subsection Example Window Configurations @itemize @bullet diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4c09a79203d..20514a0b886 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-02-21 Lars Ingebrigtsen + + * net/netrc.el (netrc-parse): Comment fix. + 2011-02-21 Chong Yidong * color.el (color-name-to-rgb): Rename from color-rgb->normalize. diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index a4bbfbf48e4..ff48920e69c 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -4,6 +4,30 @@ color-rgb-to-hex, color-name-to-rgb, color-srgb-to-lab, and color-lab-to-srgb. +2011-02-21 Lars Ingebrigtsen + + * nntp.el (nntp-finish-retrieve-group-infos): Add a kludge to use the + given method as in the group name if we're using an extended method. + (nntp-finish-retrieve-group-infos): Wait for the end of the LIST ACTIVE + command, if we're using that, instead of waiting for the beginning. + + * gnus-start.el (gnus-get-unread-articles): Extend the methods so that + we're sure to get unique server names, and we don't output two async + commands in the same buffer. This fixes an NNTP hang for some users. + +2011-02-21 Lars Ingebrigtsen + + * gnus-sum.el (gnus-summary-next-article): Add a kludge to reselect the + summary buffer before reading going to the next buffer. This avoids + putting the point in the group buffer if you `C-g' the command. + + * auth-source.el (auth-source-netrc-parse): Add an in-memory netrc + cache (for now) to make ~/.authinfo.gpg files usable. + + * nnfolder.el (copyright-update): Define for the compiler. + + * auth-source.el (auth-source-search): Fix unbound variable. + 2011-02-19 Glenn Morris * gnus.el (gnus-meta): Doc fix. diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el index c2f57abb917..e033b01ae97 100644 --- a/lisp/gnus/auth-source.el +++ b/lisp/gnus/auth-source.el @@ -500,7 +500,7 @@ must call it to obtain the actual value." unless (memq (nth i spec) ignored-keys) collect (nth i spec))) (found (auth-source-recall spec)) - filtered-backends accessor-key found-here goal matches) + filtered-backends accessor-key found-here goal matches backend) (if (and found auth-source-do-cache) (auth-source-do-debug @@ -680,6 +680,8 @@ while \(:host t) would find all host entries." ;;; Backend specific parsing: netrc/authinfo backend +(defvar auth-source-netrc-cache nil) + ;;; (auth-source-netrc-parse "~/.authinfo.gpg") (defun* auth-source-netrc-parse (&rest spec @@ -698,7 +700,19 @@ Note that the MAX parameter is used so we can exit the parse early." (max (or max 5000)) ; sanity check: default to stop at 5K (modified 0) alist elem result pair) - (insert-file-contents file) + (if (and auth-source-netrc-cache + (equal (car auth-source-netrc-cache) + (nth 5 (file-attributes file)))) + (insert (base64-decode-string + (rot13-string (cdr auth-source-netrc-cache)))) + (insert-file-contents file) + (when (string-match "\\.gpg\\'" file) + ;; Store the contents of the file heavily encrypted in memory. + (setq auth-source-netrc-cache + (cons (nth 5 (file-attributes file)) + (rot13-string + (base64-encode-string + (buffer-string))))))) (goto-char (point-min)) ;; Go through the file, line by line. (while (and (not (eobp)) diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index b493a93d40c..e5e2468058c 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -1675,7 +1675,20 @@ If SCAN, request a scan of that group as well." (lambda (c1 c2) (< (gnus-method-rank (cadr c1) (car c1)) (gnus-method-rank (cadr c2) (car c2)))))) - + ;; Go through the list of servers and possibly extend methods that + ;; aren't equal (and that need extension; i.e., they are async). + (let ((methods nil)) + (dolist (elem type-cache) + (destructuring-bind (method method-type infos dummy) elem + (let ((gnus-opened-servers methods)) + (when (and (gnus-similar-server-opened method) + (gnus-check-backend-function + 'retrieve-group-data-early (car method))) + (setq method (gnus-server-extend-method + (gnus-info-group (car infos)) + method)) + (setcar elem method)) + (push (list method 'ok) methods))))) ;; Start early async retrieval of data. (dolist (elem type-cache) (destructuring-bind (method method-type infos dummy) elem diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 619c8bd75fd..789308c4ab9 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -7734,6 +7734,7 @@ If BACKWARD, the previous article is selected instead of the next." (point (with-current-buffer gnus-group-buffer (point))) + (current-summary (current-buffer)) (group (if (eq gnus-keep-same-level 'best) (gnus-summary-best-group gnus-newsgroup-name) @@ -7758,6 +7759,10 @@ If BACKWARD, the previous article is selected instead of the next." (gnus-summary-next-group nil group backward))) (t (when (gnus-key-press-event-p last-input-event) + ;; Somehow or other, we may now have selected a different + ;; window. Make point go back to the summary buffer. + (when (eq current-summary (current-buffer)) + (select-window (get-buffer-window current-summary))) (gnus-summary-walk-group-buffer gnus-newsgroup-name cmd unread backward point)))))))) diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el index c6b4c0825e3..3ec30410473 100644 --- a/lisp/gnus/nnfolder.el +++ b/lisp/gnus/nnfolder.el @@ -1083,6 +1083,8 @@ This command does not work if you use short group names." (or nnfolder-nov-directory nnfolder-directory))) (concat (nnfolder-group-pathname group) nnfolder-nov-file-suffix))) +(defvar copyright-update) + (defun nnfolder-save-buffer () "Save the buffer." (when (buffer-modified-p) diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 0fc38553c29..09ecfb8f6b7 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -808,7 +808,11 @@ command whose response triggered the error." (progn (goto-char last-point) ;; Count replies. - (while (re-search-forward "^[0-9]" nil t) + (while (re-search-forward + (if nntp-server-list-active-group + "^[.]" + "^[0-9]") + nil t) (incf received)) (setq last-point (point)) (< received count))) @@ -828,8 +832,13 @@ command whose response triggered the error." (progn (forward-line 1) (point)))) (nntp-copy-to-buffer nntp-server-buffer (point-min) (point-max)) (with-current-buffer nntp-server-buffer - (gnus-active-to-gnus-format method gnus-active-hashtb - nil t)))))))) + (gnus-active-to-gnus-format + ;; Kludge to use the extended method name if you have + ;; an extended one. + (if (consp (gnus-info-method (car infos))) + (gnus-info-method (car infos)) + method) + gnus-active-hashtb nil t)))))))) (deffoo nntp-retrieve-groups (groups &optional server) "Retrieve group info on GROUPS." diff --git a/lisp/net/netrc.el b/lisp/net/netrc.el index 59e9eab5fc3..b04863b5fc0 100644 --- a/lisp/net/netrc.el +++ b/lisp/net/netrc.el @@ -63,10 +63,10 @@ alist elem result pair) (if (and netrc-cache (equal (car netrc-cache) (nth 5 (file-attributes file)))) - ;; Store the contents of the file heavily encrypted in memory. (insert (base64-decode-string (rot13-string (cdr netrc-cache)))) (insert-file-contents file) (when (string-match "\\.gpg\\'" file) + ;; Store the contents of the file heavily encrypted in memory. (setq netrc-cache (cons (nth 5 (file-attributes file)) (rot13-string (base64-encode-string -- 2.39.5