emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: pmlists@free.fr (Peter Münster)
To: emacs-orgmode@gnu.org
Subject: patch: accept lazy filter in org-agenda-to-appt
Date: Sun, 23 Oct 2011 21:45:06 +0200	[thread overview]
Message-ID: <87pqhna3wd.fsf@micropit.couberia.bzh> (raw)

Hello,

I use `org-agenda-to-appt' this way:
--8<---------------cut here---------------start------------->8---
(org-agenda-to-appt t '((headline "TODO")))
--8<---------------cut here---------------end--------------->8---

But this works only with the following patch:

--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 19:43:51 +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 (or (eq cat-filter nil)
+                                     (string-match cat-filter cat))
+                                 (or (eq evt-filter nil)
+                                     (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---

-- 
           Peter

             reply	other threads:[~2011-10-23 19:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-23 19:45 Peter Münster [this message]
2011-10-23 20:05 ` patch: accept lazy filter in org-agenda-to-appt Peter Münster
2011-10-24  5:51   ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pqhna3wd.fsf@micropit.couberia.bzh \
    --to=pmlists@free.fr \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).