emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Agenda restrict to buffer
@ 2012-07-11 10:23 andrea crotti
  2012-07-12  8:15 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: andrea crotti @ 2012-07-11 10:23 UTC (permalink / raw)
  To: emacs-orgmode

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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-12 14:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-11 10:23 Agenda restrict to buffer andrea crotti
2012-07-12  8:15 ` Bastien
2012-07-12 14:14   ` andrea crotti
2012-07-12 14:46     ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).