I'd like to add links to custom agenda commands within org files and other agenda views.

I think the answer would likely use org-add-link-type.

I also know that you can call a custom agenda view with the following code:

(org-agenda nil "p")

But I don't know how to combine the two, or if it is even possible.

Ideally, I would like be able to create a heading that launches a custom agenda. Something like the following:

* [[Code which I don't know][View current project tasks by assignment]]


1 Answer 1


You don't need to define a new link type: you can have elisp links that execute an arbitrary Lisp form - because the code is arbitrary, they can be dangerous so you get a question whether you are OK with following the link. See External Links in the manual. For example:

* [[elisp:(org-agenda nil "p")][View current project tasks by assignment]]

N.B. No space between the colon and the opening paren!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.