From: Eric Abrahamsen Date: Sun, 11 Aug 2019 15:26:59 +0000 (-0700) Subject: Prompt for new sieve script names in sieve management X-Git-Tag: emacs-27.0.90~1646 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=73877cb3a781d667b2c03ed5a30add5058d1333b;p=emacs.git 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'. --- 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))