Xebar Saram <zelt...@gmail.com> 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