Following up, Nicolas Goaziou writes: > This is the first part of the suggested changes. These do not touch > attachment modifications, but rather improve the tooling in "ol.el". This second patch removes most of the "attachment" leakage in the code base (mainly "org-element.el" and "ox-*.el"). The features should be the same as before. Let me know if there's anything wrong. The only thing left is to refactor the ability to display "attachment" links as inline images. For now, this is hard-coded in "org.el", but this should not be the case. As a third phase, I suggest to add a new parameter in `org-link-parameters', for example :inlineable. This parameter would be either a boolean, or a function transforming the path. For example, "file" links should set it to t and "attachment" links to `org-attach-expand'. Then `org-display-inline-images' should collect link types with this flag, apply the transformation, and display images accordingly. Regards, -- Nicolas Goaziou