emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: colored-links take 2
Date: Fri, 01 Jul 2016 14:58:38 +0200	[thread overview]
Message-ID: <87a8i1ikg1.fsf@saiph.selenimh> (raw)
In-Reply-To: <m260sqmugw.fsf@Johns-MacBook-Air.local> (John Kitchin's message of "Thu, 30 Jun 2016 13:56:15 -0400")

John Kitchin <jkitchin@andrew.cmu.edu> 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.

Regards,

      reply	other threads:[~2016-07-01 12:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-30 17:56 colored-links take 2 John Kitchin
2016-07-01 12:58 ` Nicolas Goaziou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a8i1ikg1.fsf@saiph.selenimh \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).