emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Conditional capture template headline based on tag?
@ 2012-08-29 15:25 John Hendy
  2012-09-14  6:01 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: John Hendy @ 2012-08-29 15:25 UTC (permalink / raw)
  To: emacs-orgmode

My main org file for work is something like so:

#+begin_src org
* Tasks
General tasks here

* Proj 1     :proj1:
** Tasks
** Notes

* Proj 2     :proj2:
** Tasks
** Notes

etc.
#+end_src

Just wondering if a capture template could be setup to file into the
"Tasks" headline (sub-headline) of the matching top level headline
with that tag or something similar?

I suppose I can refile and enter the headline location manually, but
that requires extra work. I thought if I was already entering a tag
for a capture item, perhaps there's some fu that could be used to send
it accordingly. If this isn't possible, what if I re-split my projects
into separate files with a #+filetag. Could it be used to send it to
the right file?

If there are those who do something like this in a different way, I'm
open to suggestions!


Thanks,
John

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

* Re: Conditional capture template headline based on tag?
  2012-08-29 15:25 Conditional capture template headline based on tag? John Hendy
@ 2012-09-14  6:01 ` Bastien
  2012-10-02  4:24   ` John Hendy
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien @ 2012-09-14  6:01 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode

Hi John,

John Hendy <jw.hendy@gmail.com> writes:

> Just wondering if a capture template could be setup to file into the
> "Tasks" headline (sub-headline) of the matching top level headline
> with that tag or something similar?

You could use a function in the capture template for this.

See the info node "Template elements".

-- 
 Bastien

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

* Re: Conditional capture template headline based on tag?
  2012-09-14  6:01 ` Bastien
@ 2012-10-02  4:24   ` John Hendy
  2012-10-02 14:16     ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: John Hendy @ 2012-10-02  4:24 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

On Fri, Sep 14, 2012 at 1:01 AM, Bastien <bzg@altern.org> wrote:
> Hi John,
>
> John Hendy <jw.hendy@gmail.com> writes:
>
>> Just wondering if a capture template could be setup to file into the
>> "Tasks" headline (sub-headline) of the matching top level headline
>> with that tag or something similar?
>
> You could use a function in the capture template for this.

As in the expansion elements or defining a custom function for the
=target= element?

Thanks for the suggestion,
John

>
> See the info node "Template elements".
>
> --
>  Bastien

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

* Re: Conditional capture template headline based on tag?
  2012-10-02  4:24   ` John Hendy
@ 2012-10-02 14:16     ` Bastien
  0 siblings, 0 replies; 4+ messages in thread
From: Bastien @ 2012-10-02 14:16 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode

Hi John,

John Hendy <jw.hendy@gmail.com> writes:

> As in the expansion elements or defining a custom function for the
> =target= element?

I'm thinking of this part of org-capture-templates's docstring:

      (function function-finding-location)
         Most general way, write your own function to find both
         file and location

HTH,

-- 
 Bastien

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

end of thread, other threads:[~2012-10-02 14:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-29 15:25 Conditional capture template headline based on tag? John Hendy
2012-09-14  6:01 ` Bastien
2012-10-02  4:24   ` John Hendy
2012-10-02 14:16     ` Bastien

Code repositories for project(s) associated with this 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).