From mboxrd@z Thu Jan 1 00:00:00 1970 From: User Subject: Re: Restore previous folded state of org buffer Date: Sun, 26 Jul 2009 17:22:27 +0000 (UTC) Message-ID: References: <87hbx0zibp.fsf@bzg.ath.cx> <87vdlge6t2.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MV7Qv-0000E5-77 for emacs-orgmode@gnu.org; Sun, 26 Jul 2009 13:22:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MV7Qp-00006B-Je for emacs-orgmode@gnu.org; Sun, 26 Jul 2009 13:22:48 -0400 Received: from [199.232.76.173] (port=56827 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MV7Qp-00005t-CX for emacs-orgmode@gnu.org; Sun, 26 Jul 2009 13:22:43 -0400 Received: from main.gmane.org ([80.91.229.2]:43974 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MV7Qo-0006p6-Sr for emacs-orgmode@gnu.org; Sun, 26 Jul 2009 13:22:43 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MV7Qk-0005tZ-4w for emacs-orgmode@gnu.org; Sun, 26 Jul 2009 17:22:38 +0000 Received: from dsl51B793A2.pool.t-online.hu ([81.183.147.162]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Jul 2009 17:22:38 +0000 Received: from spamfilteraccount by dsl51B793A2.pool.t-online.hu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Jul 2009 17:22:38 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org User gmail.com> writes: > > The folding information should simply be saved into a separate > file. For example, for notes.org the accompanying folding > information could be in notes.org.fold. The posted code can be > trivially modified to behave this way and with this change the > actual content of the org file is not affected at all and we have > a pretty usable folding save/restore extension for org. The thing pestered me, so I fixed it to take care of it. Now folding information is saved into a separate file and it is saved when the buffer is closed (but only if the buffer is saved to disk to avoid saving folding info for discarded buffers). I fixed the algorithm too, because it was buggy. Now it's working well and it's also simpler. http://www.emacswiki.org/emacs/orgfold-separate-file.el