]> code.delx.au - gnu-emacs/commitdiff
Merge changes made in Gnus master
authorGnus developers <ding@gnus.org>
Sun, 23 Dec 2012 12:45:01 +0000 (12:45 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Sun, 23 Dec 2012 12:45:01 +0000 (12:45 +0000)
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.

lisp/gnus/ChangeLog
lisp/gnus/gnus-int.el
lisp/gnus/gnus-sync.el

index cfdb44b99614b9c4558c0723ce5ba636db8852c2..516ef5e494854e073742d8b8e03378391d5998a8 100644 (file)
@@ -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):
index bc3ba187dd41b3de26cd65b2dfd6b714847a9662..b69229965a7bab042a35f917d07e9f6e7f515240 100644 (file)
@@ -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."
index 0ec9fedffe36bff87da2d35b482060245f2e313f..6776f9ccfc9628cc062fe6fb540b44298bb0bce3 100644 (file)
@@ -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")