From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Best way to implement project specific captures Date: Fri, 24 Aug 2012 14:25:59 +0200 Message-ID: <871uiw5ve0.fsf@altern.org> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:32975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4sxM-0008FW-LD for emacs-orgmode@gnu.org; Fri, 24 Aug 2012 08:25:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4sxL-0005jy-8s for emacs-orgmode@gnu.org; Fri, 24 Aug 2012 08:25:44 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:63475) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4sxL-0005jq-1c for emacs-orgmode@gnu.org; Fri, 24 Aug 2012 08:25:43 -0400 Received: by wgbdt14 with SMTP id dt14so301336wgb.30 for ; Fri, 24 Aug 2012 05:25:42 -0700 (PDT) In-Reply-To: (Richard Riley's message of "Thu, 23 Aug 2012 18:52:05 +0100") 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 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): (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, -- Bastien