On Sep 17, 2012, at 9:47 PM, Eric Abrahamsen <eric@ericabrahamsen.net> wrote:

On Fri, Sep 14 2012, Bastien wrote:

Hi Eric,

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

I've daydreamed about this before: what if, instead of agenda views, we
took a page from the Tinderbox method and made "agendas" simple
headlines, with some cookie saying "I'm an agenda", and a property
containing the search string. Instead of having an ephemeral *Org
Agenda* buffer, your "agenda views" are simply another in-file headline,
whose children are TODOs/headlines that match the query. Multiple and
persistent agendas are suddenly a matter of course.

What about this?

* [[elisp:(org-agenda nil "a")]]

But this is still just a link to an *Org Agenda* buffer. What I was
describing (and again, I'm not at all convinced this is a good idea) is
a headline in a regular org file that looks like this:

* [ag] Next Tasks
 :PROPERTIES:
 :AGENDA_QUERY: -WAITING-CANCELLED/!NEXT
 :END:

The [ag] cookie tells Org that this is an agenda headline. You hit "C-c
C-g" (or something) within this headline, and Org runs the query and
inserts the results as children of the headline. It's just a plain old
Org headline, and can be saved or exported as part of the file. The only
difference is that you can continue to update it (either manually or
with a hook), and that certain Org agenda keybindings are in effect
while point is in the headline (actually this part would probably be the
most difficult).

Anyhoo, just an idea.


This sounds somewhat similar to dynamic blocks, maybe something like that can help get you started?

http://orgmode.org/manual/Dynamic-blocks.html