From mboxrd@z Thu Jan 1 00:00:00 1970 From: Seong-Kook Shin Subject: accessing ATTR_HTML and CAPTION from custom Date: Fri, 9 Mar 2018 19:53:49 -0800 Message-ID: <5095d0b6-787e-1ac0-fd71-2c1e73454d22@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56247) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1euVZz-0006kr-Lu for emacs-orgmode@gnu.org; Fri, 09 Mar 2018 22:53:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1euVZy-0006KV-R8 for emacs-orgmode@gnu.org; Fri, 09 Mar 2018 22:53:55 -0500 Received: from mail-io0-x233.google.com ([2607:f8b0:4001:c06::233]:40663) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1euVZy-0006K3-LP for emacs-orgmode@gnu.org; Fri, 09 Mar 2018 22:53:54 -0500 Received: by mail-io0-x233.google.com with SMTP id v6so5702407iog.7 for ; Fri, 09 Mar 2018 19:53:52 -0800 (PST) Received: from ?IPv6:2602:306:32b2:d7f0:9085:36a:b6b2:260a? ([2602:306:32b2:d7f0:9085:36a:b6b2:260a]) by smtp.gmail.com with ESMTPSA id i31sm1799972iod.78.2018.03.09.19.53.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Mar 2018 19:53:51 -0800 (PST) Content-Language: en-US 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-orgmode@gnu.org Hello, I'm using Nikola (https://getnikola.com/) with its orgmode plugin to write blog posts. Their script contains following custom link for HTML export: (defun org-custom-link-img-url-export (path desc format) (cond ((eq format 'html) (format "\"%s\"/" path desc)))) (org-add-link-type "img-url" nil 'org-custom-link-img-url-export) And I have org-mode contents like this: #+CAPTION: some caption for the image #+ATTR_HTML: width="60%" [[img-url:/img/a.jpg]] I found that somehow DESC parameter passed to above org-custom-link-img-url-export function contains all information regarding CAPTION and ATTR_HTML but unable to retrieve it properly. Is there any org utility functions to retrieve them? For example, I want to access 'width' parameter from ATTR_HTML like this: (defun org-custom-link-img-url-export (path desc format) (cond ((eq format 'html) (let ((width (SOME-FUNCTION desc :width))) (if (null width) (format "" ... width) (format "" ...)))))) Could you help me how to do that? Thank you.