emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "William Henney" <whenney@gmail.com>
To: Carsten Dominik <dominik@science.uva.nl>
Cc: org-mode <emacs-orgmode@gnu.org>
Subject: Re: Feature request: navigate history of folding views
Date: Thu, 6 Sep 2007 10:00:06 -0500	[thread overview]
Message-ID: <41c818190709060800n48dab608u11012e4c15b566c6@mail.gmail.com> (raw)
In-Reply-To: <e3618a42fd9b705980d79deb7fc40965@science.uva.nl>

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

  reply	other threads:[~2007-09-06 15:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2007-09-07  8:04     ` Carsten Dominik
2007-09-07 14:24       ` William Henney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41c818190709060800n48dab608u11012e4c15b566c6@mail.gmail.com \
    --to=whenney@gmail.com \
    --cc=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).