Re: [O] [help] need help with a skip function

2014-09-26 Thread Samuel Loury
Subhan Michael Tindall  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


pgpyux0YJXMb7.pgp
Description: PGP signature


[O] [help] need help with a skip function

2014-09-25 Thread Subhan Michael Tindall
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:  subh...@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.