From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: Question about searches (ultimately for agenda) Date: Thu, 17 Dec 2009 20:26:48 +0100 Message-ID: <49C210B9-FBF3-4B6F-B86A-223A326B25DC@gmail.com> References: <22ED17FE-4FB4-4E3E-943A-7B6B6FF92AAF@gmail.com> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLPQc-0001a7-OZ for emacs-orgmode@gnu.org; Thu, 17 Dec 2009 18:06:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLPQY-0001XS-2b for emacs-orgmode@gnu.org; Thu, 17 Dec 2009 18:06:38 -0500 Received: from [199.232.76.173] (port=33706 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLPQX-0001XM-NL for emacs-orgmode@gnu.org; Thu, 17 Dec 2009 18:06:33 -0500 Received: from ey-out-1920.google.com ([74.125.78.147]:47925) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLPQW-0000ut-Q9 for emacs-orgmode@gnu.org; Thu, 17 Dec 2009 18:06:33 -0500 Received: by ey-out-1920.google.com with SMTP id 4so667627eyg.34 for ; Thu, 17 Dec 2009 15:06:31 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Mueen Nawaz Cc: emacs-orgmode@gnu.org On Dec 17, 2009, at 5:53 AM, Mueen Nawaz wrote: > On 12/16/09 03:37, Carsten Dominik wrote: >> This is what skip conditions are for. Here is an entry for >> org-agenda-custom-commands which does this for the specific >> "Jack" example: >> >> ("X" "Tags match ignoring done stuff" tags "Jack" >> ((org-agenda-skip-function >> '(and >> (org-entry-is-done-p) >> (outline-next-heading) >> (point))))) > > Almost. It worked if I exclude (outline-next-heading). Was there a > reason you had that? Yes, so that the search only continues after that entry. But yes, you are right, this can fail for the final entry in a file. Try '(when (org-entry-is-done) (outline-next-heading) (point)) > > Also, I'm pretty weak with Emacs Lisp. What does (point) do? > Google's no help (obviously). Point returns the buffer position of he cursor, in this case the position where the next entry starts. HTH - Carsten