emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Keeping outline after reverting buffer


From: Nicolas Goaziou
Subject: Re: [O] Keeping outline after reverting buffer
Date: Fri, 19 Jan 2018 18:43:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello,

Roland Fehrenbacher <address@hidden> writes:

> is there any option or other customization to keep the outline of an org
> buffer (uncollapsed parts of the tree) after the buffer has been
> reverted (org-mode 9.0.1, emacs 25.3.2)? In my case only the top
> headings are displayed after reverting. This is quite annoying and
> time-consuming in a setup, where one constantly switches between git
> branches e.g.

Org provides two functions to save and restore visibility (and a macro
that does both, but isn't useful in your case):
`org-outline-overlay-data' and `org-set-outline-overlay-data'.

You may want to use them within `before-revert-hook' and
`after-revert-hook'.

Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]