diff options
author | Gnus developers <ding@gnus.org> | 2012-12-23 12:45:01 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2012-12-23 12:45:01 +0000 |
commit | 1a8b65e042f587ff56dbc5debdb075c641564108 (patch) | |
tree | 6762716a51848e23d557eca932dbf49cbb35ef83 /lisp/gnus/gnus-int.el | |
parent | cf162aee2b9c574cb0f4095720a19f4efceee22b (diff) | |
download | emacs-1a8b65e042f587ff56dbc5debdb075c641564108.tar.gz |
Merge changes made in Gnus master
2012-12-23 Lars Ingebrigtsen <larsi@gnus.org>
* gnus-int.el (gnus-backend-trace): Factor out into its own function for reuse.
(gnus-open-server): Use it to add more tracing.
(gnus-finish-retrieve-group-infos): Add backend tracing.
2012-12-22 Philipp Haselwarter <philipp@haselwarter.org>
* gnus-sync.el (gnus-sync-file-encrypt-to, gnus-sync-save):
Set epa-file-encrypt-to from variable to avoid querying.
Diffstat (limited to 'lisp/gnus/gnus-int.el')
-rw-r--r-- | lisp/gnus/gnus-int.el | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el index bc3ba187dd4..b69229965a7 100644 --- a/lisp/gnus/gnus-int.el +++ b/lisp/gnus/gnus-int.el @@ -249,16 +249,18 @@ If it is down, start it up (again)." (defvar gnus-backend-trace nil) +(defun gnus-backend-trace (type form) + (with-current-buffer (get-buffer-create "*gnus trace*") + (buffer-disable-undo) + (goto-char (point-max)) + (insert (format-time-string "%H:%M:%S") + (format " %s %S\n" type form)))) + (defun gnus-open-server (gnus-command-method) "Open a connection to GNUS-COMMAND-METHOD." (when (stringp gnus-command-method) (setq gnus-command-method (gnus-server-to-method gnus-command-method))) - (when gnus-backend-trace - (with-current-buffer (get-buffer-create "*gnus trace*") - (buffer-disable-undo) - (goto-char (point-max)) - (insert (format-time-string "%H:%M:%S") - (format " %S\n" gnus-command-method)))) + (gnus-backend-trace :opening gnus-command-method) (let ((elem (assoc gnus-command-method gnus-opened-servers)) (server (gnus-method-to-server-name gnus-command-method))) ;; If this method was previously denied, we just return nil. @@ -333,6 +335,7 @@ If it is down, start it up (again)." (save-excursion (gnus-agent-possibly-synchronize-flags-server gnus-command-method))) + (gnus-backend-trace :opened gnus-command-method) result))))) (defun gnus-close-server (gnus-command-method) @@ -353,9 +356,13 @@ If it is down, start it up (again)." "Read and update infos from GNUS-COMMAND-METHOD." (when (stringp gnus-command-method) (setq gnus-command-method (gnus-server-to-method gnus-command-method))) - (funcall (gnus-get-function gnus-command-method 'finish-retrieve-group-infos) - (nth 1 gnus-command-method) - infos data)) + (gnus-backend-trace :finishing gnus-command-method) + (prog1 + (funcall (gnus-get-function gnus-command-method + 'finish-retrieve-group-infos) + (nth 1 gnus-command-method) + infos data) + (gnus-backend-trace :finished gnus-command-method))) (defun gnus-retrieve-group-data-early (gnus-command-method infos) "Start early async retrieval of data from GNUS-COMMAND-METHOD." |