5

Is there a property or command that can help to hide/fold a subtree temporarily even when doing org-cycle?

1
  • You can modify org-cycle-hide-drawers to skip over something you have hidden that contains a special property/symbol; e.g., an overlay property such as 'org-cycle--skip-this t. However, there are only a very few Emacs users in the world who would dare modify a stock function -- e.g., I modify the heck out of anything and everything that I can get my hands on.
    – lawlist
    Jul 31, 2019 at 2:20

1 Answer 1

9

If you mark the heading as "archived" then it's ignored for the default visibility toggling.

C-c C-x a (org-toggle-archive-tag), which just adds/removes the "ARCHIVE" tag to the heading -- all the subtree content remains.

Even when marked as archived you can force expansion with C-c C-TAB (org-force-cycle-archived) on the heading if you want, or just remove the archive tag.

note: if you're using a version of Emacs older than 27 then the binding is C-TAB (this binding was appropriated for tab-bar-mode in Emacs 27 and thus had to change).

See the manual for more details: https://orgmode.org/manual/Internal-archiving.html#Internal-archiving

edit: added note about changed keybinding for org-force-cycle-archived from Emacs 27.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.