From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: patch for custom colored links in org-mode Date: Tue, 28 Jun 2016 16:42:42 -0400 Message-ID: References: <87twgdxtfm.fsf@saiph.selenimh> <87lh1pazj9.fsf@gmx.us> <877fd9xecw.fsf@saiph.selenimh> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1145aed2c0a67605365cadbc Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHzqJ-0003m7-Ly for emacs-orgmode@gnu.org; Tue, 28 Jun 2016 16:42:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHzqI-00085N-EP for emacs-orgmode@gnu.org; Tue, 28 Jun 2016 16:42:47 -0400 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:33758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHzqI-000854-3b for emacs-orgmode@gnu.org; Tue, 28 Jun 2016 16:42:46 -0400 Received: by mail-wm0-x22a.google.com with SMTP id r190so29484984wmr.0 for ; Tue, 28 Jun 2016 13:42:45 -0700 (PDT) In-Reply-To: <877fd9xecw.fsf@saiph.selenimh> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Rasmus , "emacs-orgmode@gnu.org" --001a1145aed2c0a67605365cadbc Content-Type: text/plain; charset=UTF-8 Indeed, I based this approach off a patch Rasmus posted some time ago for colored blocks ;) It is also similar to some other approaches in org-mode, e.g. the "org-%s-complete-link" functions. I am ok with a single variable that is an a-list that combines face and display. Would you consider expanding org-add-link-type like this to set those in the special variable? (org-add-link-type "somename" 'click-func 'export-func :face some-face :display path) You could always add them manually to the variable for links already defined somewhere else. John ----------------------------------- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Tue, Jun 28, 2016 at 4:11 PM, Nicolas Goaziou wrote: > Hello, > > Rasmus writes: > > > Aside: This is what is done for specially colored source blocks. > > Duh. This totally eluded me. > > > But we can change that UI if you think. > > I think it would be nice to find a decent UI for that feature, indeed. > With that naming convention rule, you get neither docstring nor > customization UI. > > Of course, this is documented in the manual, but very often, looking at > defcustoms in a library is of invaluable help. > > > Regards, > > -- > Nicolas Goaziou > > --001a1145aed2c0a67605365cadbc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Indeed, I based this approach off a patch Rasmus posted so= me time ago for colored blocks ;)

It is also similar to = some other approaches in org-mode, e.g. the=C2=A0"org-%s-complete-link= " functions.

I am ok with a single variable t= hat is an a-list that combines face and display.

W= ould you consider expanding org-add-link-type like this to set those in the= special variable?

(org-add-link-type "somena= me" 'click-func 'export-func :face some-face :display path)

You could always add them manually to the variable f= or links already defined somewhere else.



John

-----------------------------------
Professor Jo= hn Kitchin=C2=A0
Doherty Hall A207F
Department of Chemical Engineerin= g
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803=

On Tue, Jun 28, 2016 at 4:11 PM, Nicolas Goa= ziou <mail@nicolasgoaziou.fr> wrote:
Hello,

Rasmus <rasmus@gmx.us> writes:
> Aside: This is what is done for specially colored source blocks.

Duh. This totally eluded me.

> But we can change that UI if you think.

I think it would be nice to find a decent UI for that feature, indee= d.
With that naming convention rule, you get neither docstring nor
customization UI.

Of course, this is documented in the manual, but very often, looking at
defcustoms in a library is of invaluable help.


Regards,

--
Nicolas Goaziou


--001a1145aed2c0a67605365cadbc--