From: Roland Fehrenbacher <rf@q-leap.de>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org
Subject: Re: Keeping outline after reverting buffer
Date: Sat, 20 Jan 2018 12:38:57 +0100 [thread overview]
Message-ID: <23139.10833.341343.841675@gargle.gargle.HOWL> (raw)
In-Reply-To: <874lnhpwwn.fsf@nicolasgoaziou.fr>
Hi Nicolas,
>>>>> "N" == Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
N> Hello, Roland Fehrenbacher <rf@q-leap.de> 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/6666862/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 ---
prev parent reply other threads:[~2018-01-20 11:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-15 13:49 Keeping outline after reverting buffer Roland Fehrenbacher
2018-01-19 17:43 ` Nicolas Goaziou
2018-01-20 11:38 ` Roland Fehrenbacher [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=23139.10833.341343.841675@gargle.gargle.HOWL \
--to=rf@q-leap.de \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).