Earl Chase <[email protected]> writes:

> Subject: [PATCH] lisp/ol.el: Custom variable for file link description

A few more comments.

> +*** New custom variable ~org-link-default-file-link-description~
> +
> +This option, nil by default, allows you to choose the description
> +that will be created for file links.  See its docstring for more information.

Please expand a bit. Otherwise, people reading the news will have no
clue whether this option is useful or not. It would be best if the news
entry shows how the new option can be useful.

> +(defcustom org-link-default-file-link-description nil
> +  "How the description of file links should be stored.
> +The value of this variable is only respected when
> +`org-store-link' can not create a link from the link

*cannot

> +context, i.e. in `Dired' or non-org-mode files.

I think `Dired' quote is not necessary.

> +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

"users may supply" reads weird - a user will be reading this!
Maybe "you can supply".

> +path of the link as an argument and returns the description."
> +  :group 'org-link
> +  :type '(choice (const nil)
> +                 (const filename)
> +                 (const file-path)
> +                 (function))
> +  :package-version '(Org . "10.0")
> +  :safe #'symbolp)

(symbolp #'delete-file) ; -> t
`symbolp' won't cut it.

> -     (let ((file (dired-get-filename nil t)))
> +     (let ((file (or (dired-get-filename nil t) )))

What is this change about?

> +    ;; Doesn't changed behavior of links

*change

> +    ;; The value of `org-link-file-path-type' is always respectedd.

*respected


-- 
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