Karthik Chikmagalur <karthikchikmaga...@gmail.com> writes: >> Maybe even hook into link parameters. > > Yes, the idea is to add an org-link-parameter named ":preview" so each > link type can register how it should be previewed. When omitted, we > fall back to a default (only for file links) that's the current > image preview behavior. > > More fine-grained behavior may be desired in the future -- for example, > web url links to YouTube should be previewed differently from web url > links to arXiv, but for now this will be the responsibility of the > single :preview function in org-link-parameters.
This is not a problem. It is possible (and also Elispy) to use advices: (add-function :before-until (org-link-get-parameter "id" :follow) #'my-function) We may want to document this fact better though. > Would you like this to be part of org.el or should I spin out an > org-image-preview.el feature+library? Spin out will be easier when for my rebase :) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>