emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Pieter Praet <pieter@praet.org>
To: Marcus Klemm <marcus.klemm@googlemail.com>, emacs-orgmode@gnu.org
Subject: Re: How can I bypass the agenda dispatcher and call a custom block agenda directly?
Date: Sat, 27 Aug 2011 17:11:51 +0200	[thread overview]
Message-ID: <877h5yanyg.fsf@praet.org> (raw)
In-Reply-To: <loom.20110827T154257-396@post.gmane.org>

On Sat, 27 Aug 2011 13:45:26 +0000 (UTC), Marcus Klemm <marcus.klemm@googlemail.com> wrote:
> Bernt Hansen <bernt <at> norang.ca> writes:
> 
> 
> > Certainly this is doable
> > 
> > (org-agenda t "a")
> > 
> > Just bind this to the key of your choice and substitute "a" with the
> > agenda you want to run.
> 
> Doesn't work for me. I get:
> 
> recursive-edit: Wrong type argument: commandp, (org-agenda t "A")
> 
> 

That's because you need to wrap it in a lambda function.

This should work:

#+begin_src emacs-lisp
  (global-set-key (kbd "<f9> a") '(lambda ()
                                     (interactive)
                                     (org-agenda t "a")))
#+end_src


Peace

-- 
Pieter

  reply	other threads:[~2011-08-27 15:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-27 10:16 How can I bypass the agenda dispatcher and call a custom block agenda directly? Marcus Klemm
2011-08-27 13:23 ` Bernt Hansen
2011-08-27 13:45   ` Marcus Klemm
2011-08-27 15:11     ` Pieter Praet [this message]
2011-08-27 17:06       ` Marcus Klemm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877h5yanyg.fsf@praet.org \
    --to=pieter@praet.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=marcus.klemm@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).