From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Riley Subject: Re: Best way to implement project specific captures Date: Fri, 24 Aug 2012 20:38:21 +0100 Message-ID: References: <871uiw5ve0.fsf@altern.org> Reply-To: emacs-orgmode@gnu.org Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4ziM-0001eb-6K for emacs-orgmode@gnu.org; Fri, 24 Aug 2012 15:38:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4ziG-0000N0-0C for emacs-orgmode@gnu.org; Fri, 24 Aug 2012 15:38:42 -0400 Received: from plane.gmane.org ([80.91.229.3]:54393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4ziF-0000Mw-Pp for emacs-orgmode@gnu.org; Fri, 24 Aug 2012 15:38:35 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T4ziE-0008JJ-RX for emacs-orgmode@gnu.org; Fri, 24 Aug 2012 21:38:34 +0200 Received: from client-86-23-101-171.brhm.adsl.virginmedia.com ([86.23.101.171]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Aug 2012 21:38:34 +0200 Received: from rileyrg by client-86-23-101-171.brhm.adsl.virginmedia.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Aug 2012 21:38:34 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Bastien writes: > Richard Riley 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,