emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: User <spamfilteraccount@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Restore previous folded state of org buffer
Date: Sat, 25 Jul 2009 19:34:01 +0000 (UTC)	[thread overview]
Message-ID: <loom.20090725T193219-160@post.gmane.org> (raw)
In-Reply-To: 87hbx0zibp.fsf@bzg.ath.cx

Bastien <bastienguerry <at> googlemail.com> writes:
> 
> Nope.  As this is becoming a FAQ, I've added this sad answer to the
> org-faq.org file in Worg.
> 

I don't need this feature at the moment, but the problem
intrigued me, so I came up with a quick implementation.

I don't plan to work on it further, since I don't really need it
yet (I'm a novice org user), but I put it here if someone wants
to develop the idea.

You simply load the elisp file and from that on folding state is
automatically saved and restored for org mode files. The folding
information is saved at the end of the org file itself every time
the buffer is saved.

It seemed to work pretty well. The only faulty case I discovered
is when the very last branch is folded in the file, because it
contains the saved folding info, but this bug is probably easy to
fix with a little thinking.

Here it is. I hope someone takes the idea further:


http://www.emacswiki.org/emacs/orgfold.el

  reply	other threads:[~2009-07-25 19:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-25 18:06 Restored previous folded state after buffer opened again? User
2009-07-25 18:57 ` Matthew Lundin
2009-07-25 19:14 ` Bastien
2009-07-25 19:34   ` User [this message]
2009-07-25 22:28     ` Restore previous folded state of org buffer Bastien
2009-07-26  7:04       ` User
2009-07-26 17:22         ` User
2009-07-26 18:50           ` Bastien
2009-07-26 19:14             ` User
2009-07-26 19:24               ` Bastien
2009-08-03  4:34           ` Carsten Dominik
2009-08-03  5:33             ` User
2009-08-03  5:38               ` Carsten Dominik
2009-07-26  0:05     ` Eric S Fraga

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=loom.20090725T193219-160@post.gmane.org \
    --to=spamfilteraccount@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).