[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5] ol.el: add description format parameter to org-link-param

From: Ihor Radchenko
Subject: Re: [PATCH v5] ol.el: add description format parameter to org-link-parameters
Date: Sun, 17 Jul 2022 18:18:27 +0800

Hugo Heagren <hugo@heagren.com> writes:

>> Can you also update the documentation for
>> org-link-make-description-function?
> I'm not sure what sort of documentation you have in mind? What should
> I add?

I referred to my earlier statement:

        > tl;dr The question is: what is the Good Behaviour when
        > :default-description is set to something, which is meant to return a
        > string and returns 'nil instead? Should it be treated like an empty
        > string, or as an error?

        Currently, the internal implementation will treat nil return value as if
        there was no :default-description and org-link-make-description-function
        were set to nil. We may probably document this. It sounds like a useful

        If the :default-description function returns non-string and not nil, the
        behaviour is simply undefined. It was also the case for
        org-link-make-description-function. Though we might add a cl-assert
        somewhere near the end of org-insert-link to deliberately throw an

The return value of org-link-make-description-function can also be nil
in addition to string.  I suggest documenting this, just as you did for
:insert-description parameter.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]