From: Samuel Loury <konubinix@gmail.com>
To: Subhan Michael Tindall <SubhanT@familycareinc.org>,
"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: [help] need help with a skip function
Date: Fri, 26 Sep 2014 12:15:41 +0200 [thread overview]
Message-ID: <871tqyhelu.fsf@konixwork.incubateur.ens-lyon.fr> (raw)
In-Reply-To: <91956b93ee584104b2033b7a1f3afb3a@fcmailsvr2.familycareinc.org>
[-- Attachment #1: Type: text/plain, Size: 1395 bytes --]
Subhan Michael Tindall <SubhanT@familycareinc.org> writes:
> Hi, I'm looking for an example org-agenda-skip-function that I can use to include all items for an agenda (IE alltodo) that have a certain property set (value doesn't particularly matter)
> IE:
>>* TODO H1
>> :PROPERTIES:
>> :P1: date
>> :END:
>>* TODO H2
>> :PROPERTIES:
>> :END:
> So that H1 gets included, but H2 does not.
> I know, it's simple to do with a search-type agenda, but unfortunately a bug in sorting for inactive time stamps makes that route unsuitable for my purposes.
>
>
> Thanks!
> Subhan
I would do
--8<---------------cut here---------------start------------->8---
(defun my/skip-if-not-p1 ()
(not (org-entry-get (point) "P1")))
...
(setq org-agenda-custom-commands
'(
("p" "Todo entries with property p1"
(
(todo nil)
)
(
(org-agenda-skip-function 'my/skip-if-not-p1)
)
)
)
)
--8<---------------cut here---------------end--------------->8---
I have not tested it so beware the typo and reasoning errors but the
idea is there.
I think you could use org-element.el instead of the probably obsolete
`org-entry-get' but I don't know it well enough to propose a solution...
I hope it helps.
Best regards
--
Konubinix
GPG Key : 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A
[-- Attachment #2: Type: application/pgp-signature, Size: 472 bytes --]
prev parent reply other threads:[~2014-09-26 10:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-25 19:10 [help] need help with a skip function Subhan Michael Tindall
2014-09-26 10:15 ` Samuel Loury [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871tqyhelu.fsf@konixwork.incubateur.ens-lyon.fr \
--to=konubinix@gmail.com \
--cc=SubhanT@familycareinc.org \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.