[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Guide to writing custom skip functions for agenda views using or
From: |
Sebastien Vauban |
Subject: |
Re: [O] Guide to writing custom skip functions for agenda views using org-agenda-skip-function |
Date: |
Wed, 25 Jun 2014 10:42:43 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (windows-nt) |
Arunabha Ghosh wrote:
> Is there a guide on writing functions for implementing custom skip
> criteria for agenda items using org-agenda-skip-function ? I understand the
> basic premise behind org-agenda-skip-function but examples from other
> people's configs don't make much sense.
Here some working examples extracted from my config:
--8<---------------cut here---------------start------------->8---
...
(org-agenda-skip-function
'(org-agenda-skip-entry-if 'notdeadline))
--8<---------------cut here---------------end--------------->8---
and
--8<---------------cut here---------------start------------->8---
...
(org-agenda-skip-function
'(org-agenda-skip-entry-when-regexp-matches))
(org-agenda-skip-regexp "\\[#A\\]")))
--8<---------------cut here---------------end--------------->8---
A more complex one:
--8<---------------cut here---------------start------------->8---
(add-to-list 'org-agenda-custom-commands
`("r" "All active tasks, by due date"
((agenda ""
((org-agenda-overriding-header "Today")
;; !FIXME! We don't see "timed" DEADLINE
(org-agenda-skip-function
(lambda ()
(let* ((dl (org-entry-get nil "DEADLINE")))
(if (or (not dl)
(equal dl "")
(org-time> dl (org-time-today)))
(progn (outline-next-heading) (point))))))
(org-agenda-skip-scheduled-if-deadline-is-shown t)
(org-agenda-span 'day)
(org-deadline-warning-days 0))))))
--8<---------------cut here---------------end--------------->8---
Best regards,
Seb
--
Sebastien Vauban