From 094173d26d8f04f017e39d963e00e1d5fdcacec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Yrj=C3=B6l=C3=A4?= Date: Tue, 19 Jan 2016 08:21:34 +0200 Subject: [PATCH] org-layer: follow the confirm and abort conventions --- layers/org/README.org | 14 ++++++++++++++ layers/org/packages.el | 16 ++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/layers/org/README.org b/layers/org/README.org index 9d21a4ca3..0608f2af5 100644 --- a/layers/org/README.org +++ b/layers/org/README.org @@ -22,6 +22,7 @@ - [[Emphasis][Emphasis]] - [[Tagging][Tagging]] - [[Navigating in calendar][Navigating in calendar]] + - [[Capture buffers and src blocks][Capture buffers and src blocks]] - [[Org agenda][Org agenda]] - [[Pomodoro][Pomodoro]] - [[Presentation][Presentation]] @@ -268,6 +269,19 @@ You can tweak the bullets displayed in the org buffer in the function | ~M-J~ | One year forward | | ~M-K~ | One year backward | +** Capture buffers and src blocks +=org-capture-mode= and =org-src-mode= both support the confirm and abort +conventions. + +| Key Binding | Description | +|----------------------------------------------+----------------------------------------| +| ~SPC m ~ | confirm in =org-capture-mode= | +| ~SPC m '~ | confirm in =org-src-mode= | +| ~SPC m c~ | confirm | +| ~SPC m a~ | abort | +| ~SPC m k~ | abort | +| ~SPC m r~ | org-capture-refile in org-capture-mode | + ** Org agenda The evilified org agenda supports, the following bindings: diff --git a/layers/org/packages.el b/layers/org/packages.el index 7d5b91da5..6b50c372e 100644 --- a/layers/org/packages.el +++ b/layers/org/packages.el @@ -119,6 +119,22 @@ `(defun ,fname () (interactive) (org-emphasize ,char))) + ;; Follow the confirm and abort conventions + (with-eval-after-load 'org-capture + (spacemacs/set-leader-keys-for-minor-mode 'org-capture-mode + dotspacemacs-major-mode-leader-key 'org-capture-finalize + "c" 'org-capture-finalize + "k" 'org-capture-kill + "a" 'org-capture-kill + "r" 'org-capture-refile)) + + (with-eval-after-load 'org-src + (spacemacs/set-leader-keys-for-minor-mode 'org-src-mode + "'" 'org-edit-src-exit + "c" 'org-edit-src-exit + "a" 'org-edit-src-abort + "k" 'org-edit-src-abort)) + ;; Insert key for org-mode and markdown a la C-h k ;; from SE endless http://emacs.stackexchange.com/questions/2206/i-want-to-have-the-kbd-tags-for-my-blog-written-in-org-mode/2208#2208 (defun spacemacs/insert-keybinding-org (key)