summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-int.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2004-10-19 22:38:28 +0000
committerMiles Bader <miles@gnu.org>2004-10-19 22:38:28 +0000
commit54506618c7da037ad4dea7386422ff31d70a476b (patch)
tree4826496edaa01e938e41ac2868a162c0dc67f5c9 /lisp/gnus/gnus-int.el
parent9b0eaaa7148c1660d4bbb1e461356ed7b45536d6 (diff)
downloademacs-54506618c7da037ad4dea7386422ff31d70a476b.tar.gz
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Merge from gnus--rel--5.10 Patches applied: * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-55 Update from CVS 2004-10-19 Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/gnus-sum.el (gnus-update-summary-mark-positions): Search for dummy marks in the right way. 2004-10-18 Kevin Greiner <kgreiner@compsol.cc> * lisp/gnus/nnagent.el (nnagent-request-type): Bind gnus-agent to nil to avoid infinite recursion via gnus-get-function. 2004-10-18 Kevin Greiner <kgreiner@compsol.cc> * lisp/gnus/gnus-agent.el (gnus-agent-synchronize-group-flags): When necessary, pass full group name to gnus-request-set-marks. (gnus-agent-synchronize-group-flags): Added support for sync'ing tick marks. (gnus-agent-synchronize-flags-server): Be silent when writing file. 2004-10-18 Kevin Greiner <kgreiner@compsol.cc> * lisp/gnus/gnus-agent.el (gnus-agent-synchronize-group-flags): Replaced gnus-request-update-info with explicit code to sync the in-memory info read flags with the marks being sync'd to the backend. 2004-10-18 Kevin Greiner <kgreiner@compsol.cc> * lisp/gnus/gnus-agent.el (gnus-agent-possibly-synchronize-flags): Ignore servers that are offline. Avoids having gnus-agent-toggle-plugged first ask if you want to open a server and then, even when you responded with no, asking if you want to synchronize the server's flags. (gnus-agent-synchronize-flags-server): Rewrote read loop to handle multi-line expressions. (gnus-agent-synchronize-group-flags): New internal function. Updates marks in memory (in the info structure) AND in the backend. (gnus-agent-check-overview-buffer): Fixed range of deletion to remove entire duplicate line. Fixes merged article number bug. * lisp/gnus/gnus-util.el (gnus-remassoc): Fixed typo in documentation. * lisp/gnus/nnagent.el (nnagent-request-set-mark): Use gnus-agent-synchronize-group-flags, not backend's request-set-mark method, to ensure that synchronization updates marks in the backend and in the info (in memory) structure. 2004-10-18 Kevin Greiner <kgreiner@compsol.cc> * lisp/gnus/gnus-agent.el (gnus-agent-synchronize-flags-server): Do nothing unless plugged. Disable the agent so that an open failure causes an error. 2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> for Reiner Steib <Reiner.Steib@gmx.de> * lisp/gnus/gnus-agent.el (gnus-agent-fetched-hook): Add :version. (gnus-agent-go-online): Change :version. (gnus-agent-expire-unagentized-dirs) (gnus-agent-auto-agentize-methods): Add :version. 2004-10-18 Kevin Greiner <kgreiner@compsol.cc> * lisp/gnus/legacy-gnus-agent.el (gnus-agent-convert-to-compressed-agentview-prompt): New function. Used internally to only display 'gnus converting files' message when actually necessary. * lisp/gnus/gnus-sum.el (): Removed (require 'gnus-agent) as required methods now autoloaded. * lisp/gnus/gnus-int.el (gnus-request-move-article): Use gnus-agent-unfetch-articles in place of gnus-agent-expire to improve performance. 2004-10-18 Kevin Greiner <kgreiner@compsol.cc> * lisp/gnus/gnus-agent.el (gnus-agent-cat-groups): rewrote avoiding defsetf to avoid run-time CL dependencies. (gnus-agent-unfetch-articles): New function. (gnus-agent-fetch-headers): Use gnus-agent-braid-nov to validate article numbers even when local .overview file is missing. (gnus-agent-read-article-number): New function. Only accepts 27-bit article numbers. (gnus-agent-copy-nov-line, gnus-agent-uncached-articles): Use gnus-agent-read-article-number. (gnus-agent-braid-nov): Rewrote to validate article numbers coming from backend while recognizing that article numbers in .overview must be valid. * lisp/gnus/gnus-start.el (gnus-convert-old-newsrc): Changed message text as some users confused by references to .newsrc when they only have a .newsrc.eld file. (gnus-convert-mark-converter-prompt, gnus-convert-converter-needs-prompt): Fixed use of property list. 2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> for Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/gnus-agent.el (gnus-agent-restore-gcc): Use ^ and regexp-quote. 2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> for Lars Magne Ingebrigtsen <larsi@gnus.org> * lisp/gnus/gnus-start.el (gnus-get-unread-articles-in-group): Don't do stuff for non-living groups. 2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> for Lars Magne Ingebrigtsen <larsi@gnus.org> * lisp/gnus/gnus-agent.el (gnus-agent-synchronize-flags): Default to nil. (gnus-agent-regenerate-group): Using nil messages aren't valid. 2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> for Lars Magne Ingebrigtsen <larsi@gnus.org> * lisp/gnus/gnus-agent.el (gnus-agent-read-agentview): Inline gnus-uncompress-range. 2004-10-18 Kevin Greiner <kgreiner@xpediantsolutions.com> * lisp/gnus/legacy-gnus-agent.el (gnus-agent-convert-to-compressed-agentview): Fixed typos with help from Florian Weimer <fw@deneb.enyo.de> * lisp/gnus/gnus-agent.el (gnus-agentize): gnus-agent-send-mail-real-function no longer set to current value of message-send-mail-function but rather a lambda that calls message-send-mail-function. The change makes the agent real-time responsive to user changes to message-send-mail-function. 2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> for Reiner Steib <Reiner.Steib@gmx.de> * lisp/gnus/gnus-start.el (gnus-get-unread-articles): Fix last commit. 2004-10-18 Kevin Greiner <kgreiner@xpediantsolutions.com> * lisp/gnus/gnus-cache.el (gnus-cache-rename-group): New function. (gnus-cache-delete-group): New function. * lisp/gnus/gnus-agent.el (gnus-agent-rename-group): New function. (gnus-agent-delete-group): New function. (gnus-agent-save-group-info): Use gnus-command-method when `method' parameter is nil. Don't write nil entries into the active file. (gnus-agent-get-group-info): New function. (gnus-agent-get-local): Added optional parameters to avoid calling gnus-group-real-name and gnus-find-method-for-group. (gnus-agent-set-local): Delete stored entry if either min, or max, are nil. (gnus-agent-fetch-session): Reworded error/quit messages. On quit, use gnus-agent-regenerate-group to record existance of any articles fetched to disk before the quit occurred. * lisp/gnus/gnus-int.el (gnus-request-delete-group): Use gnus-cache-delete-group and gnus-agent-delete-group to keep the local disk in sync with the server. (gnus-request-rename-group): Use gnus-cache-rename-group and gnus-agent-rename-group to keep the local disk in sync with the server. * lisp/gnus/gnus-start.el (gnus-get-unread-articles): Cosmetic simplification to logic. * lisp/gnus/gnus-group.el (): (gnus-group-delete-group): No longer update gnus-cache-active-altered as gnus-request-delete-group now keeps the cache in sync. (gnus-group-list-active): Let the agent store a server's active list if currently plugged. * lisp/gnus/gnus-util.el (gnus-rename-file): New function. 2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> for Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/gnus-agent.el (gnus-agent-regenerate-group): Activate the group when the group's active is not available. 2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> for Katsumi Yamaoka <yamaoka@jpl.org> * lisp/gnus/gnus-agent.el (gnus-agent-read-agentview): Add a missing arg to error. 2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> * lisp/gnus/gnus-start.el (gnus-convert-old-newsrc): Only write the conversion message to newsrc-dribble when an actual conversion is performed. 2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> * lisp/gnus/gnus-agent.el (gnus-agent-read-local): Bind nnheader-file-coding-system to gnus-agent-file-coding-system to avoid the implicit assumption that they will always be equal. (gnus-agent-save-local): Bind buffer-file-coding-system, not coding-system-for-write, as the with-temp-file macro first prints to a buffer then saves the buffer. 2004-10-18 Kevin Greiner <kgreiner@xpediantsolutions.com> * lisp/gnus/legacy-gnus-agent.el (): New. Provides converters that are only loaded when gnus-convert-old-newsrc needs to call them. * lisp/gnus/gnus-agent.el (gnus-agent-read-agentview): Removed support for old file versions. (gnus-group-prepare-hook): Removed function that converted list form of gnus-agent-expire-days to group properties. * lisp/gnus/gnus-start.el (gnus-convert-old-newsrc): Registered new converters to handle old agent file formats. Added logic for a "backup before upgrading warning". (gnus-convert-mark-converter-prompt): Developers can mark functions as needing (default), or not needing, gnus-convert-old-newsrc's "backup before upgrading warning". (gnus-convert-converter-needs-prompt): Tests whether the user should be protected from potentially irreversable changes by the function. 2004-10-18 Kevin Greiner <kgreiner@xpediantsolutions.com> * lisp/gnus/gnus-int.el (gnus-request-accept-article): Inform the agent that articles are being added to a group. (gnus-request-replace-article): Inform the agent that articles need to be uncached as the cached contents are no longer valid. * lisp/gnus/gnus-agent.el (gnus-agent-file-header-cache): Removed. (gnus-agent-possibly-alter-active): Avoid null in numeric comparison. (gnus-agent-set-local): Refuse to save null in local object table. (gnus-agent-regenerate-group): The REREAD parameter can now be a list of articles that will be marked as unread. 2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> * lisp/gnus/gnus-range.el (gnus-sorted-range-intersection): Now accepts single-interval range of the form (min . max). Previously the range had to look like ((min . max)). Likewise, return (min . max) rather than ((min . max)). (gnus-range-map): Use gnus-range-normalize to accept single-interval range. * lisp/gnus/gnus-sum.el (gnus-summary-highlight-line): Articles stored in the cache, but not the agent, now appear with their usual face. 2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> * lisp/gnus/gnus-sum.el (gnus-adjust-marks): Now correctly handles a list of marks consisting of a single range {for example, (3 . 5)} rather than a list of a single range { ((3 . 5)) }. 2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> * lisp/gnus/gnus-sum.el (gnus-adjust-marks): Avoid splicing null INTO the uncompressed list. 2004-10-18 Kevin Greiner <kevin.greiner@compsol.cc> * lisp/gnus/gnus-draft.el (gnus-group-send-queue): Pass the group name "nndraft:queue" along to gnus-draft-send. Use gnus-agent-prompt-send-queue. (gnus-draft-send): Rebind gnus-agent-queue-mail to nil when group is "nndraft:queue". Suggested by Gaute Strokkenes <gs234@srcf.ucam.org> * lisp/gnus/gnus-group.el (gnus-group-catchup): Use new gnus-sequence-of-unread-articles, not gnus-list-of-unread-articles, to avoid exhausting memory with huge numbers of articles. Use gnus-range-map to avoid having to uncompress the unread list. (gnus-group-archive-directory, gnus-group-recent-archive-directory): Fixed invalid ange-ftp reference. * lisp/gnus/gnus-range.el (gnus-range-map): Iterate over list or sequence. (gnus-sorted-range-intersection): Intersection of two ranges without requiring that they first be uncompressed. * lisp/gnus/gnus-start.el (gnus-activate-group): Unless blocked by the caller, possibly expand the active range to include both cached and agentized articles. (gnus-convert-old-newsrc): Rewrote in anticipation of having multiple version-dependent converters. (gnus-groups-to-gnus-format): Replaced gnus-agent-save-groups with gnus-agent-save-active. (gnus-save-newsrc-file): Save dirty agent range limits. * lisp/gnus/gnus-sum.el (gnus-select-newgroup): Replaced inline code with gnus-agent-possibly-alter-active. (gnus-adjust-marked-articles): Faster handling of simple lists 2004-10-18 David Edmondson <dme@dme.org> * lisp/gnus/mm-view.el (mm-w3m-cid-retrieve-1): Don't use recursive call excessively.
Diffstat (limited to 'lisp/gnus/gnus-int.el')
-rw-r--r--lisp/gnus/gnus-int.el58
1 files changed, 39 insertions, 19 deletions
diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el
index 2363c2705cb..7382fa7a090 100644
--- a/lisp/gnus/gnus-int.el
+++ b/lisp/gnus/gnus-int.el
@@ -33,6 +33,7 @@
(require 'gnus-range)
(autoload 'gnus-agent-expire "gnus-agent")
+(autoload 'gnus-agent-regenerate-group "gnus-agent")
(autoload 'gnus-agent-read-servers-validate-native "gnus-agent")
(defcustom gnus-open-server-hook nil
@@ -176,7 +177,7 @@ If it is down, start it up (again)."
(setq method (gnus-server-to-method method)))
;; Check cache of constructed names.
(let* ((method-sym (if gnus-agent
- (gnus-agent-get-function method)
+ (inline (gnus-agent-get-function method))
(car method)))
(method-fns (get method-sym 'gnus-method-functions))
(func (let ((method-fnlist-elt (assq function method-fns)))
@@ -570,7 +571,7 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
(nth 1 gnus-command-method) accept-function last)))
(when (and result gnus-agent
(gnus-agent-method-p gnus-command-method))
- (gnus-agent-expire (list article) group 'force))
+ (gnus-agent-unfetch-articles group (list article)))
result))
(defun gnus-request-accept-article (group &optional gnus-command-method last
@@ -580,7 +581,8 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
(setq gnus-command-method (gnus-server-to-method gnus-command-method)))
(when (and (not gnus-command-method)
(stringp group))
- (setq gnus-command-method (gnus-group-name-to-method group)))
+ (setq gnus-command-method (or (gnus-find-method-for-group group)
+ (gnus-group-name-to-method group))))
(goto-char (point-max))
(unless (bolp)
(insert "\n"))
@@ -592,12 +594,17 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
(let ((mail-parse-charset message-default-charset))
(mail-encode-encoded-word-buffer)))
(message-encode-message-body)))
- (let ((gnus-command-method (or gnus-command-method
- (gnus-find-method-for-group group))))
- (funcall (gnus-get-function gnus-command-method 'request-accept-article)
- (if (stringp group) (gnus-group-real-name group) group)
- (cadr gnus-command-method)
- last)))
+(let ((gnus-command-method (or gnus-command-method
+ (gnus-find-method-for-group group)))
+ (result
+ (funcall
+ (gnus-get-function gnus-command-method 'request-accept-article)
+ (if (stringp group) (gnus-group-real-name group) group)
+ (cadr gnus-command-method)
+ last)))
+ (when (and gnus-agent (gnus-agent-method-p gnus-command-method))
+ (gnus-agent-regenerate-group group (list (cdr result))))
+ result))
(defun gnus-request-replace-article (article group buffer &optional no-encode)
(unless no-encode
@@ -608,9 +615,12 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
(let ((mail-parse-charset message-default-charset))
(mail-encode-encoded-word-buffer)))
(message-encode-message-body)))
- (let ((func (car (gnus-group-name-to-method group))))
- (funcall (intern (format "%s-request-replace-article" func))
- article (gnus-group-real-name group) buffer)))
+ (let* ((func (car (gnus-group-name-to-method group)))
+ (result (funcall (intern (format "%s-request-replace-article" func))
+ article (gnus-group-real-name group) buffer)))
+ (when (and gnus-agent (gnus-agent-method-p gnus-command-method))
+ (gnus-agent-regenerate-group group (list article)))
+ result))
(defun gnus-request-associate-buffer (group)
(let ((gnus-command-method (gnus-find-method-for-group group)))
@@ -633,15 +643,25 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
(gnus-group-real-name group) (nth 1 gnus-command-method) args)))
(defun gnus-request-delete-group (group &optional force)
- (let ((gnus-command-method (gnus-find-method-for-group group)))
- (funcall (gnus-get-function gnus-command-method 'request-delete-group)
- (gnus-group-real-name group) force (nth 1 gnus-command-method))))
+ (let* ((gnus-command-method (gnus-find-method-for-group group))
+ (result
+ (funcall (gnus-get-function gnus-command-method 'request-delete-group)
+ (gnus-group-real-name group) force (nth 1 gnus-command-method))))
+ (when result
+ (gnus-cache-delete-group group)
+ (gnus-agent-delete-group group))
+ result))
(defun gnus-request-rename-group (group new-name)
- (let ((gnus-command-method (gnus-find-method-for-group group)))
- (funcall (gnus-get-function gnus-command-method 'request-rename-group)
- (gnus-group-real-name group)
- (gnus-group-real-name new-name) (nth 1 gnus-command-method))))
+ (let* ((gnus-command-method (gnus-find-method-for-group group))
+ (result
+ (funcall (gnus-get-function gnus-command-method 'request-rename-group)
+ (gnus-group-real-name group)
+ (gnus-group-real-name new-name) (nth 1 gnus-command-method))))
+ (when result
+ (gnus-cache-rename-group group new-name)
+ (gnus-agent-rename-group group new-name))
+ result))
(defun gnus-close-backends ()
;; Send a close request to all backends that support such a request.