Hugo Heagren <h...@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 behaviour. 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 error. 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. Best, Ihor