emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Best way to implement project specific captures


From: Richard Riley
Subject: Re: [O] Best way to implement project specific captures
Date: Fri, 24 Aug 2012 20:38:21 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (gnu/linux)

Bastien <address@hidden> writes:

> Richard Riley <address@hidden> writes:
>
>> I see Bastien and Carsten are in on the thread too, I'll step back and
>> see in what direction this now goes ;) Thanks again for the great
>> feature!
>
> This is how it works right now.
>
> For each agenda custom command or capture template, you can define 
> a context where it will be accessible.
>
> E.g. you have these custom commands:
>
> (setq org-agenda-custom-commands
>       '(("A" "AAAA" ...)
>       ("B" "BBBB" ...)))
>
> But you don't need "B" in .txt files:
>
> (setq org-agenda-custom-commands-contexts
>       '(("B" ((not-in-file . "\.txt")))))
>
> That's it.
>
> Or maybe you want "B" to be accessible with the "A" key (and 
> don't want the "A" key):

Im not sure I follow that.

>
> (setq org-agenda-custom-commands-contexts
>       '(("A" "B" ((not-in-file . "\.txt")))))
>
> Or maybe you want "B" to be accessible only in your first two
> hours of using Emacs...
>
> (defun less-than-nhours-of-emacs-uptime (&optional n)
>  (interactive "P")
>  (let ((n (or n 2)))
>    (< (time-to-seconds (time-subtract (current-time) before-init-time))
>       (* n 3600))))
>
> (setq org-agenda-custom-commands-contexts
>       '(("B" (less-then-nhours-of-emacs-uptime))))
>
> Enjoy,

Hi, my head isnt really in org "mode" (oops!) at the moment, how would I
then implement the template for "files under this directory" as
originally mentioned? ALso it would be really really nice if it would
use the existing org file if that file is on the agenda list and I dont
specify a path component on the destination file variable in the
template.

THanks!

r,





reply via email to

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