Re: [O] "org-link-set-parameters" get parent properties

2019-01-31 Thread John Kitchin
One way is through a filter. In the filter function you get an info
argument that contains the information you want. I hacked this together and
it does add a tooltip to the link, but it is not elegant or obvious, and it
does not do any checking for the type of link, whether an attr exists, etc.

The gist is that it looks like you can get the parent from the parse-tree
info, and get the attr_html info from that (which is a list of strings).
Then you have to modify the "data" in the filter function which is the
html. It is easy here to just replace the http://kitchingroup.cheme.cmu.edu



On Thu, Jan 31, 2019 at 5:36 AM Tarjei Bærland 
wrote:

> Hi!
>
> I have a custom function for exporting image links in org-mode (I have my
> html exported to the parent folder of my .org files, and I just want to
> keep one copy of the image files).
>
> How can I get the "attr_html" of the link for a custom
> org-set-link-parameters function? As far as I can tell, the :export wants a
> function taking (path desc backend), and I do not know how to extract the
> parent of the link from this.
>
> Thanks in advance!
>
> Regards,
> Tarjei
>


[O] "org-link-set-parameters" get parent properties

2019-01-31 Thread Tarjei Bærland
Hi!

I have a custom function for exporting image links in org-mode (I have my
html exported to the parent folder of my .org files, and I just want to
keep one copy of the image files).

How can I get the "attr_html" of the link for a custom
org-set-link-parameters function? As far as I can tell, the :export wants a
function taking (path desc backend), and I do not know how to extract the
parent of the link from this.

Thanks in advance!

Regards,
Tarjei