[Top][All Lists]

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

Re: [O] colored-links take 2

From: Nicolas Goaziou
Subject: Re: [O] colored-links take 2
Date: Fri, 01 Jul 2016 14:58:38 +0200

John Kitchin <address@hidden> writes:

> I forgot a little piece in the last patch. This one is probably right.

Thank you. Some comments follow.

> +(defcustom org-link-display-parameters nil 
> +  "An alist of properties to display a link with.

An alist between link types and properties to ...

> +The first element in each list is a string of the link

first element -> key

> +type. Subsequent optional elements make up a p-list. :face can be

Double spaces are required between sentences.

> +used to change the face on the link (the default is
> +`org-link'. If :display is 'full the full link will show in

Ditto. Also 'full -> `full'.

There should probably be other allowed values for :display, e.g., `path'
and `description'.

> +descriptive link mode."
> +  :type '(alist :tag "Link display paramters"
> +             :key-type 'string
> +             :value-type '(plist))
> +  :group 'org-link)

:type is wrong, it should be string' not 'string and plist instead of
'(plist). Also, allowed keywords should probably be specified somewhere.

>                            (list 'mouse-face 'highlight
> -                                'face 'org-link
> +                                'face (or (plist-get
> +                                           (cdr (assoc type 
> org-link-display-parameters))
> +                                           :face)
> +                                          'org-link)

(plist-get ....) is begging for a getter, e.g.
`org-link--parameter-value' (which is called with two arguments, the
type as a string and the property as a keyword).

> +        (ip (list 'invisible (or (plist-get
> +                                  (cdr (assoc type 
> org-link-display-parameters))
> +                                  :display)
> +                                 'org-link)

See above.


reply via email to

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