User <spamfilteracco...@gmail.com> writes: > 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.
I added this entry on org-hacks.org (Worg): Fix a problem with saveplace.el putting you back in a folded position: #+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. -- Bastien _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode