From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Link "bracket-types" Date: Thu, 10 May 2018 08:08:07 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGekN-00032k-0p for emacs-orgmode@gnu.org; Thu, 10 May 2018 02:08:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGekL-0000xD-W3 for emacs-orgmode@gnu.org; Thu, 10 May 2018 02:08:10 -0400 Received: from mail-qt0-x229.google.com ([2607:f8b0:400d:c0d::229]:39553) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGekL-0000wr-R3 for emacs-orgmode@gnu.org; Thu, 10 May 2018 02:08:09 -0400 Received: by mail-qt0-x229.google.com with SMTP id f1-v6so1180736qtj.6 for ; Wed, 09 May 2018 23:08:09 -0700 (PDT) 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: Org Mode Hi all For the four different Org link "bracket-types" shown below I would like to have four different faces to be able to distinguish them at first sight. What is the recommended way to do this? The four Org link bracket-types by example: Buffer raw content (or visible-mode): : 1) [[https://en.wikipedia.org/wiki/Filter#References][https://en.wikipedia.org/wiki/Filter]] : 2) https://en.wikipedia.org/wiki/Filter : 3) [[https://en.wikipedia.org/wiki/Filter]] : 4) [[https://en.wikipedia.org/wiki/Filter_(higher-order_function)]] (To try them out copy the above into an Org buffer and remove the colons.) Currently rendered all with the same face as: : 1) https://en.wikipedia.org/wiki/Filter : 2) https://en.wikipedia.org/wiki/Filter : 3) https://en.wikipedia.org/wiki/Filter : 4) https://en.wikipedia.org/wiki/Filter_(higher-order_function) As you know and can see above 1) to 3) can not be distinguished when rendered with the default of org-descriptive-links t. The brackets for 3) are optional as 2) opens the same URL. The brackets for 4) are mandatory because without them "_(higher-order_function)" is not fontified and not recognized by org-open-at-point as part of the Org link any more. I think 4) can be distinguished from 3) by comparing the bracket content with the part fontified and/or recognized as Org link when the bracket content without the brackets is matched/parsed again stand-alone. org-descriptive-links permanently nil does not seem to be an alternative as it disturbs text flow and org-fill-paragraph. org-toggle-link-display does not seem to be an alternative as it would have to be toggled forth and back on every new window scroll view. Michael