From df30d9592674f71fd304091de61582f1682d506d Mon Sep 17 00:00:00 2001 From: "Aaron L. Zeng" Date: Mon, 14 Aug 2023 16:45:00 -0400 Subject: [PATCH] [org] Add confirm and abort key bindings for *Org Note* buffers Note buffers (created by org-add-note and other commands) do not have any special minor mode associated with them, so we create one specifically for Spacemacs as a place to put the key bindings. We enable this minor mode in such buffers' setup hook. --- layers/+emacs/org/packages.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/layers/+emacs/org/packages.el b/layers/+emacs/org/packages.el index f3a45da8b165..a0530a2d582c 100644 --- a/layers/+emacs/org/packages.el +++ b/layers/+emacs/org/packages.el @@ -191,6 +191,15 @@ "a" 'org-edit-src-abort "k" 'org-edit-src-abort)) + (with-eval-after-load 'org + (define-minor-mode spacemacs//org-note-mode + "A minor mode to provide Spacemacs key bindings for *Org Node* buffers.") + (spacemacs/set-leader-keys-for-minor-mode 'spacemacs//org-note-mode + dotspacemacs-major-mode-leader-key 'org-ctrl-c-ctrl-c + "c" 'org-ctrl-c-ctrl-c + "k" 'org-kill-note-or-show-branches) + (add-hook 'org-log-buffer-setup-hook 'spacemacs//org-note-mode)) + (autoload #'org-clock-jump-to-current-clock "org-clock") (add-hook 'org-mode-hook 'dotspacemacs//prettify-spacemacs-docs)