How to add advice to achieve for org buffer like to collapse all other headings after executing 'consult-org-heading'? #943
-
Hi, guys, thank you for the great effort! I wish to have all other headings collapsed after selecting a heading via 'consult-org-heading'. I wrote a snippet like follows, but it didn't seem to work
What's wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Hi! It could be that you have to use an Org-specific function, e.g., |
Beta Was this translation helpful? Give feedback.
-
@minad, I'm still learning the basic elisp, could you suggest me a path to figure out what to do? Maybe using advice is a wrong way, or I need to let it be combined with the use of some window programming like "select-window" to do the job? Actually, such a task does need some kind of a hook to easily do what it needs, but I don't see any of it. |
Beta Was this translation helpful? Give feedback.
This works for me: