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

User <spamfilteraccount@gmail.com> writes:

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

Great!

> 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.

Yes, I found this bug.  

One way to work around this limitation and to safely store the folding
information would be to put it in a face property for each headline.  
Perhaps you have time to dig into that direction?

Thanks for this proof-of-concept!

-- 
 Bastien

  reply	other threads:[~2009-07-25 22:28 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   ` Restore previous folded state of org buffer User
2009-07-25 22:28     ` Bastien [this message]
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=87vdlge6t2.fsf@bzg.ath.cx \
    --to=bastienguerry@googlemail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=spamfilteraccount@gmail.com \
    /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).