From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Neff Subject: Create links to agenda commands Date: Thu, 23 Aug 2012 21:46:19 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:54255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4juf-0004rd-2c for emacs-orgmode@gnu.org; Thu, 23 Aug 2012 22:46:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4jue-00088H-4r for emacs-orgmode@gnu.org; Thu, 23 Aug 2012 22:46:21 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:64200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4jue-00088B-03 for emacs-orgmode@gnu.org; Thu, 23 Aug 2012 22:46:20 -0400 Received: by iahk25 with SMTP id k25so2816023iah.0 for ; Thu, 23 Aug 2012 19:46:19 -0700 (PDT) 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 I just found out how to create links to execute custom agenda commands and wanted to share it with the list for those that didn't know about this feature. Basically, I have a bunch of custom agenda commands that I *want* to run periodically and it would be great to be able to create a link that I can click on, instead of remembering to press a sequence of characters (I'm just lazy that way). For example: * todo Check "waiting" tasks - Cilck Here to see Waiting Tasks --------------------------- Here's how I did it: First, here's an example of two custom views that I have defined for my agenda. (setq org-agenda-custom-commands (quote ( ("w" "Tasks waiting on something" todo "waiting" ((org-use-tag-inheritance nil))) ("p" "Projects" tags "project") ))) To run these views, I need to run org-agenda, then press "w" or "p", but I want to create a *Link* to run these commands that I can click on. So in some .org file, I have these links: * Links to these common agenda Views :project: - [[elisp:(org-agenda nil "w")][Show Waiting Tasks]] - [[elisp:(org-agenda nil "p")][Show Projects]] That's it! Just create the links like above, and then click on them and Emacs will ask you if you want to run the elisp, and when you say "Yes", then the appropriate custom agenda views will be shown. Try it out with a heading like this in one of your org-agenda-files * Project 1 :project: ** todo task 1 ** todo task 2 I think it's a really cool feature and wanted to show it to others who didn't know about it. --Nate