highlight-symbol.el icon indicating copy to clipboard operation
highlight-symbol.el copied to clipboard

Unfolding headings whjile in org-mode

Open priyadarshan opened this issue 9 years ago • 3 comments

If I may submit a request: while in org-mode, and navigating with highlight-symbol-nav-mode, it would be quite useful if headings would temporarily unfold.

Thank you for highlight-symbol, it is indispensable to my workflow.

priyadarshan avatar Aug 16 '14 17:08 priyadarshan

I don't use org-mode. Do they unfold if you use the normal search?

nschum avatar Sep 23 '14 13:09 nschum

Hello, yes, normal search unfolds headings.

You could try with this minimal example (within org-mode):

* Heading 1                                                        :sysadmin:
:PROPERTIES:
:CUSTOM_ID: freebsd_10_3847
:END

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec hendrerit tempor
tellus. Donec pretium posuere tellus. Proin quam nisl, tincidunt et, mattis
eget, convallis nec, purus. Cum sociis natoque penatibus et magnis dis
parturient montes, nascetur ridiculus mus. Nulla posuere. Donec vitae dolor.
Nullam tristique diam non turpis. Cras placerat accumsan nulla. Nullam rutrum.
Nam vestibulum accumsan nisl.


** Heading 2                                                          :elisp:
:PROPERTIES:
:CUSTOM_ID: search_8439
:END

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. 

Having org-mode active, and having point on first header, press TAB until the heading fold completely.

If you search for "Lorem", search will unfold to show results. Next, with the first heading unfolded, keep subheading folded. With point within first Lorem, executing highlight-symbol-next will move point to end of subheading, without unfolding it.

priyadarshan avatar Sep 23 '14 14:09 priyadarshan

OK, so org-mode folds text just using normal overlays.

Looks like isearch manipulate the overlays where isearch-open-invisible-temporary is set. Unfortunately, not trivial code, though.

nschum avatar Sep 23 '14 15:09 nschum