I never quite understood how to pass arguments to org-agenda without
using it interactively..
I want a simple thing, a command that shows the agenda with the TODO
entries from a given file

So supposing the buffer "projects.org" is open I tried this:

(defun my-org-agenda ()
  (interactive)
   (switch-to-buffer (get-buffer "projects.org"))
   (org-agenda :arg 'agenda :restriction '<))

which complains for
Wrong number of arguments: (lambda (&optional arg keys restriction)
"Dispatch agenda commands to collect entries to the agenda buffer.

Any suggestions?

Reply via email to