[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Re: [BUG] org-attach-id-ts-folder-format fails on customized
From: |
Ihor Radchenko |
Subject: |
Re: [PATCH] Re: [BUG] org-attach-id-ts-folder-format fails on customized IDs [9.6 (9.6-??-2e9999783)] |
Date: |
Thu, 04 Aug 2022 06:25:37 +0800 |
Max Nikulin <manikulin@gmail.com> writes:
> On 23/07/2022 12:22, Ihor Radchenko wrote:
>> Tentative patch is attached.
>
>> + (if (< (length id) 3)
>> + (org-attach-id-uuid-folder-format (md5 id))
>
> Ihor, I am afraid of collisions due to short input to md5. Long hash
> value gives false impression of high entropy but actually there are not
> so many variants for 1 or 2 characters strings. Either there is no point
> in making long name from short id or random string of appropriate length
> should be used instead.
Random is not an option. If we use random string, how will we get the
right attachment path on a second call? This function must return the
same value given the same input.
Having said that, I do agree (taking into account the other comment)
that md5 may not be a very good idea. Maybe simply something like
"__/id". Ideally, we should be able to recover the original id from the
path to attachment.
Best,
Ihor
- Re: [PATCH] Re: [BUG] org-attach-id-ts-folder-format fails on customized IDs [9.6 (9.6-??-2e9999783)], Janek F, 2022/08/02
- Re: [PATCH] Re: [BUG] org-attach-id-ts-folder-format fails on customized IDs [9.6 (9.6-??-2e9999783)], Max Nikulin, 2022/08/03
- Re: [PATCH] Re: [BUG] org-attach-id-ts-folder-format fails on customized IDs [9.6 (9.6-??-2e9999783)],
Ihor Radchenko <=
- [PATCH v2] Re: [BUG] org-attach-id-ts-folder-format fails on customized IDs [9.6 (9.6-??-2e9999783)], Ihor Radchenko, 2022/08/10
- Re: [PATCH v2] Re: [BUG] org-attach-id-ts-folder-format fails on customized IDs [9.6 (9.6-??-2e9999783)], Max Nikulin, 2022/08/10
- [PATCH v3] Re: [BUG] org-attach-id-ts-folder-format fails on customized IDs [9.6 (9.6-??-2e9999783)], Ihor Radchenko, 2022/08/10
- Re: [PATCH v3] Re: [BUG] org-attach-id-ts-folder-format fails on customized IDs [9.6 (9.6-??-2e9999783)], Max Nikulin, 2022/08/10
- Re: [PATCH v3] Re: [BUG] org-attach-id-ts-folder-format fails on customized IDs [9.6 (9.6-??-2e9999783)], Ihor Radchenko, 2022/08/11
- Re: [PATCH v3] Re: [BUG] org-attach-id-ts-folder-format fails on customized IDs [9.6 (9.6-??-2e9999783)], Max Nikulin, 2022/08/11
- Re: [PATCH v3] Re: [BUG] org-attach-id-ts-folder-format fails on customized IDs [9.6 (9.6-??-2e9999783)], Ihor Radchenko, 2022/08/13
- Re: [PATCH v3] Re: [BUG] org-attach-id-ts-folder-format fails on customized IDs [9.6 (9.6-??-2e9999783)], Max Nikulin, 2022/08/13
- Re: [PATCH v3] Re: [BUG] org-attach-id-ts-folder-format fails on customized IDs [9.6 (9.6-??-2e9999783)], Ihor Radchenko, 2022/08/13