From mboxrd@z Thu Jan 1 00:00:00 1970 From: User Subject: Restore previous folded state of org buffer Date: Sat, 25 Jul 2009 19:34:01 +0000 (UTC) Message-ID: References: <87hbx0zibp.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 1MUn0h-0005qX-Me for emacs-orgmode@gnu.org; Sat, 25 Jul 2009 15:34:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MUn0c-0005kE-3j for emacs-orgmode@gnu.org; Sat, 25 Jul 2009 15:34:22 -0400 Received: from [199.232.76.173] (port=52777 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MUn0b-0005jx-Sw for emacs-orgmode@gnu.org; Sat, 25 Jul 2009 15:34:17 -0400 Received: from main.gmane.org ([80.91.229.2]:36253 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 1MUn0b-0007cv-Fe for emacs-orgmode@gnu.org; Sat, 25 Jul 2009 15:34:17 -0400 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MUn0W-00010h-KR for emacs-orgmode@gnu.org; Sat, 25 Jul 2009 19:34:12 +0000 Received: from dsl51B792FC.pool.t-online.hu ([81.183.146.252]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Jul 2009 19:34:12 +0000 Received: from spamfilteraccount by dsl51B792FC.pool.t-online.hu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 25 Jul 2009 19:34:12 +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: > > 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