From 73877cb3a781d667b2c03ed5a30add5058d1333b Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Sun, 11 Aug 2019 08:26:59 -0700 Subject: [PATCH] Prompt for new sieve script names in sieve management * lisp/net/sieve.el (sieve-edit-script): Otherwise the user ends up with a script named '.sieve'. --- lisp/net/sieve.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/net/sieve.el b/lisp/net/sieve.el index 3337998bedc..4485b8c730f 100644 --- a/lisp/net/sieve.el +++ b/lisp/net/sieve.el @@ -210,7 +210,11 @@ require \"fileinto\"; (set-buffer-modified-p nil) (error "Sieve download failed: %s" err))) (switch-to-buffer (get-buffer-create "template.siv")) - (insert sieve-template)) + (insert sieve-template) + (setq name (read-string "Name for new script: ")) + (when (string-match "\\.sieve\\'" name) + ;; The server will append .sieve to the script name. + (setq name (replace-match "" t t name)))) (sieve-mode) (setq sieve-buffer-script-name name) (goto-char (point-min)) -- 2.39.2