From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrian Bradd Subject: Re: org-agenda-skip-function does not find inherited tags Date: Sun, 10 Sep 2017 20:10:52 -0400 Message-ID: References: <87bmmnaj38.fsf@nicolasgoaziou.fr> <87o9qkbfgn.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c1b4a7c7fb9860558dec241" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drCJU-0001DE-64 for emacs-orgmode@gnu.org; Sun, 10 Sep 2017 20:10:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drCJT-0001Kw-9Y for emacs-orgmode@gnu.org; Sun, 10 Sep 2017 20:10:56 -0400 Received: from mail-pf0-x230.google.com ([2607:f8b0:400e:c00::230]:36341) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1drCJT-0001KW-2u for emacs-orgmode@gnu.org; Sun, 10 Sep 2017 20:10:55 -0400 Received: by mail-pf0-x230.google.com with SMTP id e199so11602533pfh.3 for ; Sun, 10 Sep 2017 17:10:53 -0700 (PDT) In-Reply-To: <87o9qkbfgn.fsf@alphapapa.net> 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" To: Adam Porter , emacs-orgmode@gnu.org --94eb2c1b4a7c7fb9860558dec241 Content-Type: text/plain; charset="UTF-8" Thanks for the pointers. This is what I came up with: (defun abradd-agenda-tags-inherited (tags) (let (beg end m) (org-back-to-heading t) (setq beg (point) end (progn (outline-next-heading) (1- (point)))) (goto-char beg) (and (not (member tags (org-get-tags-at))) end))) I copied mostly from org-agenda-skip-if. It isn't very versatile, but works for now. On 9 September 2017 at 01:36, Adam Porter wrote: > I think the function org-get-tags-at should also be helpful here. > > > --94eb2c1b4a7c7fb9860558dec241 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Tha= nks for the pointers. This is what I came up with:

(defun abradd-agenda= -tags-inherited (tags)
=C2=A0 (let (beg e= nd m)
=C2=A0 =C2=A0 (org-back-to-heading = t)
=C2=A0 =C2=A0 (setq beg (point)
<= div class=3D"gmail_default">=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 end (progn (= outline-next-heading) (1- (point))))
=C2= =A0 =C2=A0 (goto-char beg)
=C2=A0 =C2=A0 = (and
=C2=A0 =C2=A0 =C2=A0 (not (member ta= gs (org-get-tags-at)))
=C2=A0 =C2=A0 =C2= =A0 end)))

I copied mostly from org-agenda-skip-if= . It isn't very versatile, but works for now.

On 9 September 2017 at 01= :36, Adam Porter <adam@alphapapa.net> wrote:
I think the function org-get-tags-at should also be hel= pful here.



--94eb2c1b4a7c7fb9860558dec241--