[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Showing hidden subtree automatically if point is hidden when t
From: |
User |
Subject: |
[Orgmode] Showing hidden subtree automatically if point is hidden when the buffer is opened |
Date: |
Mon, 27 Jul 2009 14:00:07 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
I use folded view by default, but I also use saveplace.el,
because it's nice to continue from the point I left off in the
buffer, instead of navigating there again manually.
The problem is the restored point can be in an automatically
folded section when the buffer is opened, so I added this little
code to my org-mode hook which opens the subtree automatically if
point is hidden:
(run-with-idle-timer 0 nil
(lambda ()
(when (outline-invisible-p)
(save-excursion
(outline-previous-visible-heading 1)
(org-show-subtree)))))
I haven't seen an option for this in org, so I post the code
here if someone has a similar problem.
- [Orgmode] Showing hidden subtree automatically if point is hidden when the buffer is opened,
User <=