emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: attachment: link type export to HTML invalid attach dir


From: Gustav Wikström
Subject: RE: attachment: link type export to HTML invalid attach dir
Date: Thu, 27 Feb 2020 19:02:39 +0000

Hello,

> -----Original Message-----
> From: Nicolas Goaziou <address@hidden>
> Sent: den 26 februari 2020 16:23
> To: Gustav Wikström <address@hidden>
> Cc: Bastien <address@hidden>; address@hidden
> Subject: Re: attachment: link type export to HTML invalid attach dir
> 
> Hello,
> 
> Gustav Wikström <address@hidden> writes:
> 
> > Expanding attachment-links in the buffer makes the link type no longer
> > be attachment.
> 
> What makes you think that? The link type is preserved during the
> substitution, according to the (concat "attachment" ...).

What I meant is that the content of the link, even though mentioned to be 
"attachment" cannot be reasoned about and worked with in the same way as an 
unexpanded attachment link. Thus, it's not the same type of link any longer. 
It's effectively a "file" link when expanded. But this discussion doesn't carry 
much meaning any longer I suppose, given the agreement to apply the patch.

> > I would prefer if we explicitly set the link type to
> > files here instead. Storing intermediate state in an attachment link
> > types makes less sense imo.
> >
> > One issue with the current way it's done is that images are treated
> > differently between attachment links and file links. For HTML exports,
> > file links are wrapped in a div with class figure where expanded
> > attachment links are not.
> 
> It would be nice to investigate why this happens.

Surely custom code for file links. Haven't dug much deeper since the issue is 
solved by the attached patch.

> > Letting org-attach-expand-links do the full
> > transform to file links would solve that issue. That also
> > means :export is not needed for org-link-set-parameters.
> >
> > Patch attached if you agree to this.
> 
> Of course! This is what I suggested, like, 6 weeks ago (although, at
> this time, I was thinking about having the substitution in "ox.el").

Well yes... I had other ideas at that point and would rather see attachment 
links as something of its own. But we're not in that place now, and the 
decision was to treat link types that can be expanded into file links just like 
that. You've kindly fixed the code so Org mode can do that now, something I'm 
sure I couldn't have done myself anyhow. So let's do it as you suggested from 
the beginning. I'll apply the patch then, unless already taken care of by you 
or Bastien! :)

Kindly
Gustav

reply via email to

[Prev in Thread] Current Thread [Next in Thread]