From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastien Vauban Subject: Re: Guide to writing custom skip functions for agenda views using org-agenda-skip-function Date: Wed, 25 Jun 2014 10:42:43 +0200 Message-ID: <86ha39bcsc.fsf@somewhere.org> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org 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