all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [help] need help with a skip function
@ 2014-09-25 19:10 Subhan Michael Tindall
  2014-09-26 10:15 ` Samuel Loury
  0 siblings, 1 reply; 2+ messages in thread
From: Subhan Michael Tindall @ 2014-09-25 19:10 UTC (permalink / raw
  To: emacs-orgmode@gnu.org


[-- Attachment #1.1: Type: text/plain, Size: 1366 bytes --]

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




Subhan Michael Tindall
Program Analyst - FamilyCare Health Plans
825 NE Multnomah St, Suite 1400; Portland OR 97232
Direct: 503-471-3127
Fax:      503-471-3177
Email:  subhant@familycareinc.org<mailto:subhant@familycareinc.org>
[Email-Signature-Logos June 20143]


This message is intended for the sole use of the individual and entity to which it is addressed and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message.  Thank you.

[-- Attachment #1.2: Type: text/html, Size: 17442 bytes --]

[-- Attachment #2: image001.jpg --]
[-- Type: image/jpeg, Size: 30469 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [help] need help with a skip function
  2014-09-25 19:10 [help] need help with a skip function Subhan Michael Tindall
@ 2014-09-26 10:15 ` Samuel Loury
  0 siblings, 0 replies; 2+ messages in thread
From: Samuel Loury @ 2014-09-26 10:15 UTC (permalink / raw
  To: Subhan Michael Tindall, emacs-orgmode@gnu.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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-26 10:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-25 19:10 [help] need help with a skip function Subhan Michael Tindall
2014-09-26 10:15 ` Samuel Loury

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.