From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eduardo Bellani Subject: How to change the export semantics of the property-drawer? Date: Fri, 15 Sep 2017 14:54:42 -0300 Message-ID: <87y3pfyhi5.fsf@personal> 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]:36029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsupH-0002Gq-LW for emacs-orgmode@gnu.org; Fri, 15 Sep 2017 13:54:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsupE-0006DX-Hx for emacs-orgmode@gnu.org; Fri, 15 Sep 2017 13:54:51 -0400 Received: from mail-qt0-x231.google.com ([2607:f8b0:400d:c0d::231]:46389) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dsupE-0006D1-Ct for emacs-orgmode@gnu.org; Fri, 15 Sep 2017 13:54:48 -0400 Received: by mail-qt0-x231.google.com with SMTP id s18so2857329qta.3 for ; Fri, 15 Sep 2017 10:54:46 -0700 (PDT) Received: from personal ([191.35.228.186]) by smtp.gmail.com with ESMTPSA id n29sm929765qta.61.2017.09.15.10.54.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Sep 2017 10:54:45 -0700 (PDT) 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: emacs-org list --=-=-= Content-Type: text/plain Hello list. I am trying to export the property-drawer as a description list on an html derived backend, but I'm afraid I got stuck after some effort in it. Basically, I wanted this: ,---- | * Some | :PROPERTIES: | :CUSTOM_ID: 123 | :END: `---- To be exported *as if* it was this ,---- | * Some | - custom_id :: 123 `---- The problem I am facing is, how to resolve links in properties? The example below illustrates the maximum point I've reached in my efforts If someone can point me to a path, I'll be happy to follow it. Thanks. ,---- | #+options: prop:t | | * some | :PROPERTIES: | :CUSTOM_ID: qwe123 | :END: | | * another | :PROPERTIES: | :link: [[#qwe123]] | :END: | | | | #+BEGIN_SRC emacs-lisp | (defun fee-html-property-drawer (property-drawer contents info) | "Transcode a property-drawer into a descriptive list." | (let* ((drawer-properties | (with-temp-buffer | (org-mode) | (insert (format "* H\n%s" (org-element-interpret-data property-drawer))) | (goto-char (point-min)) | (org-element--get-node-properties))) | (dlist)) | (--> drawer-properties | (ht<-plist it) | (ht-map (-lambda (key value) | (format "- %s :: %s" | (string-trim (symbol-name key) ":") value)) | it) | (string-join it "\n") | (org-export-string-as it | 'html | t | info)))) | | (org-export-define-derived-backend 'fee-html 'html | :translate-alist '((property-drawer . fee-html-property-drawer))) | #+END_SRC | `---- --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlm8E+IACgkQSbLl0kCTjGmiqACcCLFeqTEq2O3yQOgHqZFIxTdk p1EAnjHheDuKij5n7imbKXbr2/9i6vYA =dyII -----END PGP SIGNATURE----- --=-=-=--