"Christopher M. Miles" <numbch...@gmail.com> writes:

>>> Combine file name with hash #X both in generated filename is a better idea.
>>
>> Are you suggesting to change `org-yank-image-autogen-filename' to
>> include file hash?
>>
> I mean a new function so that can keep original compatibility.

Then, what should we do for users using a custom function? Or with files
generated using the older function?

>>> I agree with your idea.
>>> What do you think about two files comparing when has same hash but 
>>> different file name?
>>
>> Won't this be slow if the `org-yank-image-save-method' points to a
>> directory with many files?
>
> That maybe cause performance issue. But I think check and comparing
> filename strings is not a very series problem.

That's only assuming that hash is stored in the filename itself. But if
not, we would need to calculate hash using contents, which is
prohibitively slow on many files.

-- 
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