From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Inline tasks in agenda search Date: Fri, 05 Aug 2011 12:00:38 +0200 Message-ID: <874o1wgou1.fsf@gmail.com> References: <87ei10grxk.fsf@gmail.com> <20110805112923.384e34e5@kuru.homelinux.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:46418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QpHDE-000374-8h for emacs-orgmode@gnu.org; Fri, 05 Aug 2011 06:01:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QpHDD-0007gI-AJ for emacs-orgmode@gnu.org; Fri, 05 Aug 2011 06:01:04 -0400 Received: from mail-ww0-f41.google.com ([74.125.82.41]:54668) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QpHDD-0007gA-31 for emacs-orgmode@gnu.org; Fri, 05 Aug 2011 06:01:03 -0400 Received: by wwj26 with SMTP id 26so287044wwj.0 for ; Fri, 05 Aug 2011 03:01:02 -0700 (PDT) In-Reply-To: <20110805112923.384e34e5@kuru.homelinux.net> (Suvayu Ali's message of "Fri, 5 Aug 2011 11:29:23 +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: Suvayu Ali Cc: org-mode mailing list Suvayu Ali writes: > I tried this: > > (setq org-agenda-skip-function '(and (featurep 'org-inlinetask) > (let ((case-fold-search t)) > (org-looking-at-p (concat (org-inlinetask-outline-regexp) "end[ \t]*$"))))) > > > But performing a search where an END entry would otherwise show up > causes the following error. A search without END in the result > completes cleanly though. It's because I only gave you a part of the required function. Also, if you look at the doc-string, you'll see that: 1. it should return the position to continue the search from; 2. you should set `org-agenda-skip-function-global' instead. So, you can try: #+begin_src org (setq org-agenda-skip-function-global (lambda () (when (and (featurep 'org-inlinetask) (let ((case-fold-search t)) (org-looking-at-p (concat (org-inlinetask-outline-regexp) "end[ \t]*$")))) (or (save-excursion (outline-next-heading)) (point-max))))) #+end_src Regards, -- Nicolas Goaziou