summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-cloud.el
diff options
context:
space:
mode:
authorTed Zlatanov <tzz@lifelogs.com>2016-07-18 10:03:42 -0400
committerTed Zlatanov <tzz@lifelogs.com>2016-07-18 10:03:42 -0400
commitcbd54d034257566cf827fbb01f11d78712f7c994 (patch)
treea377f623187eb327229187e15c3dc4a279b897fc /lisp/gnus/gnus-cloud.el
parentb996f42dad7eaad28773e0a55f941eef9b9e97ef (diff)
downloademacs-scratch/gnus-cloud.tar.gz
Minor gnus-cloud UI improvements.scratch/gnus-cloud
* gnus-cloud.el (gnus-cloud-host-acceptable-method-p): New function so other code can check if a server method can host the Gnus cloud. (gnus-cloud-storage-method): Use 'radio instead of 'choice for better UI. (gnus-cloud-method): Make this a defcustom and note how to set it. * gnus-srvr.el (gnus-server-toggle-cloud-method-server): Use gnus-cloud-host-acceptable-method-p. (gnus-server-toggle-cloud-method-server): Use custom-set-variables to set the gnus-cloud-method. Ask the user if it's OK to upload the data right now.
Diffstat (limited to 'lisp/gnus/gnus-cloud.el')
-rw-r--r--lisp/gnus/gnus-cloud.el20
1 files changed, 14 insertions, 6 deletions
diff --git a/lisp/gnus/gnus-cloud.el b/lisp/gnus/gnus-cloud.el
index 08606234cdd..22086b1f36e 100644
--- a/lisp/gnus/gnus-cloud.el
+++ b/lisp/gnus/gnus-cloud.el
@@ -52,10 +52,10 @@
(defcustom gnus-cloud-storage-method (if (featurep 'epg) 'epg 'base64-gzip)
"Storage method for cloud data, defaults to EPG if that's available."
:group 'gnus-cloud
- :type '(choice (const :tag "No encoding" nil)
- (const :tag "Base64" base64)
- (const :tag "Base64+gzip" base64-gzip)
- (const :tag "EPG" epg)))
+ :type '(radio (const :tag "No encoding" nil)
+ (const :tag "Base64" base64)
+ (const :tag "Base64+gzip" base64-gzip)
+ (const :tag "EPG" epg)))
(defcustom gnus-cloud-interactive t
"Whether Gnus Cloud changes should be confirmed."
@@ -68,8 +68,13 @@
(defvar gnus-cloud-version 1)
(defvar gnus-cloud-sequence 1)
-(defvar gnus-cloud-method nil
- "The IMAP select method used to store the cloud data.")
+(defcustom gnus-cloud-method nil
+ "The IMAP select method used to store the cloud data.
+See also `gnus-server-toggle-cloud-method-server' for an
+easy interactive way to set this from the Server buffer."
+ :group 'gnus-cloud
+ :type '(radio (const :tag "Not set" nil)
+ (string :tag "A Gnus server name as a string")))
(defun gnus-cloud-make-chunk (elems)
(with-temp-buffer
@@ -468,6 +473,9 @@ Otherwise, returns the Gnus Cloud data chunks."
(defun gnus-cloud-host-server-p (server)
(equal gnus-cloud-method server))
+(defun gnus-cloud-host-acceptable-method-p (server)
+ (eq (car-safe (gnus-server-to-method server)) 'nnimap))
+
(defun gnus-cloud-collect-full-newsrc ()
"Collect all the Gnus newsrc data in a portable format."
(let ((infos nil))