Visuwesh <visuwe...@gmail.com> writes:

>> That's one option - we can ask Emacs devs to provide a customization for
>> `yank-media' to auto-select specific type once it is available.
> ...
> I am leaning towards doing it in the Emacs side since it would get rid
> of similar annoyance(s) in other yank-media handlers, not just Org.

Now, Emacs has this.
`yank-media-preferred-types' and `yank-media-autoselect-function'.

>> Visuwesh <visuwe...@gmail.com> writes:
>>>> 1. do a variable for selecting absolute path: to be able to have a file 
>>>> link that works with absolute path; and the reason is that being 
>>>> relative, this, does not combine good when you move your latex export 
>>>> somewhere else (in my case, I usually move it to /tmp/, and from there I 
>>>> decide when I want to save something persistently), hence it fails, and 
>>>> I got tired on fixing the links, in fact, the absolute path sometimes is 
>>>> smaller than the relative one 
>>>> =file:/tmp/clipboard-20240916T013308.png]]= vs 
>>>> =[[file:../../../tmp/clipboard-20240916T011913.png]]=
>>>
>>> This can be done in the org side.  I guess adding another defcustom
>>> would be the way to go? I don't see how it is possible to make
>>> org-yank-image-save-method accept another option.
>> We can re-use `org-link-file-path-type'.
>> Probably, simply by factoring out the cond from `org-insert-link' and
>> then reusing it in yank handler.
>
> I think this will indeed be the best.  We can reuse this everywhere we
> insert the link in yank-media+DND code (which IIRC uses the same
> function at the very end).

Visuwesh, do you want to proceed with this part?

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
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>

Reply via email to