2

Given the following org-mode text:

* Heading
  :PROPERTIES:
  :CATEGORY: demo
  :END:

If it's collapsed, I can cycle between these two states:

* Heading...

and

* Heading
  :PROPERTIES:...

However, I can't see any way of expanding PROPERTIES whilst point is on * Heading. I can only expand PROPERTIES when point is on that line. This is unlike subheadings, which I can expand even when point is on the toplevel heading.

I want visibility cycling to include PROPERTIES. How can I expand PROPERTIES here?

5

org-show-subtree is actually doing its job when cycling. It shows the contents of the drawer (like :PROPERTIES:). But, org-cycle-hide-drawers in org-cycle-hook hides the drawers again.

The good thing is that you can customize org-cycle-hook and remove org-cycle-hide-drawers.

I just cite the customization page for this option here:

Org Cycle Hook:
INS DEL org-cycle-hide-archived-subtrees
INS DEL org-cycle-hide-drawers
INS DEL org-cycle-show-empty-lines
INS DEL org-optimize-window-after-visibility-change
INS
    State : STANDARD.
   Hook that is run after ‘org-cycle’ has changed the buffer visibility. Hide
   The function(s) in this hook must accept a single argument which indicates
   the new state that was set by the most recent ‘org-cycle’ command.  The
   argument is a symbol.  After a global state change, it can have the values
   ‘overview’, ‘contents’, or ‘all’.  After a local state change, it can have
   the values ‘folded’, ‘children’, or ‘subtree’.
Groups: Org Cycle

Alternatively you could bind another key (e.g., C-c s) for showing the full subtree:

(add-hook 'org-mode-hook (lambda ()
                           (local-set-key (kbd "C-c s") 'org-show-subtree)))
0

From org-cycles doc string:

With a triple C-u prefix argument, show the entire buffer, including any drawers

The info docs don't mention any other way to open or close drawers without moving there. If you want more, it's time to write some elisp!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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