diff options
author | Martin Polden <mpolden@mpolden.no> | 2024-02-10 18:46:24 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2024-02-19 17:37:15 +0100 |
commit | 7fbc8d091e3c4a65f69a2007fb88f3b4f5d126a0 (patch) | |
tree | fb7534c62964b5d6de4dedbada809aa92616c433 /lisp/init-org.el | |
parent | 013841bc506236bec456a9804d9f4377c14cede1 (diff) |
org: use consult when jumping to headline
Diffstat (limited to 'lisp/init-org.el')
-rw-r--r-- | lisp/init-org.el | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lisp/init-org.el b/lisp/init-org.el index 1275a0a..f2a5f29 100644 --- a/lisp/init-org.el +++ b/lisp/init-org.el @@ -2,6 +2,16 @@ ;;; Commentary: ;;; Code: +(defun mpolden/org-goto () + "Jump to an Org heading. + +Uses `consult-org-heading' if available, and otherwise falls back +to `org-goto'." + (interactive) + (if (functionp 'consult-org-heading) + (call-interactively 'consult-org-heading) + (org-goto))) + (use-package org :mode ("\\.org\\'" . org-mode) :bind (("C-c c" . org-capture) @@ -9,7 +19,8 @@ ("C-c a" . org-agenda) :map org-mode-map ("C-c o a" . org-archive-subtree) - ("C-c o s" . org-save-all-org-buffers)) + ("C-c o s" . org-save-all-org-buffers) + ("C-c C-j" . mpolden/org-goto)) :init ;; set default org directory (setq org-directory "~/org") |