From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: Setting a parametric org-agenda-skip-function? Date: Sun, 23 Jun 2013 16:19:01 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uql8F-0006i9-Eh for emacs-orgmode@gnu.org; Sun, 23 Jun 2013 10:19:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uql8D-0006u2-I1 for emacs-orgmode@gnu.org; Sun, 23 Jun 2013 10:19:07 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:33023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uql8D-0006s1-Bj for emacs-orgmode@gnu.org; Sun, 23 Jun 2013 10:19:05 -0400 In-reply-to: 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: Org Mode Hello, alan.schmitt@polytechnique.org writes: > Hello, > > I'm trying to have a custom agenda where I say I want to skip some > tags. I wrote a function that does what I want (it takes two arguments: > the list of tags to keep, and a boolean that says whether entries with > no tags should be kept). The function works well, but for some reason it > is not called. Here is how I try to call it: > > ("w" "Work Agenda" > ((agenda "" > ((org-agenda-skip-function > '(org-agenda-skip-entry-unless-tags > my-work-tags > t)))) > > I make org-agenda-skip-entry-unless-tags as debugged, and when I call > this agenda view, I don't go in the debugger, so I guess it is not > called. I'm still trying to investigate this, but I can't find out how to step in the debugger for this. I tried using a "skip everything" function, defined as: (defun as/skip-everything () (let ((next-headline (save-excursion (or (outline-next-heading) (point-max))))) next-headline)) ) and it is taken into account. However, I can't seem to debug this function (if I C-u C-M-x it, running the agenda generation command works, and everything is skipped, but I don't get into the debugger). This is quite strange because I can debug skipping functions for tags-todo blocks, but for some reason I cannot debug skipping functions for agenda blocks. Is there something special about how skipping functions work with agenda blocks? I'd appreciate any hint on how to try to debug this. Thanks, Alan