|
From: | User |
Subject: | [Orgmode] Re: Showing hidden subtree automatically if point is hidden when the buffer is opened |
Date: | Tue, 28 Jul 2009 04:19:33 +0000 (UTC) |
User-agent: | Loom/3.14 (http://gmane.org/) |
Bastien <bastienguerry <at> googlemail.com> writes: > > #+begin_src emacs-lisp > (add-hook 'org-mode-hook > (lambda () > (when (outline-invisible-p) > (save-excursion > (outline-previous-visible-heading 1) > (org-show-subtree))))) > #+end_src > > Note that I removed the timer - no sure why it was useful. Feel free to > modify this hack the way you want on Worg. > I added the timer, because I didn't know in which order the hooks are run. If org-mode hook runs first and then saveplace's hook which restores point then the above code has no effect. The null timer guarantees the code runs when all the hooks are executed.
[Prev in Thread] | Current Thread | [Next in Thread] |