|Subject:||Re: [O] Bug: Fix for org-make-link-description-function use in org-insert-link [9.0.10 (9.0.10-5-g1654a5-elpa @ /home/rrt/.emacs.d/elpa/org-20170904/)]|
|Date:||Tue, 5 Sep 2017 22:05:59 +0100|
Reuben Thomas <address@hidden> writes:
> This seems to be incorrect behaviour, as the docstring for
> org-insert-link says:
> If `org-make-link-description-
function' is non-nil, this function will beI agree.
> called with the link target, and the result will be the default
> link description.
> The implication is that the value returned is used as the default, not
> that it overrides the prompt.
> First, org-make-link-description-
function is called if it is non-nil,I think the optional parameter from the function call should still
> and used to set default-description.
prevail. I.e., shouldn't this function be called when
DEFAULT-DESCRIPTION is nil (e.g., called interatively)?
> Then (unless auto-desc is non-nil) the description is prompted for with
> default-description as the default value (unless
function returned nil, in which case theObviously, it would not be desirable.
> current value of desc, if any, is used).
> There is one further matter that my patch does not address: the
> docstring for org-make-link-description-
> “When [org-make-link-description-
function is] nil, the link location
> will be used.”
> This does not happen (it’s precisely the behaviour I’ve been trying to
> obtain!), and my patch does not make it happen. Indeed, it’s not clear
> that it’s desirable (if one is using numbered sections, for example).
However, I think it should read "When
function' _returns_ nil, the link location is
used". This is not what is implemented either, tho.
|[Prev in Thread]||Current Thread||[Next in Thread]|