[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: Showing hidden subtree automatically if point is hidden wh
[Orgmode] Re: Showing hidden subtree automatically if point is hidden when the buffer is opened
Tue, 28 Jul 2009 04:19:33 +0000 (UTC)
Bastien <bastienguerry <at> googlemail.com> writes:
> #+begin_src emacs-lisp
> (add-hook 'org-mode-hook
> (lambda ()
> (when (outline-invisible-p)
> (outline-previous-visible-heading 1)
> 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