emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104082: Merge changes made in Gnus t


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104082: Merge changes made in Gnus trunk.
Date: Mon, 02 May 2011 22:41:38 +0000
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104082
author: Lars Magne Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Mon 2011-05-02 22:41:38 +0000
message:
  Merge changes made in Gnus trunk.
  
  gnus-html.el (gnus-html-schedule-image-fetching): Use url-queue-retrieve, if 
it exists.
  shr.el (shr-tag-img): Ditto.
  gnus.el: Autoload more gnus-agent functions.
  gnus-art.el (gnus-request-article-this-buffer): Store articles in the agent 
if we haven't already (bug#8502).
  gnus-async.el (gnus-async-article-callback): Put prefetched articles into the 
Agent, too.
  gnus-agent.el (gnus-agent-store-article): New function.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/gnus-agent.el
  lisp/gnus/gnus-art.el
  lisp/gnus/gnus-async.el
  lisp/gnus/gnus-html.el
  lisp/gnus/gnus.el
  lisp/gnus/shr.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2011-05-02 03:37:06 +0000
+++ b/lisp/gnus/ChangeLog       2011-05-02 22:41:38 +0000
@@ -1,5 +1,20 @@
 2011-05-02  Lars Magne Ingebrigtsen  <address@hidden>
 
+       * gnus-html.el (gnus-html-schedule-image-fetching): Use
+       url-queue-retrieve, if it exists.
+
+       * shr.el (shr-tag-img): Ditto.
+
+       * gnus.el: Autoload more gnus-agent functions.
+
+       * gnus-art.el (gnus-request-article-this-buffer): Store articles in the
+       agent if we haven't already (bug#8502).
+
+       * gnus-async.el (gnus-async-article-callback): Put prefetched articles
+       into the Agent, too.
+
+       * gnus-agent.el (gnus-agent-store-article): New function.
+
        * nnheader.el (nnheader-insert-buffer-substring): Renamed from nntp-
        and moved from that file for reuse.
 

=== modified file 'lisp/gnus/gnus-agent.el'
--- a/lisp/gnus/gnus-agent.el   2011-03-30 14:59:42 +0000
+++ b/lisp/gnus/gnus-agent.el   2011-05-02 22:41:38 +0000
@@ -3876,6 +3876,15 @@
           (insert-file-contents file))
         t))))
 
+(defun gnus-agent-store-article (article group)
+  (let* ((gnus-command-method (gnus-find-method-for-group group))
+        (file (gnus-agent-article-name (number-to-string article) group))
+        (file-name-coding-system nnmail-pathname-coding-system)
+        (coding-system-for-write gnus-cache-coding-system))
+    (when (not (file-exists-p file))
+      (gnus-make-directory (file-name-directory file))
+      (write-region (point-min) (point-max) file nil 'silent))))
+
 (defun gnus-agent-regenerate-group (group &optional reread)
   "Regenerate GROUP.
 If REREAD is t, all articles in the .overview are marked as unread.

=== modified file 'lisp/gnus/gnus-art.el'
--- a/lisp/gnus/gnus-art.el     2011-04-11 00:28:41 +0000
+++ b/lisp/gnus/gnus-art.el     2011-05-02 22:41:38 +0000
@@ -6841,7 +6841,10 @@
                                              gnus-summary-buffer)
                    (when gnus-keep-backlog
                      (gnus-backlog-enter-article
-                      group article (current-buffer))))
+                      group article (current-buffer)))
+                   (when (and gnus-agent
+                              (gnus-agent-group-covered-p group))
+                     (gnus-agent-store-article article group)))
                  (setq result 'article))
                 (methods
                  (setq gnus-override-method (pop methods)))

=== modified file 'lisp/gnus/gnus-async.el'
--- a/lisp/gnus/gnus-async.el   2011-01-25 04:08:28 +0000
+++ b/lisp/gnus/gnus-async.el   2011-05-02 22:41:38 +0000
@@ -237,6 +237,12 @@
       (save-excursion
        (save-restriction
          (narrow-to-region mark (point-max))
+         ;; Put the articles into the agent, if they aren't already.
+         (when (and gnus-agent
+                    (gnus-agent-group-covered-p group))
+           (save-restriction
+             (narrow-to-region mark (point-max))
+             (gnus-agent-store-article article group)))
          ;; Prefetch images for the groups that want that.
          (when (fboundp 'gnus-html-prefetch-images)
            (gnus-html-prefetch-images summary))

=== modified file 'lisp/gnus/gnus-html.el'
--- a/lisp/gnus/gnus-html.el    2011-01-25 04:08:28 +0000
+++ b/lisp/gnus/gnus-html.el    2011-05-02 22:41:38 +0000
@@ -386,16 +386,14 @@
   "Retrieve IMAGE, and place it into BUFFER on arrival."
   (gnus-message 8 "gnus-html-schedule-image-fetching: buffer %s, image %s"
                 buffer image)
-  (let ((args (list (car image)
+  (if (fboundp 'url-queue-retrieve)
+      (url-queue-retrieve (car image)
+                         'gnus-html-image-fetched
+                         (list buffer image) t)
+    (ignore-errors
+      (url-retrieve (car image)
                    'gnus-html-image-fetched
-                   (list buffer image))))
-    (when (> (length (if (featurep 'xemacs)
-                        (cdr (split-string (function-arglist 'url-retrieve)))
-                      (help-function-arglist 'url-retrieve)))
-            4)
-      (setq args (nconc args (list t))))
-    (ignore-errors
-      (push (apply #'url-retrieve args) gnus-buffers))))
+                   (list buffer image)))))
 
 (defun gnus-html-image-fetched (status buffer image)
   "Callback function called when image has been fetched."

=== modified file 'lisp/gnus/gnus.el'
--- a/lisp/gnus/gnus.el 2011-04-21 22:06:12 +0000
+++ b/lisp/gnus/gnus.el 2011-05-02 22:41:38 +0000
@@ -2910,7 +2910,8 @@
       gnus-agent-save-active gnus-agent-method-p
       gnus-agent-get-undownloaded-list gnus-agent-fetch-session
       gnus-summary-set-agent-mark gnus-agent-save-group-info
-      gnus-agent-request-article gnus-agent-retrieve-headers)
+      gnus-agent-request-article gnus-agent-retrieve-headers
+      gnus-agent-store-article gnus-agent-group-covered-p)
      ("gnus-agent" :interactive t
       gnus-unplugged gnus-agentize gnus-agent-batch)
      ("gnus-vm" :interactive t gnus-summary-save-in-vm

=== modified file 'lisp/gnus/shr.el'
--- a/lisp/gnus/shr.el  2011-04-30 00:03:19 +0000
+++ b/lisp/gnus/shr.el  2011-05-02 22:41:38 +0000
@@ -871,10 +871,13 @@
          (shr-put-image (shr-get-image-data url) alt))
         (t
          (insert alt)
-         (ignore-errors
-           (url-retrieve (shr-encode-url url) 'shr-image-fetched
-                         (list (current-buffer) start (point-marker))
-                         t))))
+         (funcall
+          (if (fboundp 'url-queue-retrieve)
+              'url-queue-retrieve
+            'url-retrieve)
+          (shr-encode-url url) 'shr-image-fetched
+          (list (current-buffer) start (point-marker))
+          t)))
        (put-text-property start (point) 'keymap shr-map)
        (put-text-property start (point) 'shr-alt alt)
        (put-text-property start (point) 'image-url url)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]