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 07:04:52 +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 1MUxnI-0001BA-FV for emacs-orgmode@gnu.org; Sun, 26 Jul 2009 03:05:16 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MUxnE-00016d-JW for emacs-orgmode@gnu.org; Sun, 26 Jul 2009 03:05:16 -0400 Received: from [199.232.76.173] (port=49210 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MUxnE-00016B-Dr for emacs-orgmode@gnu.org; Sun, 26 Jul 2009 03:05:12 -0400 Received: from mx20.gnu.org ([199.232.41.8]:61341) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MUxnD-0001WC-RH for emacs-orgmode@gnu.org; Sun, 26 Jul 2009 03:05:12 -0400 Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MUxnA-0000ID-K1 for emacs-orgmode@gnu.org; Sun, 26 Jul 2009 03:05:08 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MUxn5-0007Qa-Dz for emacs-orgmode@gnu.org; Sun, 26 Jul 2009 07:05:03 +0000 Received: from dsl51B613E0.pool.t-online.hu ([81.182.19.224]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Jul 2009 07:05:03 +0000 Received: from spamfilteraccount by dsl51B613E0.pool.t-online.hu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Jul 2009 07:05:03 +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 Bastien googlemail.com> writes: > > 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? Unfortunately, I have more pressing matters to deal with currently, but I also have a possible solution if someone has a a little time to fix the package. 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. This could be another advantage of org over other packages, since this feature is pretty basic in my opinion and users usually look for something like this. P.S. If saving to a separate file is implemented then it is not necessary to trigger storing of folding info with the save hook. The user sometimes doesn't modify the file, only browses it, so saving fold info when the buffer is closed would be the perfect solution.