summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorGnus developers <ding@gnus.org>2012-12-23 12:45:01 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2012-12-23 12:45:01 +0000
commit1a8b65e042f587ff56dbc5debdb075c641564108 (patch)
tree6762716a51848e23d557eca932dbf49cbb35ef83 /lisp
parentcf162aee2b9c574cb0f4095720a19f4efceee22b (diff)
downloademacs-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')
-rw-r--r--lisp/gnus/ChangeLog12
-rw-r--r--lisp/gnus/gnus-int.el25
-rw-r--r--lisp/gnus/gnus-sync.el8
3 files changed, 36 insertions, 9 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index cfdb44b9961..516ef5e4948 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,15 @@
+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.
+
2012-12-14 Akinori MUSHA <knu@iDaemons.org> (tiny change)
* sieve-mode.el (sieve-font-lock-keywords):
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."
diff --git a/lisp/gnus/gnus-sync.el b/lisp/gnus/gnus-sync.el
index 0ec9fedffe3..6776f9ccfc9 100644
--- a/lisp/gnus/gnus-sync.el
+++ b/lisp/gnus/gnus-sync.el
@@ -138,6 +138,11 @@ and `gnus-topic-alist'. Also see `gnus-variable-list'."
(defvar gnus-sync-newsrc-loader nil
"Carrier for newsrc data")
+(defcustom gnus-sync-file-encrypt-to nil
+ "If non-nil, `epa-file-encrypt-to' is set from this for encrypting the Sync
+ file."
+ :group 'gnus-sync)
+
(defcustom gnus-sync-lesync-name (system-name)
"The LeSync name for this machine."
:group 'gnus-sync
@@ -762,6 +767,9 @@ With a prefix, FORCE is set and all groups will be saved."
(progn
(let ((coding-system-for-write gnus-ding-file-coding-system)
(standard-output (current-buffer)))
+ (when gnus-sync-file-encrypt-to
+ (set (make-local-variable 'epa-file-encrypt-to)
+ gnus-sync-file-encrypt-to))
(princ (format ";; -*- mode:emacs-lisp; coding: %s; -*-\n"
gnus-ding-file-coding-system))
(princ ";; Gnus sync data v. 0.0.1\n")