emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Feature request: navigate history of folding views
@ 2007-09-03 17:23 William Henney
  2007-09-04  6:41 ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: William Henney @ 2007-09-03 17:23 UTC (permalink / raw)
  To: org-mode

I missed this comment of Eddward's initially because I was on holiday...

On 7/11/07, Eddward DeVilla <eddward@gmail.com> 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?

Currently, if I

1. edit the text in a given subtree
2. hide the subtree (e.g., "C-c C-p TAB")
3. type "C-_"

then my last edit will be undone (without even showing me!)


Cheers

Will

-- 

  Dr William Henney, Centro de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Feature request: navigate history of folding views
  2007-09-03 17:23 Feature request: navigate history of folding views William Henney
@ 2007-09-04  6:41 ` Carsten Dominik
  2007-09-06 15:00   ` William Henney
  0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2007-09-04  6:41 UTC (permalink / raw)
  To: William Henney; +Cc: org-mode


On Sep 3, 2007, at 19:23, William Henney wrote:

> I missed this comment of Eddward's initially because I was on 
> holiday...
>
> On 7/11/07, Eddward DeVilla <eddward@gmail.com> 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.

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.

- Carsten

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Feature request: navigate history of folding views
  2007-09-04  6:41 ` Carsten Dominik
@ 2007-09-06 15:00   ` William Henney
  2007-09-07  8:04     ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: William Henney @ 2007-09-06 15:00 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: org-mode

Hi Carsten

On 9/4/07, Carsten Dominik <dominik@science.uva.nl> wrote:
>
> On Sep 3, 2007, at 19:23, William Henney wrote:
> > On 7/11/07, Eddward DeVilla <eddward@gmail.com> 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


-- 

  Dr William Henney, Centro de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Feature request: navigate history of folding views
  2007-09-06 15:00   ` William Henney
@ 2007-09-07  8:04     ` Carsten Dominik
  2007-09-07 14:24       ` William Henney
  0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2007-09-07  8:04 UTC (permalink / raw)
  To: William Henney; +Cc: org-mode


On Sep 6, 2007, at 17:00, William Henney wrote:
>
> 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.

Well, you can of couse also go into the to create the indirect buffer
yourself, before doing the tree.

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

This is in fact exactly what org-goto was meant for, opening the 
otherwise
compact outline in several points, for easy going back and forth.

> Another option would be to expand on the abilities of org-goto. I just
> discovered that "C-s" works in the *org-goto* buffer, which is great.
> If "C-c /" would work there as well, that would just about have me
> covered. Even better with a key binding of just "/"

That is, actually, a very good idea.  Maybe we could also allow
setting the mark and copying the region, so org-goto could be used as
a general quickly-access-some-other-place command.  I'll do that.

Thanks!

- Carsten

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Feature request: navigate history of folding views
  2007-09-07  8:04     ` Carsten Dominik
@ 2007-09-07 14:24       ` William Henney
  0 siblings, 0 replies; 5+ messages in thread
From: William Henney @ 2007-09-07 14:24 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: org-mode

> > Another option would be to expand on the abilities of org-goto. I just
> > discovered that "C-s" works in the *org-goto* buffer, which is great.
> > If "C-c /" would work there as well, that would just about have me
> > covered. Even better with a key binding of just "/"
>
> That is, actually, a very good idea.  Maybe we could also allow
> setting the mark and copying the region, so org-goto could be used as
> a general quickly-access-some-other-place command.  I'll do that.
>

That'll be great - thanks!

Will


-- 

  Dr William Henney, Centro de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-09-07 14:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-03 17:23 Feature request: navigate history of folding views William Henney
2007-09-04  6:41 ` Carsten Dominik
2007-09-06 15:00   ` William Henney
2007-09-07  8:04     ` Carsten Dominik
2007-09-07 14:24       ` William Henney

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