summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus-srvr.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-srvr.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-srvr.el')
-rw-r--r--lisp/gnus/gnus-srvr.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el
index 4f463f8d482..66fb9ee1b59 100644
--- a/lisp/gnus/gnus-srvr.el
+++ b/lisp/gnus/gnus-srvr.el
@@ -32,6 +32,7 @@
(require 'gnus-group)
(require 'gnus-int)
(require 'gnus-range)
+(require 'gnus-cloud)
(autoload 'gnus-group-make-nnir-group "nnir")
@@ -322,7 +323,7 @@ The following commands are available:
"")
(if (gnus-cloud-server-p gnus-tmp-name)
" (cloud-sync)"
- ""))))
+ ""))))
(beginning-of-line)
(add-text-properties
(point)
@@ -1152,12 +1153,13 @@ Requesting compaction of %s... (this may take a long time)"
(let ((server (gnus-server-server-name)))
(unless server
(error "No server on the current line"))
- (unless (eq (car-safe (gnus-server-to-method server)) 'nnimap)
- (error "The server under point is not IMAP, so it can't host the Emacs Cloud"))
+ (unless (gnus-cloud-host-acceptable-method-p server)
+ (error "The server under point can't host the Emacs Cloud"))
- (setq gnus-cloud-method server)
- (gnus-message 1 "Uploading all data to Emacs Cloud with %S" gnus-cloud-method)
- (gnus-cloud-upload-data t)))
+ (custom-set-variables '(gnus-cloud-method server))
+ (when (gnus-yes-or-no-p (format "Upload Cloud data to %S now? " server))
+ (gnus-message 1 "Uploading all data to Emacs Cloud server %S" server)
+ (gnus-cloud-upload-data t))))
(provide 'gnus-srvr)