From mboxrd@z Thu Jan 1 00:00:00 1970 From: pmlists@free.fr (Peter =?utf-8?Q?M=C3=BCnster?=) Subject: Re: patch: accept lazy filter in org-agenda-to-appt Date: Sun, 23 Oct 2011 22:05:43 +0200 Message-ID: <87d3dnzd60.fsf@micropit.couberia.bzh> References: <87pqhna3wd.fsf@micropit.couberia.bzh> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:38950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RI4Iw-0006cr-J9 for emacs-orgmode@gnu.org; Sun, 23 Oct 2011 16:06:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RI4Iv-0005ox-6G for emacs-orgmode@gnu.org; Sun, 23 Oct 2011 16:05:58 -0400 Received: from lo.gmane.org ([80.91.229.12]:46229) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RI4Iv-0005op-0o for emacs-orgmode@gnu.org; Sun, 23 Oct 2011 16:05:57 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RI4Iu-0007jv-DM for emacs-orgmode@gnu.org; Sun, 23 Oct 2011 22:05:56 +0200 Received: from arennes-359-1-251-199.w2-2.abo.wanadoo.fr ([2.2.202.199]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 23 Oct 2011 22:05:56 +0200 Received: from pmlists by arennes-359-1-251-199.w2-2.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 23 Oct 2011 22:05:56 +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 Hello, The following patch replaces the previous one: --8<---------------cut here---------------start------------->8--- === modified file 'lisp/org/org-agenda.el' --- lisp/org/org-agenda.el 2011-09-02 16:38:40 +0000 +++ lisp/org/org-agenda.el 2011-10-23 20:03:11 +0000 @@ -8415,10 +8415,12 @@ (ok (or (null filter) (and (stringp filter) (string-match filter evt)) (and (listp filter) - (or (string-match - (cadr (assoc 'category filter)) cat) - (string-match - (cadr (assoc 'headline filter)) evt)))))) + (let ((cat-filter (cadr (assoc 'category filter))) + (evt-filter (cadr (assoc 'headline filter)))) + (or (and (stringp cat-filter) + (string-match cat-filter cat)) + (and (stringp evt-filter) + (string-match evt-filter evt)))))))) ;; FIXME: Shall we remove text-properties for the appt text? ;; (setq evt (set-text-properties 0 (length evt) nil evt)) (when (and ok tod) --8<---------------cut here---------------end--------------->8--- Sorry for the noise... -- Peter