emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] patch: accept lazy filter in org-agenda-to-appt


From: Peter Münster
Subject: Re: [O] patch: accept lazy filter in org-agenda-to-appt
Date: Sun, 23 Oct 2011 22:05:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]