Bastien <b...@altern.org> writes: > Richard Riley <rile...@gmail.com> 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,