summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjetil Orbekk <kj@orbekk.com>2023-10-30 14:25:02 -0400
committerKjetil Orbekk <kj@orbekk.com>2023-10-30 14:25:02 -0400
commit63e889be9e3717af5d72bc84dca589ba5ee42856 (patch)
tree62773dd00f70eeb59ceab58835c658a404d63416
parent6b7525e1f91764de09c8fa5b49bce8edc3c8ad3c (diff)
fix
-rw-r--r--emacs/.config/emacs-kj/lisp/kj-email.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/emacs/.config/emacs-kj/lisp/kj-email.el b/emacs/.config/emacs-kj/lisp/kj-email.el
index bc694f0..2d74164 100644
--- a/emacs/.config/emacs-kj/lisp/kj-email.el
+++ b/emacs/.config/emacs-kj/lisp/kj-email.el
@@ -10,6 +10,14 @@
(add-hook 'message-mode-hook 'turn-off-auto-fill)
(add-hook 'message-mode-hook 'visual-line-mode)
+(defun kj/confirm-empty-subject ()
+ "Allow user to quit when current message subject is empty."
+ (or (message-field-value "Subject")
+ (yes-or-no-p "Really send without Subject? ")
+ (keyboard-quit)))
+
+(add-hook 'message-send-hook #'kj/confirm-empty-subject)
+
(setq notmuch-saved-searches
'((:name "inbox" :query "tag:inbox -tag:_gz" :key "i" :search-type tree)
(:name "unread" :query "tag:unread" :key "u" :search-type tree)