From mboxrd@z Thu Jan 1 00:00:00 1970 From: Memnon Anon Subject: Re: Exclude tag from custom agenda Date: Sun, 9 Dec 2012 15:59:48 +0000 (UTC) Message-ID: <871uezql9d.fsf@mean.albasani.net> References: <2012-12-07T18-18-52@devnull.Karl-Voit.at> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThjIW-0007Mw-Pl for emacs-orgmode@gnu.org; Sun, 09 Dec 2012 11:00:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ThjIT-0001YF-6q for emacs-orgmode@gnu.org; Sun, 09 Dec 2012 11:00:07 -0500 Received: from plane.gmane.org ([80.91.229.3]:49231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThjIT-0001SE-1B for emacs-orgmode@gnu.org; Sun, 09 Dec 2012 11:00:05 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ThjIa-0000ku-RX for emacs-orgmode@gnu.org; Sun, 09 Dec 2012 17:00:12 +0100 Received: from e178228019.adsl.alicedsl.de ([85.178.228.19]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 09 Dec 2012 17:00:12 +0100 Received: from gegendosenfleisch by e178228019.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 09 Dec 2012 17:00:12 +0100 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: emacs-orgmode@gnu.org Karl Voit writes: > What I want to achieve: on top, there should be my normal agenda > (events, tasks, habits, ...) but minus elements tagged with > "reward". [...] > I think, that «(agenda "" nil)» has to be modified but I don't know > how. I'm in a hurry, but lets see if I can give you something in 5 minutes. We need a skip-by-tag function. gmane should help here <> Mike McLean posted one in 2011, which still seems to work. Lets make that a little more general: #+begin_src emacs-lisp ;;; Based on http://article.gmane.org/gmane.emacs.orgmode/41427 (defun my-skip-tag(tag) "Skip entries that are tagged TAG" (let* ((entry-tags (org-get-tags-at (point)))) (if (member tag entry-tags) (progn (outline-next-heading) (point)) nil))) #+end_src Now, (agenda "" nil) should be: #+begin_src emacs-lisp (agenda "" ((org-agenda-skip-function '(my-skip-tag"reward")) (org-agenda-overriding-header "Agenda (without rewards: "))))) #+end_src That should do it. Please give it a try :) Memnon