emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Adrian Bradd <adrian.bradd@gmail.com>
To: Adam Porter <adam@alphapapa.net>, emacs-orgmode@gnu.org
Subject: Re: org-agenda-skip-function does not find inherited tags
Date: Sun, 10 Sep 2017 20:10:52 -0400	[thread overview]
Message-ID: <CAMYmr8zMXTYpofaazQoa3siuHCpr4fnnJ4BGaGUScfbEOEEPww@mail.gmail.com> (raw)
In-Reply-To: <87o9qkbfgn.fsf@alphapapa.net>

[-- Attachment #1: Type: text/plain, Size: 544 bytes --]

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 <adam@alphapapa.net> wrote:

> I think the function org-get-tags-at should also be helpful here.
>
>
>

[-- Attachment #2: Type: text/html, Size: 1356 bytes --]

  reply	other threads:[~2017-09-11  0:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-04 15:06 org-agenda-skip-function does not find inherited tags Adrian Bradd
2017-09-06 16:27 ` Nicolas Goaziou
2017-09-09  5:36   ` Adam Porter
2017-09-11  0:10     ` Adrian Bradd [this message]
2017-09-11 19:35   ` Kaushal Modi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMYmr8zMXTYpofaazQoa3siuHCpr4fnnJ4BGaGUScfbEOEEPww@mail.gmail.com \
    --to=adrian.bradd@gmail.com \
    --cc=adam@alphapapa.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).