From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: patch for custom colored links in org-mode Date: Fri, 01 Jul 2016 13:20:29 -0400 Message-ID: References: <87twgdxtfm.fsf@saiph.selenimh> <87lh1pazj9.fsf@gmx.us> <877fd9xecw.fsf@saiph.selenimh> <87eg7dikr9.fsf@saiph.selenimh> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJ27L-0004kb-If for emacs-orgmode@gnu.org; Fri, 01 Jul 2016 13:20:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJ27F-0001tw-HT for emacs-orgmode@gnu.org; Fri, 01 Jul 2016 13:20:38 -0400 Received: from mail-qt0-x22b.google.com ([2607:f8b0:400d:c0d::22b]:33507) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJ27F-0001to-D0 for emacs-orgmode@gnu.org; Fri, 01 Jul 2016 13:20:33 -0400 Received: by mail-qt0-x22b.google.com with SMTP id c34so60942379qte.0 for ; Fri, 01 Jul 2016 10:20:33 -0700 (PDT) In-reply-to: <87eg7dikr9.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: Nicolas Goaziou Cc: "emacs-orgmode@gnu.org" , Rasmus +1 for all this. Nicolas Goaziou writes: > Hello, > > John Kitchin writes: > >> 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. > > This is yet another obscure part of Org, IMO. I really think we need to > normalize link customization, for an improved user experience. > >> Would you consider expanding org-add-link-type like this to set those in >> the special variable? > > I don't like much `org-add-link-type' because, it inherently only > operates on additional link types, so it is not sufficient to handle all > customization needs. I'd rather have a single way to control link > behaviour. I agree, it doesn't make sense to use it for customization. OTOH, it also adds the link type to org-link-types, rebuilds the regexp and the org-link-protocols. Do you think we would eliminate `org-link-types' and `org-link-protocols' then? That would be fine with me. I think we might still want an org-add-link-type function though, if there are additional things that need to be done after adding to `org-link-type-parameters', e.g. updating regexps. It might even be feasible to keep backward compatibility for code that already uses this. Presumably we would then eliminate the "org-%s-complete-link" functions? There don't seem to be many (not including the auto-generated org-ref related ones ;) > > I think we could rename `org-link-display-parameters' into > `org-link-type-parameters' and control links from that location. More > explicitly, the value for a given link type (string) could be a plist > with the following properties > - :follow > - :export > - :face > - :display > - :completion > - :echo > > The value would contain every link type, including internal ones. Its > value would probably be daunting at first (compared, e.g., with > a boolean) but it would give full control over links. I like it. > > WDYT? > > > Regards, -- 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