emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] Implement history facility for org-occur searches


From: Carsten Dominik
Subject: Re: [O] [PATCH] Implement history facility for org-occur searches
Date: Mon, 10 Oct 2011 20:16:19 +0200

On 10.10.2011, at 09:47, suvayu ali wrote:

> Hi Carsten,
> 
> Sorry, I somehow missed this email.
> 
> On Thu, Oct 6, 2011 at 9:54 AM, Carsten Dominik
> <address@hidden> wrote:
>> Hi Suvayu,
>> 
>> could you describe your use case for this addition?  When would you need
>> this above calling org-occur again and using the minibuffer
>> history to repeat your search?
>> 
> 
> My use case was to easily traverse through a sequence of sparse-tree
> searches. Something that I thought might be useful when searching in a
> large file. My implementation is probably very suboptimal. I was
> hoping to find a way to take a "snapshot" of a sparse tree view, and
> then "undo" or "redo" a sparse tree view. By undo/redo I mean
> restoring the visibility states of the trees and the highlighted
> search text. However I couldn't find a way to get the "snapshot", so I
> tried repeating the searches to achieve a similar result.

We do have support for storing and setting outline visibility:

Take a look at the functions

   org-outline-overlay-data
   org-set-outline-overlay-data

and at the macro 

   org-save-outline-visibility

which uses the two functions described above.

If the searches are always the same, you might want to define them
as custom agenda commands.

> I have had time to think since I submitted the patch, maybe its
> something very specific to how I use org and is probably more
> appropriate as a local modification and not for inclusion in org (at
> least not in its current form).

OK, I will mark it rejected, feel free to come back when you have
something convincing (not only for us, but also convincing for you!) :)

- Carsten

> 
>> - Carsten
> 
> Thanks a lot.
> 
> -- 
> Suvayu
> 
> Open source is the future. It sets us free.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]