From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Loury Subject: Re: [help] need help with a skip function Date: Fri, 26 Sep 2014 12:15:41 +0200 Message-ID: <871tqyhelu.fsf@konixwork.incubateur.ens-lyon.fr> References: <91956b93ee584104b2033b7a1f3afb3a@fcmailsvr2.familycareinc.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXSZQ-0004Bp-Sr for emacs-orgmode@gnu.org; Fri, 26 Sep 2014 06:16:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXSZ8-00037l-Er for emacs-orgmode@gnu.org; Fri, 26 Sep 2014 06:16:12 -0400 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:39811) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXSZ7-00034E-Se for emacs-orgmode@gnu.org; Fri, 26 Sep 2014 06:15:54 -0400 Received: by mail-wi0-f173.google.com with SMTP id r20so10577900wiv.0 for ; Fri, 26 Sep 2014 03:15:47 -0700 (PDT) In-Reply-To: <91956b93ee584104b2033b7a1f3afb3a@fcmailsvr2.familycareinc.org> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Subhan Michael Tindall , "emacs-orgmode@gnu.org" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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 =2D-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) ) ) ) ) =2D-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 =2D-=20 Konubinix GPG Key : 7439106A Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUJTzOAAoJEHXSPO10ORBqUjgH/AlHW/+P78Htk+vn1snK7I9l 8xDId/zrqi1AQNRV+aA87YMyjtKU3sCs0HweqQvY5y26HAfFp3ahSzKqBgFFvntX io0r8yf0Hbc5Pj+aMX8FWcQwSde1mcpodE/LA2c4oEDmHDP/fLpcRPCp5/PAid+Y jjS+wrgxtgNLP0uc/jUiasZNxtc2ffbezEqk+HpmX1hrTjxftOY0bQa8oFfIsr0j /m8m8PQ7xYuR267eDMLX7LmgwbpP+QRWnQq1AOrygHjryrd+oj2ZOvYM6pARhq4b ho3JHDGUd7KYO8LSHB7AR3tpBqij6+srLlKgbvjBrmL/UO5kS+fPU8iDOGapX+8= =J9Bh -----END PGP SIGNATURE----- --=-=-=--