Commit e8861cd2 authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen Committed by Katsumi Yamaoka
Browse files

Merge changes made in Gnus trunk.

nnimap.el (nnimap-finish-retrieve-group-infos): Return data in the nntp buffer so the agent can save it.
nnimap.el (nnimap-open-shell-stream): Bind `process-connection-type' to nil, so that CRLF doesn't get translated to \n; (nnimap-open-connection): Don't make 'shell commands only send \n.
nnimap.el (nnimap-request-group): Don't make `M-g' bug out on group with no marks.
gnus-agent.el (gnus-agent-load-alist): Nix out the alist if the file doesn't exist.
nnimap.el (nnimap-finish-retrieve-group-infos): Protect against groups that have no articles.
nnimap.el (nnimap-request-article): Check that we really got an article when we requested one.
gnus-html.el (gnus-html-schedule-image-fetching): Ignore all errors from url-retrieve, for instance about invalid URLs.
gnus-agent.el: Change default of gnus-agent-auto-agentize-methods to nil.
parent e2c3f530
2010-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus-agent.el (gnus-agent-auto-agentize-methods): Switch the default
to nil, so that no methods are automatically agentized. I think this
is probably what most users want.
* gnus-html.el (gnus-html-schedule-image-fetching): Ignore all errors
from url-retrieve, for instance about invalid URLs.
* nnimap.el (nnimap-finish-retrieve-group-infos): Protect against
groups that have no articles.
(nnimap-request-article): Check that we really got an article when we
requested one.
* gnus-agent.el (gnus-agent-load-alist): Nix out the alist if the file
doesn't exist.
* nnimap.el (nnimap-finish-retrieve-group-infos): Return data in the
nntp buffer so the agent can save it.
(nnimap-open-shell-stream): Bind `process-connection-type' to nil, so
that CRLF doesn't get translated to \n.
(nnimap-open-connection): Don't make 'shell commands only send \n.
2010-09-19 Stefan Monnier <monnier@iro.umontreal.ca> 2010-09-19 Stefan Monnier <monnier@iro.umontreal.ca>
   
* nnml.el (nnml-files): Add prefix to dynamic var `files'. * nnml.el (nnml-files): Add prefix to dynamic var `files'.
......
...@@ -184,7 +184,7 @@ When found, offer to remove them." ...@@ -184,7 +184,7 @@ When found, offer to remove them."
:type 'boolean :type 'boolean
:group 'gnus-agent) :group 'gnus-agent)
(defcustom gnus-agent-auto-agentize-methods '(nntp) (defcustom gnus-agent-auto-agentize-methods nil
"Initially, all servers from these methods are agentized. "Initially, all servers from these methods are agentized.
The user may remove or add servers using the Server buffer. The user may remove or add servers using the Server buffer.
See Info node `(gnus)Server Buffer'." See Info node `(gnus)Server Buffer'."
...@@ -2104,12 +2104,12 @@ doesn't exist, to valid the overview buffer." ...@@ -2104,12 +2104,12 @@ doesn't exist, to valid the overview buffer."
(let* ((gnus-agent-read-agentview group) (let* ((gnus-agent-read-agentview group)
(file-name-coding-system nnmail-pathname-coding-system) (file-name-coding-system nnmail-pathname-coding-system)
(agentview (gnus-agent-article-name ".agentview" group))) (agentview (gnus-agent-article-name ".agentview" group)))
(when (file-exists-p agentview) (setq gnus-agent-article-alist
(setq gnus-agent-article-alist (and (file-exists-p agentview)
(gnus-cache-file-contents (gnus-cache-file-contents
agentview agentview
'gnus-agent-file-loading-cache 'gnus-agent-file-loading-cache
'gnus-agent-read-agentview))))) 'gnus-agent-read-agentview)))))
(defun gnus-agent-read-agentview (file) (defun gnus-agent-read-agentview (file)
"Load FILE and do a `read' there." "Load FILE and do a `read' there."
...@@ -2353,7 +2353,6 @@ modified) original contents, they are first saved to their own file." ...@@ -2353,7 +2353,6 @@ modified) original contents, they are first saved to their own file."
(local (or local (gnus-agent-load-local))) (local (or local (gnus-agent-load-local)))
(symb (intern gmane local)) (symb (intern gmane local))
(minmax (and (boundp symb) (symbol-value symb)))) (minmax (and (boundp symb) (symbol-value symb))))
(if (cond ((and minmax (if (cond ((and minmax
(or (not (eq min (car minmax))) (or (not (eq min (car minmax)))
(not (eq max (cdr minmax)))) (not (eq max (cdr minmax))))
......
...@@ -298,9 +298,10 @@ fit these criteria." ...@@ -298,9 +298,10 @@ fit these criteria."
(gnus-message 8 "gnus-html-schedule-image-fetching: buffer %s, images %s" (gnus-message 8 "gnus-html-schedule-image-fetching: buffer %s, images %s"
buffer images) buffer images)
(dolist (image images) (dolist (image images)
(url-retrieve (car image) (ignore-errors
'gnus-html-image-fetched (url-retrieve (car image)
(list buffer image)))) 'gnus-html-image-fetched
(list buffer image)))))
(defun gnus-html-image-id (url) (defun gnus-html-image-id (url)
(expand-file-name (sha1 url) gnus-html-cache-directory)) (expand-file-name (sha1 url) gnus-html-cache-directory))
......
...@@ -1808,7 +1808,8 @@ If SCAN, request a scan of that group as well." ...@@ -1808,7 +1808,8 @@ If SCAN, request a scan of that group as well."
(gnus-check-backend-function 'finish-retrieve-group-infos (car method)) (gnus-check-backend-function 'finish-retrieve-group-infos (car method))
(or (not (gnus-agent-method-p method)) (or (not (gnus-agent-method-p method))
(gnus-online method))) (gnus-online method)))
(gnus-finish-retrieve-group-infos method infos early-data)) (gnus-finish-retrieve-group-infos method infos early-data)
(gnus-agent-save-active method))
((gnus-check-backend-function 'retrieve-groups (car method)) ((gnus-check-backend-function 'retrieve-groups (car method))
(when (gnus-check-backend-function 'request-scan (car method)) (when (gnus-check-backend-function 'request-scan (car method))
(dolist (info infos) (dolist (info infos)
......
...@@ -197,14 +197,14 @@ not done by default on servers that doesn't support that command.") ...@@ -197,14 +197,14 @@ not done by default on servers that doesn't support that command.")
(current-buffer))) (current-buffer)))
(defun nnimap-open-shell-stream (name buffer host port) (defun nnimap-open-shell-stream (name buffer host port)
(let ((process (start-process name buffer shell-file-name (let ((process-connection-type nil))
shell-command-switch (start-process name buffer shell-file-name
(format-spec shell-command-switch
nnimap-shell-program (format-spec
(format-spec-make nnimap-shell-program
?s host (format-spec-make
?p port))))) ?s host
process)) ?p port)))))
(defun nnimap-credentials (address ports) (defun nnimap-credentials (address ports)
(let (port credentials) (let (port credentials)
...@@ -263,8 +263,6 @@ not done by default on servers that doesn't support that command.") ...@@ -263,8 +263,6 @@ not done by default on servers that doesn't support that command.")
(delete-process (nnimap-process nnimap-object)) (delete-process (nnimap-process nnimap-object))
(setq nnimap-object nil)))) (setq nnimap-object nil))))
(when nnimap-object (when nnimap-object
(when (eq nnimap-stream 'shell)
(setf (nnimap-newlinep nnimap-object) t))
(setf (nnimap-capabilities nnimap-object) (setf (nnimap-capabilities nnimap-object)
(mapcar (mapcar
#'upcase #'upcase
...@@ -317,10 +315,14 @@ not done by default on servers that doesn't support that command.") ...@@ -317,10 +315,14 @@ not done by default on servers that doesn't support that command.")
(if (member "IMAP4REV1" (nnimap-capabilities nnimap-object)) (if (member "IMAP4REV1" (nnimap-capabilities nnimap-object))
"UID FETCH %d BODY.PEEK[]" "UID FETCH %d BODY.PEEK[]"
"UID FETCH %d RFC822.PEEK") "UID FETCH %d RFC822.PEEK")
article))) article))
;; Check that we really got an article.
(goto-char (point-min))
(unless (looking-at "\\* [0-9]+ FETCH")
(setq result nil)))
(let ((buffer (nnimap-find-process-buffer (current-buffer)))) (let ((buffer (nnimap-find-process-buffer (current-buffer))))
(when (car result) (when (car result)
(with-current-buffer to-buffer (with-current-buffer (or to-buffer nntp-server-buffer)
(insert-buffer-substring buffer) (insert-buffer-substring buffer)
(goto-char (point-min)) (goto-char (point-min))
(let ((bytes (nnimap-get-length))) (let ((bytes (nnimap-get-length)))
...@@ -611,7 +613,19 @@ not done by default on servers that doesn't support that command.") ...@@ -611,7 +613,19 @@ not done by default on servers that doesn't support that command.")
(nnimap-update-infos (nnimap-flags-to-marks (nnimap-update-infos (nnimap-flags-to-marks
(nnimap-parse-flags (nnimap-parse-flags
(nreverse sequences))) (nreverse sequences)))
infos)))) infos)
;; Finally, just return something resembling an active file in
;; the nntp buffer, so that the agent can save the info, too.
(with-current-buffer nntp-server-buffer
(erase-buffer)
(dolist (info infos)
(let* ((group (gnus-info-group info))
(active (gnus-active group)))
(when active
(insert (format "%S %d %d y\n"
(gnus-group-real-name group)
(cdr active)
(car active))))))))))
(defun nnimap-update-infos (flags infos) (defun nnimap-update-infos (flags infos)
(dolist (info infos) (dolist (info infos)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment