Re: [O] Keeping outline after reverting buffer
Hi Nicolas, > "N" == Nicolas Goaziou writes: N> Hello, Roland Fehrenbacher 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. N> Org provides two functions to save and restore visibility (and a N> macro that does both, but isn't useful in your case): N> `org-outline-overlay-data' and `org-set-outline-overlay-data'. N> You may want to use them within `before-revert-hook' and N> `after-revert-hook'. this was spot on, Thanks a lot. The following link https://stackoverflow.com/questions/862/org-mode-go-back-from-sparse-tree-to-previous-visibility/44158824#44158824 had a ready-to-use implementation for this. Excellent, makes life a lot easier :) Best, Roland --- http://www.q-leap.com / http://qlustar.com --- HPC / Storage / Cloud Linux Cluster OS ---
Re: [O] Keeping outline after reverting buffer
Hello, Roland Fehrenbacher 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
[O] Keeping outline after reverting buffer
Hi, 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. Thanks, Roland