From d46c80b03b7cc7c36d56f2652173c47e0fafa1c6 Mon Sep 17 00:00:00 2001 From: Madeleine Sydney Date: Fri, 21 Feb 2025 21:14:41 -0700 Subject: [PATCH] feat(emacs): Remap Imenu commands to consult-org-heading --- users/crumb/programs/emacs/modules/syd-org.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/users/crumb/programs/emacs/modules/syd-org.el b/users/crumb/programs/emacs/modules/syd-org.el index 55c2b3c..8b09c16 100755 --- a/users/crumb/programs/emacs/modules/syd-org.el +++ b/users/crumb/programs/emacs/modules/syd-org.el @@ -382,6 +382,14 @@ See https://lists.gnu.org/archive/html/emacs-orgmode/2019-07/msg00081.html." (general-def :prefix-map 'syd-leader-notes-map "r" `("Org-roam" . ,syd-leader-notes-roam-map)) + ;; Rebind Imenu keybind to `consult-org-heading'. It's similar enough in + ;; appearance and functionality, but more reliable and "correct." + ;; REVIEW: Perhaps it would be best to implement `imenu-create-index-function' + ;; using `consult-org-heading'? + (general-def + :keymaps 'org-mode-map + [remap consult-imenu] #'consult-org-heading + [remap imenu] #'consult-org-heading) (general-define-key :keymaps 'org-mode-map :states '(normal visual motion emacs insert)