From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ihor Radchenko Subject: Re: properties using other properties Date: Thu, 25 Jan 2018 08:19:08 +0800 Message-ID: <87o9lisscj.fsf@yantar92-laptop.i-did-not-set--mail-host-address--so-tickle-me> References: <86bmhlozre.fsf@snotbubble.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eeVH3-00026K-Oc for emacs-orgmode@gnu.org; Wed, 24 Jan 2018 19:20:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eeVGz-0004Y7-Nv for emacs-orgmode@gnu.org; Wed, 24 Jan 2018 19:20:13 -0500 Received: from mail-pf0-x230.google.com ([2607:f8b0:400e:c00::230]:42631) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eeVGz-0004XS-I1 for emacs-orgmode@gnu.org; Wed, 24 Jan 2018 19:20:09 -0500 Received: by mail-pf0-x230.google.com with SMTP id b25so4448177pfd.9 for ; Wed, 24 Jan 2018 16:20:09 -0800 (PST) In-Reply-To: <86bmhlozre.fsf@snotbubble.com> 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" To: cpb , emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I recommend looking into org-edna (http://www.nongnu.org/org-edna-el/#conditional_forms). You can try to use "has-property" in combination with "set-property" as a TRIGGER. Alternatively, you can customize org-property-changed-functions (see https://www.reddit.com/r/emacs/comments/7gr9ps/add_logbook_entry_and_note_o= n_orgmode_property/) and reimplement org-edna functionality for your purposes. Regards, Ihor cpb writes: > Is there a way to set properties using other properties? Doesn't matter > if its on export only, though it would be nice to have it in-situ. > > here's an example (obviously doesn't work), where a project properties > for the project client only needs the CLIENT property filled, the rest > of it automatically populates on export. Would save having to duplicate > the data where there are a lot of projects. > > > * client1 > :PROPERTIES: > :CUSTOM_ID: client1 > :NAME: a client > :ADDRESS: an address > :EMAIL: an email > :URL: a website > :END: > > * project1 > :PROPERTIES: > :CUSTOM_ID: project1 > :NAME: a project > :CLIENT: client1 > :CLIENT_NAME: {{{property(NAME,#{{{property(CLIENT)}}})}}} > :CLIENT_ADDRESS: {{{property(ADDRESS,#{{{property(CLIENT)}}})}}} > :CLIENT_EMAIL: {{{property(EMAIL,#{{{property(CLIENT)}}})}}} > :EXPORT_FILE_NAME: ./a_project > :END: > > project....: {{{property(NAME)}}} > for........: {{{property(CLIENT)}}} > {{{property(CLIENT_ADDRESS)}}} > {{{property(CLIENT_EMAIL)}}} > =2D-=20 Ihor Radchenko, PhD Student Singapore University of Technology and Design, 8 Somapah Road Singapore 487372 Email: yantar92@gmail.com, ihor_radchenko@mymail.sutd.edu.sg Tel: +6584017977 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEERZAHPFbUe3JemmzmZHB2Kn2hHYsFAlppInwACgkQZHB2Kn2h HYswPwf9G20pcalUMu2Cmft9qrK8t8EoyJGR8YbCo3MOKMffel9hlfK0dI+Yv4tk XgcSsb/fuvyodDBDT07b8tZpNog/bzDRlZ7Sd9G1wh9B8DXVKx+SueYNfuYQb7rr CIaoQUQgHjRDBfXyx+sdF+OUw6iDPBpQ2GXlvEh4ZQv4noJEibNrixz//1c+mpgr vdf1dj0gPPqNuo8RnK9wyd1NqXRiGxrm0Rpt4FTVCegiUVwS44aU0mxN+STJtcVZ ka9KTtyF8nBKdUowTXOvtOTsPj7+xlJ3i53cUlaPHfy4/FC1HUzMiAI4Q28dv4kk P+7jmFPbUcWuL7uKSnOsT68v/PgJ3A== =Q6xz -----END PGP SIGNATURE----- --=-=-=--