From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eduardo Bellani Subject: Re: How to change the export semantics of the property-drawer? Date: Fri, 15 Sep 2017 16:49:44 -0300 Message-ID: <87wp4zyc6f.fsf@personal> References: <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]:37473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dswca-0001Wg-WF for emacs-orgmode@gnu.org; Fri, 15 Sep 2017 15:49:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dswcX-0005L0-RW for emacs-orgmode@gnu.org; Fri, 15 Sep 2017 15:49:53 -0400 Received: from mail-qt0-x229.google.com ([2607:f8b0:400d:c0d::229]:43551) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dswcX-0005Ku-N0 for emacs-orgmode@gnu.org; Fri, 15 Sep 2017 15:49:49 -0400 Received: by mail-qt0-x229.google.com with SMTP id i50so3137660qtf.0 for ; Fri, 15 Sep 2017 12:49:49 -0700 (PDT) In-reply-to: <87y3pfyhi5.fsf@personal> 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: Eduardo Bellani Cc: emacs-org list --=-=-= Content-Type: text/plain Sorry, I forgot about the subject tag. Eduardo Bellani writes: > 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 iEYEARECAAYFAlm8LtgACgkQSbLl0kCTjGkq0QCffjAtia2vUv8tOaXrZ0cUvJeN rWwAnAy3hx2yG5xv1gQQtp8OZcH+z3Nu =Waik -----END PGP SIGNATURE----- --=-=-=--