From 7cad71ad21f4ee07ff4652c9e39ebf4510e0216b Mon Sep 17 00:00:00 2001 From: Gnus developers Date: Mon, 18 Oct 2010 22:09:28 +0000 Subject: [PATCH] Merge changes made in Gnus trunk. gnus-art.el: Make the "dumbquotes" translation work again. gnus-registry.el (gnus-registry-split-fancy-with-parent): Splitting according to references/in-reply-to obeys the ignore-groups variable, while splitting by sender and subject do not. nnimap.el (nnimap-request-group): Don't SELECT the group twice on `M-g'. nnimap.el (nnimap-update-info): Update flags/read marks even if \* isn't part of the permanent marks. gnus-coding.texi (Gnus Maintainance Guide): Update to mention Emacs bzr/Gnus git sync. gnus-delay.el (gnus-delay-article): Remove superfluous `group' binding. gnus-art.el (gnus-article-make-menu-bar): The article/group menus aren't so wide as to need to switch off the edit menu. --- doc/misc/ChangeLog | 5 ++++ doc/misc/gnus-coding.texi | 34 ++++++++++++---------- lisp/gnus/ChangeLog | 25 ++++++++++++++++ lisp/gnus/gnus-art.el | 54 +++++++++++++++++++--------------- lisp/gnus/gnus-delay.el | 3 +- lisp/gnus/gnus-group.el | 1 - lisp/gnus/gnus-registry.el | 10 ++++--- lisp/gnus/gnus.el | 4 ++- lisp/gnus/nnimap.el | 59 +++++++++++++++++++++++--------------- 9 files changed, 126 insertions(+), 69 deletions(-) diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index df6e478a34..76051efef2 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,8 @@ +2010-10-18 Lars Magne Ingebrigtsen + + * gnus-coding.texi (Gnus Maintainance Guide): Update to mention Emacs + bzr/Gnus git sync. + 2010-10-15 Eli Zaretskii * auth.texi (GnuPG and EasyPG Assistant Configuration): Fix last diff --git a/doc/misc/gnus-coding.texi b/doc/misc/gnus-coding.texi index 22b74c900b..f513bc15a2 100644 --- a/doc/misc/gnus-coding.texi +++ b/doc/misc/gnus-coding.texi @@ -288,14 +288,21 @@ Emacs repository might have been lost. With the inclusion of Gnus 5.10, Miles Bader has set up an Emacs-Gnus gateway to ensure the bug fixes from Emacs CVS are propagated to Gnus -CVS semi-automatically. These bug fixes are installed on the stable -branch and on the trunk. Basically the idea is that the gateway will -cause all common files in Emacs and Gnus v5-10 to be identical except -when there's a very good reason (e.g., the Gnus version string in Emacs -says @samp{5.11}, but the v5-10 version string remains @samp{5.10.x}). -Furthermore, all changes in these files in either Emacs or the v5-10 -branch will be installed into the Gnus CVS trunk, again except where -there's a good reason. +CVS semi-automatically. + +After Emacs moved to bzr and Gnus moved to git, Katsumi Yamaoka has +taken over the chore of keeping Emacs and Gnus in sync. In general, +changes made to one repository will usually be replicated in the other +within a few days. + +Basically the idea is that the gateway will cause all common files in +Emacs and Gnus v5-13 to be identical except when there's a very good +reason (e.g., the Gnus version string in Emacs says @samp{5.11}, but +the v5-13 version string remains @samp{5.13.x}). Furthermore, all +changes in these files in either Emacs or the v5-13 branch will be +installed into the Gnus git trunk, again except where there's a good +reason. + @c (typically so far the only exception has been that the changes @c already exist in the trunk in modified form). Because of this, when the next major version of Gnus will be included in @@ -311,9 +318,9 @@ If it's a file which is thought of as being outside of Gnus (e.g., the new @file{encrypt.el}), you should probably make the change in the Emacs tree, and it will show up in the Gnus tree a few days later. -If you don't have Emacs CVS access (or it's inconvenient), you can +If you don't have Emacs bzr access (or it's inconvenient), you can change such a file in the v5-10 branch, and it should propagate to Emacs -CVS -- however, it will get some extra scrutiny (by Miles) to see if the +bzr -- however, it will get some extra scrutiny (by Miles) to see if the changes are possibly controversial and need discussion on the mailing list. Many changes are obvious bug-fixes however, so often there won't be any problem. @@ -321,12 +328,12 @@ be any problem. @item If it's to a Gnus file, and it's important enough that it should be part of Emacs and the v5-10 branch, then you can make the change on the v5-10 -branch, and it will go into Emacs CVS and the Gnus CVS trunk (a few days +branch, and it will go into Emacs bzr and the Gnus git trunk (a few days later). The most prominent examples for such changes are bug-fixed including improvements on the documentation. If you know that there will be conflicts (perhaps because the affected -source code is different in v5-10 and the Gnus CVS trunk), then you can +source code is different in v5-10 and the Gnus git trunk), then you can install your change in both places, and when I try to sync them, there will be a conflict -- however, since in most such cases there would be a conflict @emph{anyway}, it's often easier for me to resolve it simply if @@ -338,9 +345,6 @@ For general Gnus development changes, of course you just make the change on the Gnus Git trunk and it goes into Emacs a few years later... :-) -With the new Git repository, we'll probably set up something to -automatically synchronize with Emacs when possible. CVS was much less -powerful for this kind of synchronization. @end itemize Of course in any case, if you just can't wait for me to sync your diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index c5bad44a98..47124f3981 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,28 @@ +2010-10-18 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-article-make-menu-bar): The article/group menus + aren't so wide as to need to switch off the edit menu. + + * gnus-delay.el (gnus-delay-article): Remove superfluous `group' + binding. Suggested by Leo (bug #6613). + + * nnimap.el (nnimap-request-group): Don't SELECT the group twice on + `M-g'. + (nnimap-update-info): Update flags/read marks even if \* isn't part of + the permanent marks. + +2010-10-18 Andrew Cohen + + * gnus-registry.el (gnus-registry-split-fancy-with-parent): Splitting + according to references/in-reply-to obeys the ignore-groups variable, + while splitting by sender and subject do not. + +2010-10-18 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-article-dumbquotes-map): Make into a char/string + alist, so that we can look for non-Unicode chars. + (article-translate-strings): Allow both character and string maps. + 2010-10-18 Katsumi Yamaoka * shr.el (shr-insert): Don't insert space behind a wide character diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 32411066da..537ae4da8a 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -916,25 +916,25 @@ image type in XEmacs if it is built with the libcompface library." "Function used to decode addresses.") (defvar gnus-article-dumbquotes-map - '(("\200" "EUR") - ("\202" ",") - ("\203" "f") - ("\204" ",,") - ("\205" "...") - ("\213" "<") - ("\214" "OE") - ("\221" "`") - ("\222" "'") - ("\223" "``") - ("\224" "\"") - ("\225" "*") - ("\226" "-") - ("\227" "--") - ("\230" "~") - ("\231" "(TM)") - ("\233" ">") - ("\234" "oe") - ("\264" "'")) + '((?\200 "EUR") + (?\202 ",") + (?\203 "f") + (?\204 ",,") + (?\205 "...") + (?\213 "<") + (?\214 "OE") + (?\221 "`") + (?\222 "'") + (?\223 "``") + (?\224 "\"") + (?\225 "*") + (?\226 "-") + (?\227 "--") + (?\230 "~") + (?\231 "(TM)") + (?\233 ">") + (?\234 "oe") + (?\264 "'")) "Table for MS-to-Latin1 translation.") (defcustom gnus-ignored-mime-types nil @@ -2138,9 +2138,18 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")." (when (article-goto-body) (let ((inhibit-read-only t)) (dolist (elem map) - (save-excursion - (while (search-forward (car elem) nil t) - (replace-match (cadr elem))))))))) + (let ((from (car elem)) + (to (cadr elem))) + (save-excursion + (if (stringp from) + (while (search-forward from nil t) + (replace-match to)) + (while (not (eobp)) + (if (eq (following-char) from) + (progn + (delete-char 1) + (insert to)) + (forward-char 1))))))))))) (defun article-treat-overstrike () "Translate overstrikes into bold text." @@ -4393,7 +4402,6 @@ If variable `gnus-use-long-file-name' is non-nil, it is (defun gnus-article-make-menu-bar () (unless (boundp 'gnus-article-commands-menu) (gnus-summary-make-menu-bar)) - (gnus-turn-off-edit-menu 'article) (unless (boundp 'gnus-article-article-menu) (easy-menu-define gnus-article-article-menu gnus-article-mode-map "" diff --git a/lisp/gnus/gnus-delay.el b/lisp/gnus/gnus-delay.el index 05bbaf5346..a257e5495a 100644 --- a/lisp/gnus/gnus-delay.el +++ b/lisp/gnus/gnus-delay.el @@ -133,8 +133,7 @@ DELAY is a string, giving the length of the time. Possible values are: (message-add-header (format "%s: %s" gnus-delay-header deadline))) (set-buffer-modified-p t) ;; If group does not exist, create it. - (let ((group (format "nndraft:%s" gnus-delay-group))) - (gnus-agent-queue-setup gnus-delay-group)) + (gnus-agent-queue-setup gnus-delay-group) (message-disassociate-draft) (nndraft-request-associate-buffer gnus-delay-group) (save-buffer 0) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 0d047133cd..6cd8f75d94 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -757,7 +757,6 @@ simple manner.") (symbol-value 'gnus-topic-mode))) (defun gnus-group-make-menu-bar () - (gnus-turn-off-edit-menu 'group) (unless (boundp 'gnus-group-reading-menu) (easy-menu-define diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index 6c2233f9c4..79080f21b7 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -551,8 +551,9 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." key gnus-registry-max-track-groups))) (dolist (group groups) - (push group found-full) - (setq found (append (list group) (delete group found))))) + (when (and group (gnus-registry-follow-group-p group)) + (push group found-full) + (setq found (append (list group) (delete group found)))))) (push key matches) (gnus-message ;; raise level of messaging if gnus-registry-track-extra @@ -580,8 +581,9 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details." key gnus-registry-max-track-groups))) (dolist (group groups) - (push group found-full) - (setq found (append (list group) (delete group found))))) + (when (and group (gnus-registry-follow-group-p group)) + (push group found-full) + (setq found (append (list group) (delete group found)))))) (push key matches) (gnus-message ;; raise level of messaging if gnus-registry-track-extra diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 19b71551c1..5440a24eb5 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -3938,7 +3938,9 @@ GROUP can also be an INFO structure." (not (eq (caar old-params) name))) (setq new-params (append new-params (list (car old-params))))) (setq old-params (cdr old-params))) - (gnus-group-set-info new-params (gnus-info-group info) 'params))))) + (if (listp group) + (gnus-info-set-params info new-params t) + (gnus-group-set-info new-params (gnus-info-group info) 'params)))))) (defun gnus-group-remove-parameter (group name) "Remove parameter NAME from GROUP. diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 8f0a112c7f..63f3a2d842 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -617,7 +617,13 @@ textual parts.") (nreverse parts))) (deffoo nnimap-request-group (group &optional server dont-check info) - (let ((result (nnimap-possibly-change-group group server)) + (let ((result (nnimap-possibly-change-group + ;; Don't SELECT the group if we're going to select it + ;; later, anyway. + (if dont-check + nil + group) + server)) articles active marks high low) (with-current-buffer nntp-server-buffer (when result @@ -634,6 +640,7 @@ textual parts.") (nnimap-send-command "SELECT %S" (utf7-encode group t))) (flag-sequence (nnimap-send-command "UID FETCH 1:* FLAGS"))) + (setf (nnimap-group nnimap-object) group) (nnimap-wait-for-response flag-sequence) (setq marks (nnimap-flags-to-marks @@ -1105,12 +1112,13 @@ textual parts.") (unless (eq permanent-flags 'not-scanned) (gnus-group-set-parameter info 'permanent-flags - (if (memq '%* permanent-flags) - t - nil))) + (and (or (memq '%* permanent-flags) + (memq '%Seen permanent-flags)) + permanent-flags))) ;; Update marks and read articles if this isn't a ;; read-only IMAP group. - (when (cdr (assq 'permanent-flags (gnus-info-params info))) + (when (setq permanent-flags + (cdr (assq 'permanent-flags (gnus-info-params info)))) (if (and highestmodseq (not start-article)) ;; We've gotten the data by QRESYNCing. @@ -1136,27 +1144,32 @@ textual parts.") (gnus-info-read info)) (gnus-info-read info)) read))) - (gnus-info-set-read info read) + (when (or (not (listp permanent-flags)) + (memq '%Seen permanent-flags)) + (gnus-info-set-read info read)) ;; Update the marks. (setq marks (gnus-info-marks info)) (dolist (type (cdr nnimap-mark-alist)) - (let ((old-marks (assoc (car type) marks)) - (new-marks - (gnus-compress-sequence - (cdr (or (assoc (caddr type) flags) ; %Flagged - (assoc (intern (cadr type) obarray) flags) - (assoc (cadr type) flags)))))) ; "\Flagged" - (setq marks (delq old-marks marks)) - (pop old-marks) - (when (and old-marks - (> start-article 1)) - (setq old-marks (gnus-range-difference - old-marks - (cons start-article high))) - (setq new-marks (gnus-range-nconcat old-marks new-marks))) - (when new-marks - (push (cons (car type) new-marks) marks))) - (gnus-info-set-marks info marks t))))) + (when (or (not (listp permanent-flags)) + (memq (assoc (caddr type) flags) permanent-flags) + (memq '%* permanent-flags)) + (let ((old-marks (assoc (car type) marks)) + (new-marks + (gnus-compress-sequence + (cdr (or (assoc (caddr type) flags) ; %Flagged + (assoc (intern (cadr type) obarray) flags) + (assoc (cadr type) flags)))))) ; "\Flagged" + (setq marks (delq old-marks marks)) + (pop old-marks) + (when (and old-marks + (> start-article 1)) + (setq old-marks (gnus-range-difference + old-marks + (cons start-article high))) + (setq new-marks (gnus-range-nconcat old-marks new-marks))) + (when new-marks + (push (cons (car type) new-marks) marks))))) + (gnus-info-set-marks info marks t)))) ;; Note the active level for the next run-through. (gnus-group-set-parameter info 'active (gnus-active group)) (gnus-group-set-parameter info 'uidvalidity uidvalidity) -- 2.20.1