Skip to content

Commit

Permalink
[org] Add confirm and abort key bindings for *Org Note* buffers
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bcc32 authored and smile13241324 committed Aug 15, 2023
1 parent 4d3e01d commit df30d95
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions layers/+emacs/org/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit df30d95

Please sign in to comment.