emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] A simple way to search only headlines


From: Richard Lawrence
Subject: Re: [O] A simple way to search only headlines
Date: Fri, 07 Jun 2013 17:34:24 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Xebar Saram <address@hidden> writes:

> Hi Richard
>
> Fantastic, thx alot for the code snippet and detailed explanation, it
> really helps to understand what goes on. unfortunately i get an error:
>
> Wrong type argument: commandp, (lambda nil (org-agenda nil "s" "<"))

Ah, sorry about that, should have tested my code before I sent it!

The problem is that you have to give a /command/ to define-key (i.e., a
function with a call to `interactive' in its definition).

This should do it:

(define-key org-mode-map (kbd "C-M-h") (lambda () (interactive) (org-agenda nil 
"s" "<")))

Best,
Richard




reply via email to

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