From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Lawrence Subject: Re: A simple way to search only headlines Date: Fri, 07 Jun 2013 17:34:24 -0700 Message-ID: <87fvwte8z3.fsf@berkeley.edu> References: <87sj11a8yq.fsf@thinkpad.tsdh.de> <86y5arocrz.fsf@somewhere.org> <86k3mae2mo.fsf@somewhere.org> <87mwr1egjr.fsf@berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ul7Ep-0006qX-Tp for emacs-orgmode@gnu.org; Fri, 07 Jun 2013 20:42:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ul7Ep-0006RP-2p for emacs-orgmode@gnu.org; Fri, 07 Jun 2013 20:42:35 -0400 Received: from plane.gmane.org ([80.91.229.3]:38499) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ul7Eo-0006RK-Sl for emacs-orgmode@gnu.org; Fri, 07 Jun 2013 20:42:35 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ul7En-0000B5-QT for emacs-orgmode@gnu.org; Sat, 08 Jun 2013 02:42:33 +0200 Received: from c-50-161-39-52.hsd1.ca.comcast.net ([50.161.39.52]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Jun 2013 02:42:33 +0200 Received: from richard.lawrence by c-50-161-39-52.hsd1.ca.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 08 Jun 2013 02:42:33 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Xebar Saram 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