Compare commits
7 Commits
9b3578c821
...
24a3c71c13
Author | SHA1 | Date |
---|---|---|
coolneng | 24a3c71c13 | |
coolneng | e46df2a852 | |
coolneng | 9711448199 | |
coolneng | f46b5043a2 | |
coolneng | 193dce0fa5 | |
coolneng | 1ada882299 | |
coolneng | 13d6081b6a |
42
+org.el
42
+org.el
|
@ -183,25 +183,25 @@
|
|||
(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)))
|
||||
(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)
|
||||
|
|
Loading…
Reference in New Issue