From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Link "bracket-types" Date: Thu, 10 May 2018 10:14:36 +0200 Message-ID: <87a7t8q64z.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGgit-0003Ii-8g for emacs-orgmode@gnu.org; Thu, 10 May 2018 04:14:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGgio-0002cz-9J for emacs-orgmode@gnu.org; Thu, 10 May 2018 04:14:47 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:51165) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fGgio-0002bE-1y for emacs-orgmode@gnu.org; Thu, 10 May 2018 04:14:42 -0400 In-Reply-To: (Michael Brand's message of "Thu, 10 May 2018 08:08:07 +0200") 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: Michael Brand Cc: Org Mode Hello, Michael Brand writes: > > 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? This is not possible. I'm not even sure this is desirable. Note that 2) is not a "bracket type". > 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. Just move the mouse over them. A tooltip or the minibuffer will display what the link is really. > The brackets for 3) are optional as 2) opens the same URL. They are strictly equivalent, indeed. > 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. True. This limitation is a feature. You cannot have parenthesis in plain links even though they are technically allowed in URL. However, you could also use angle brackets. The advantage on angle brackets is that they make it clear there is no description attached to the link, i.e., the brackets are visible when fontified). You can also use angle brackets for a more prominent visual clue. I'm not sure to understand the problem you want to solve. What is important is if the displayed part of a link is a description or the URL itself, i.e., case 1. This is solved by hovering the mouse above the link. The other cases are equivalent, barring the limitation from case 2. Regards, -- Nicolas Goaziou