From mboxrd@z Thu Jan 1 00:00:00 1970 From: "William Henney" Subject: Re: Feature request: navigate history of folding views Date: Thu, 6 Sep 2007 10:00:06 -0500 Message-ID: <41c818190709060800n48dab608u11012e4c15b566c6@mail.gmail.com> References: <41c818190709031023x606ad97er7076489ca7f4ed92@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ITIq1-0001HD-9i for emacs-orgmode@gnu.org; Thu, 06 Sep 2007 11:00:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ITIq0-0001Ez-Co for emacs-orgmode@gnu.org; Thu, 06 Sep 2007 11:00:08 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ITIq0-0001EP-93 for emacs-orgmode@gnu.org; Thu, 06 Sep 2007 11:00:08 -0400 Received: from an-out-0708.google.com ([209.85.132.243]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ITIpz-0008RK-6U for emacs-orgmode@gnu.org; Thu, 06 Sep 2007 11:00:07 -0400 Received: by an-out-0708.google.com with SMTP id c25so23984ana for ; Thu, 06 Sep 2007 08:00:06 -0700 (PDT) In-Reply-To: Content-Disposition: inline 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: Carsten Dominik Cc: org-mode Hi Carsten On 9/4/07, Carsten Dominik wrote: > > On Sep 3, 2007, at 19:23, William Henney wrote: > > On 7/11/07, Eddward DeVilla wrote: > >> For my uses, what I would love is a way to have org-mode remember how > >> a subtree was folded so I could hide a subtree and then reopen it > >> later with all of it children exposed or hidden as they were before. > >> I like to use hiding for context in a project, but I get by without > >> it. > > > > This is similar to something that I have often wished for: some sort > > of history mechanism for the expose/hide states of a buffer. The ideal > > interface would simply be for "C-_" (undo) to work on the folding > > views. Is this at all feasible? > > Not easily. outline-mode uses overlays to hide parts of the buffer, > and overlay changes don't make it into the undo list. Text property > changes would be undoable. > OK, I understand this isn't going to happen any time soon. > I guess storing the hiding state in some way is in principle > possible but a lot of work. More-over, it would be hard to write > it in a way that it would this smoothly integrate into the normal > work flow. > Yes. On further reflection, my suggestion of just adding folding changes to the undo list wasn't a good one. We would really want a separate navigable list, similar to "C-c &" for buffer positions. Perhaps there are other ways to achieve what I want. Here is a common scenario where I have felt that a history of folding states would be useful: Say I am working on two or three small parts of a large org file. The rest of the file is folded. At some point I need information from elsewhere in the file, so I use "C-c /" to look for it. This creates a sparse tree that wipes out the particular folding state that I had originally created, so I now have to go back and search for the contexts that I was working in. Not good! One way that this could be improved (without implementing a history mechanism) would be if sparse trees were always created in indirect buffers, so the original view could be recovered. Would this be an easier solution to implement? It seems that "C-c C-j" (org-goto) already works in this sort of way (I only discovered org-goto a few days ago and I am rapidly falling in love with it). Cheers Will --=20 Dr William Henney, Centro de Radioastronom=EDa y Astrof=EDsica, Universidad Nacional Aut=F3noma de M=E9xico, Campus Morelia