I keep a lot of headlines tagged "question" that I want to review before a daily meeting. Currently I keep questions tagged with "question", and can easily do an agenda search for them. No problem. Before a daily meeting, I create a daily meeting headline like this: * Daily Mtg 05/11/2011 Then, I do an agenda search for questions. What I'm looking for is a way to query for headlines tagged "question", and bring the results of that query into the Daily Mtg 05/11/2011 headline -- preferably with links to the questions to easily jump to them. This way, I have a record that I asked certain questions, and I can easily stay within my Daily Mtg headine, and not jump to / from agenda and back to the daily mtg headline, which tends to break my concentration. Essentially, it would be a clock report, with links, except it would not need to filter by any time/clocking information. <Edit> I just found that I can copy the results of the agenda into my headline, and simply surround the headings with [[ and ]], which turns them into links. This will work for the time being. I suspect that another answer is a dynamic block. Anyone else doing something similar? Thanks, --Nate
Nathan Neff <nathan.neff@gmail.com> writes:
> I keep a lot of headlines tagged "question" that I
> want to review before a daily meeting.
>
> Currently I keep questions tagged with "question", and can
> easily do an agenda search for them. No problem.
>
> Before a daily meeting, I create a daily meeting headline
> like this:
>
> * Daily Mtg 05/11/2011
>
> Then, I do an agenda search for questions.
>
> What I'm looking for is a way to query for
> headlines tagged "question", and bring the results of that query into
> the Daily Mtg 05/11/2011 headline -- preferably with
> links to the questions to easily jump to them.
>
> This way, I have a record that I asked certain questions,
> and I can easily stay within my Daily Mtg headine, and not jump
> to / from agenda and back to the daily mtg headline, which tends
> to break my concentration.
>
> Essentially, it would be a clock report, with links, except
> it would not need to filter by any time/clocking information.
>
> <Edit> I just found that I can copy the results of the agenda
> into my headline, and simply surround the headings with [[ and ]], which
> turns them into links. This will work for the time being.
>
> I suspect that another answer is a dynamic block. Anyone
> else doing something similar?
Here's one implementation:
--8<---------------cut here---------------start------------->8---
(defun org-dblock-write:insert-links (params)
"Dblock function to insert links to headlines that match
tags/properties search string specified by :match."
(let ((match (plist-get params :match))
links)
(unless match
(error "Must specify :match parameter"))
(org-map-entries
(lambda ()
(let ((heading (nth 4 (org-heading-components))))
(add-to-list 'links
(format "- [[file:%s::*%s][%s]]\n"
(abbreviate-file-name
(buffer-file-name))
heading heading))))
match 'agenda)
(apply #'insert links)))
--8<---------------cut here---------------end--------------->8---
You could then create a dblock by typing C-c C-c on the following
#+begin: insert-links :match questions
#+end:
This would still need to be refined, as there are problems when a
headline contains a link, but it's meant to provide a quick proof of
concept.
Best,
Matt
Matt Lundin <mdl@imapmail.org> writes:
> You could then create a dblock by typing C-c C-c on the following
>
> #+begin: insert-links :match questions
> #+end:
Correction: this should be:
--8<---------------cut here---------------start------------->8---
#+begin: insert-links :match "questions"
#+end:
--8<---------------cut here---------------end--------------->8---
Best,
Matt
Thanks Matt!
If it's not too much trouble for you, may I ask how I would filter
out DONE, etc questions?
On Mon, May 16, 2011 at 12:08 PM, Matt Lundin <mdl@imapmail.org> wrote:
> Matt Lundin <mdl@imapmail.org> writes:
>
>> You could then create a dblock by typing C-c C-c on the following
>>
>> #+begin: insert-links :match questions
>> #+end:
>
> Correction: this should be:
>
> --8<---------------cut here---------------start------------->8---
> #+begin: insert-links :match "questions"
> #+end:
> --8<---------------cut here---------------end--------------->8---
>
> Best,
> Matt
>
Nathan Neff <nathan.neff@gmail.com> writes: > Thanks Matt! > > If it's not too much trouble for you, may I ask how I would filter > out DONE, etc questions? > Sure, no problem at all! #+begin: insert-links :match "questions/-DONE" Or, if you want to filter out all inactive todos: #+begin: insert-links :match "questions/!" Best, Matt > On Mon, May 16, 2011 at 12:08 PM, Matt Lundin <mdl@imapmail.org> wrote: >> Matt Lundin <mdl@imapmail.org> writes: >> >>> You could then create a dblock by typing C-c C-c on the following >>> >>> #+begin: insert-links :match questions >>> #+end: >> >> Correction: this should be: >> >> --8<---------------cut here---------------start------------->8--- >> #+begin: insert-links :match "questions" >> #+end: >> --8<---------------cut here---------------end--------------->8--- >> >> Best, >> Matt >>
On Wed, May 18, 2011 at 12:37 PM, Matt Lundin <mdl@imapmail.org> wrote: > Nathan Neff <nathan.neff@gmail.com> writes: > >> Thanks Matt! >> >> If it's not too much trouble for you, may I ask how I would filter >> out DONE, etc questions? >> > > Sure, no problem at all! > > #+begin: insert-links :match "questions/-DONE" > > Or, if you want to filter out all inactive todos: > > #+begin: insert-links :match "questions/!" This is cool. Thanks! --Nate > > Best, > Matt > >> On Mon, May 16, 2011 at 12:08 PM, Matt Lundin <mdl@imapmail.org> wrote: >>> Matt Lundin <mdl@imapmail.org> writes: >>> >>>> You could then create a dblock by typing C-c C-c on the following >>>> >>>> #+begin: insert-links :match questions >>>> #+end: >>> >>> Correction: this should be: >>> >>> --8<---------------cut here---------------start------------->8--- >>> #+begin: insert-links :match "questions" >>> #+end: >>> --8<---------------cut here---------------end--------------->8--- >>> >>> Best, >>> Matt >>> >