Earl Chase <[email protected]> writes:

> I added a new custom variable that allows you to select the description
> that will be created for file links when no description can be created from
> the context.

Thanks for the patch!

> +(defcustom org-link-default-file-link-description nil
> +  "How the description of file links should be stored.
> +Valid values are:
> +
> +nil        No description will be created.
> +filename   Description will be the filename of the link.
> +file-path  Description will be the full filepath of the link.
> +           Respects the value of `org-link-file-path-type'.
> +
> +Alternatively, users may supply a custom function that takes the
> +path of the link as an argument and returns the description."

I think we need to clarify that this variable is not always respected,
but only when description is not set by other means, like
org-link-precise-link-target.

> +  :group 'org-link
> +  :type '(choice (const nil)
> +                 (const filename)
> +                 (const file-path)
> +                 (function))
> +  :package-version '(Org . "10.0")
> +  :safe #'null)

Lll the possible values except function are safe.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to