> -----Original Message----- > From: Nicolas Goaziou <m...@nicolasgoaziou.fr> > Sent: den 13 februari 2020 22:38 > To: Gustav Wikström <gus...@whil.se> > Cc: emacs-orgmode@gnu.org; Bastien Guerry <b...@gnu.org> > Subject: Re: attachment: link type export to HTML invalid attach dir > > Gustav Wikström <gus...@whil.se> writes: > > > Ah, you mean the reference on line 3216. No, I don't think it can be > > removed. And I honestly don't think it should be either. It's there to > > let attachment links mirror the peculiarities of file links. It's > > needed for feature compatibility. I don't see the issue with that. > > It's a core link type and it needs the information. That particular > > logic doesn't affect the parse tree. It's there only to give > > attachment links the same properties as file links. > > I disagree. This is not a core link type. The issue is that the parser > should self-contained. Please use a different way to obtain the > information; we already discussed it and suggested multiple solutions.
What makes attachment links not be a core link type? As I see it we have two categories here: Core = those inside Org mode. Not core = those in external libraries. No other distinction needs to be made. If a link type is inside Org mode, let it then use the special properties that Org mode provides. Attachment links need to be treated just as file links in most regards. Since file-links have special logic which attachment links also needs. Thus a reference to attachment in org-element.el. Nothing strange here, nothing breaking and the parser is still self-contained. Maybe time for Bastien to step in. Because I can't remove the reference to attachment in org-element.el without breaking it's functionality. Which, btw, was broken before adding the reference in org-element.el. The thing that started this discussion in the first place. We're in a better place now. Attachment links works as intended. It would be a pity to have to change that because of your argument that attachment links aren't "core" enough to be mentioned in org-element.el. Regards Gustav