Compare commits
7 Commits
24a3c71c13
...
9b3578c821
Author | SHA1 | Date |
---|---|---|
coolneng | 9b3578c821 | |
coolneng | 5efe2a18e7 | |
coolneng | 82ef744f1b | |
coolneng | abfd4b71f8 | |
coolneng | 64e33fd3c1 | |
coolneng | c62ad66a4a | |
coolneng | 148afa2091 |
42
+org.el
42
+org.el
|
@ -183,25 +183,25 @@
|
||||||
(use-package! org-capture-ref)
|
(use-package! org-capture-ref)
|
||||||
;; HACK Fix search folded sections
|
;; HACK Fix search folded sections
|
||||||
(after! org-fold-core
|
(after! org-fold-core
|
||||||
(defun org-show-current-heading-tidily ()
|
(defun org-show-current-heading-tidily ()
|
||||||
(interactive) ;Inteactive
|
(interactive) ;Inteactive
|
||||||
"Show next entry, keeping other entries closed."
|
"Show next entry, keeping other entries closed."
|
||||||
(if (save-excursion (end-of-line) (outline-invisible-p))
|
(if (save-excursion (end-of-line) (outline-invisible-p))
|
||||||
(progn (org-show-entry) (show-children))
|
(progn (org-show-entry) (show-children))
|
||||||
(setq-local my:current_line (line-number-at-pos))
|
(setq-local my:current_line (line-number-at-pos))
|
||||||
(outline-back-to-heading)
|
(outline-back-to-heading)
|
||||||
(unless (and (bolp) (org-on-heading-p))
|
(unless (and (bolp) (org-on-heading-p))
|
||||||
(org-up-heading-safe)
|
(org-up-heading-safe)
|
||||||
(hide-subtree)
|
(hide-subtree)
|
||||||
(error "Boundary reached"))
|
(error "Boundary reached"))
|
||||||
(org-overview)
|
(org-overview)
|
||||||
(org-reveal t)
|
(org-reveal t)
|
||||||
(org-show-entry)
|
(org-show-entry)
|
||||||
(show-children)
|
(show-children)
|
||||||
(goto-line my:current_line)))
|
(goto-line my:current_line)))
|
||||||
(defun qw/search-buffer ()
|
(defun qw/search-buffer ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(org-fold-show-all)
|
(org-fold-show-all)
|
||||||
(+default/search-buffer)
|
(+default/search-buffer)
|
||||||
(org-show-current-heading-tidily)))
|
(org-show-current-heading-tidily)))
|
||||||
(map! :leader :n "s s" #'qw/search-buffer)
|
(map! :leader :n "s s" #'qw/search-buffer)
|
||||||
|
|
Loading…
Reference in New Issue