[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v9] ol.el: add description format parameter to org-link-param
From: |
Ihor Radchenko |
Subject: |
Re: [PATCH v9] ol.el: add description format parameter to org-link-parameters |
Date: |
Sat, 30 Jul 2022 14:29:51 +0800 |
Hugo Heagren <hugo@heagren.com> writes:
> The test fails because of an error in `rx-to-string', which is called
> by `org-insert-link'. It was failing because I have the following
> code:
>
> ,----
> | (rx-to-string `(: string-start (submatch (or ,@all-prefixes)) ":"))
> `----
> ...
> We could just as easily do it by leaving the parameters as they are,
> and using a link 'type' which is definitely not in the list. I have
> taken this approach in the new version of the patch. I've used
> "fake-link-type", which will surely not be used, even in anyone's
> strange personal config. Admittedly it /could/ be used though (it
> would be possible to add it if someone wanted), so if you'd rather, I
> can develop something which uses a fake link type which is /by
> definition/ not in `org-link-parameters', it would just be rather a
> lot more work and the test case might subsequently be less clear to
> understand.
>
> Hope that helps -- do the tests pass for you now?
The tests are passing on my side.
However, even though you fixed the tests, you did nothing to fix the
actual problem revealed by the tests. The rx-to-string call may still
suffer from the described edge case. Why not simply shield the
rx-to-string call with (and all-prefixes ...)? I'd leave the previous
version of the tests as they had a benefit of testing this edge case.
Best,
Ihor
- Re: [PATCH v6] ol.el: add description format parameter to org-link-parameters, (continued)
- Re: [PATCH v6] ol.el: add description format parameter to org-link-parameters, Max Nikulin, 2022/07/18
- Re: [PATCH v7] ol.el: add description format parameter to org-link-parameters, Hugo Heagren, 2022/07/23
- Re: [PATCH v7] ol.el: add description format parameter to org-link-parameters, Max Nikulin, 2022/07/23
- Re: [PATCH v7] ol.el: add description format parameter to org-link-parameters, Ihor Radchenko, 2022/07/23
- Re: [PATCH v7] ol.el: add description format parameter to org-link-parameters, Max Nikulin, 2022/07/23
- Re: [PATCH v7] ol.el: add description format parameter to org-link-parameters, Max Nikulin, 2022/07/24
- Re: [PATCH v7] ol.el: add description format parameter to org-link-parameters, Ihor Radchenko, 2022/07/24
- Re: [PATCH v8] ol.el: add description format parameter to org-link-parameters, Hugo Heagren, 2022/07/25
- Re: [PATCH v8] ol.el: add description format parameter to org-link-parameters, Max Nikulin, 2022/07/29
- Re: [PATCH v9] ol.el: add description format parameter to org-link-parameters, Hugo Heagren, 2022/07/29
- Re: [PATCH v9] ol.el: add description format parameter to org-link-parameters,
Ihor Radchenko <=
- Message not available
- Re: [PATCH v9] ol.el: add description format parameter to org-link-parameters, Ihor Radchenko, 2022/07/30
- [PATCH] ol-info: Enable :insert-description feature, Max Nikulin, 2022/07/30
- Re: [PATCH v7] ol.el: add description format parameter to org-link-parameters, Ihor Radchenko, 2022/07/28
- Re: [PATCH v7] ol.el: add description format parameter to org-link-parameters, Bastien Guerry, 2022/07/29
- Re: [PATCH v4] ol.el: add description format parameter to org-link-parameters, Max Nikulin, 2022/07/10