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): (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