From a9ad9e54b3f55be4a24bea85f593e8f7c1832735 Mon Sep 17 00:00:00 2001 From: coolneng Date: Fri, 27 Jan 2023 14:01:31 +0100 Subject: [PATCH] Simplify org mode search hack --- +org.el | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/+org.el b/+org.el index d277078..c7b2f22 100644 --- a/+org.el +++ b/+org.el @@ -182,26 +182,5 @@ org-goto-max-level 1) (use-package! org-capture-ref) ;; HACK Fix search folded sections -(after! org-fold-core - (defun org-show-current-heading-tidily () - (interactive) ;Inteactive - "Show next entry, keeping other entries closed." - (if (save-excursion (end-of-line) (outline-invisible-p)) - (progn (org-show-entry) (show-children)) - (setq-local my:current_line (line-number-at-pos)) - (outline-back-to-heading) - (unless (and (bolp) (org-on-heading-p)) - (org-up-heading-safe) - (hide-subtree) - (error "Boundary reached")) - (org-overview) - (org-reveal t) - (org-show-entry) - (show-children) - (goto-line my:current_line))) - (defun qw/search-buffer () - (interactive) - (org-fold-show-all) - (+default/search-buffer) - (org-show-current-heading-tidily))) -(map! :leader :n "s s" #'qw/search-buffer) +(setq org-fold-core-style 'overlays) +(evil-select-search-module 'evil-search-module 'evil-search)