[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Create links to agenda commands

From: Nathan Neff
Subject: [O] Create links to agenda commands
Date: Thu, 23 Aug 2012 21:46:19 -0500

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]