From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Michael Brand <michael.ch.brand@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Link "bracket-types"
Date: Thu, 10 May 2018 10:14:36 +0200 [thread overview]
Message-ID: <87a7t8q64z.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CALn3zogC+m-DE-0uCOvNMU3kO0u3qNskjjv8jfMi9DETOTn-TA@mail.gmail.com> (Michael Brand's message of "Thu, 10 May 2018 08:08:07 +0200")
Hello,
Michael Brand <michael.ch.brand@gmail.com> 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.
<https://en.wikipedia.org/wiki/Filter_(higher-order_function)>
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
next prev parent reply other threads:[~2018-05-10 8:14 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-10 6:08 Link "bracket-types" Michael Brand
2018-05-10 8:14 ` Nicolas Goaziou [this message]
2018-05-10 8:32 ` Eric S Fraga
2018-05-11 12:34 ` Nicolas Goaziou
2018-05-11 13:20 ` Eric S Fraga
2018-05-10 9:41 ` Michael Brand
2018-05-10 12:44 ` Nicolas Goaziou
2018-05-10 13:23 ` Michael Brand
2018-05-10 13:33 ` Nicolas Goaziou
2018-05-10 14:29 ` Michael Brand
2018-05-10 16:27 ` Nicolas Goaziou
2018-05-10 19:58 ` Samuel Wales
2018-05-12 23:35 ` Samuel Wales
2018-05-13 11:10 ` Eric S Fraga
2018-05-10 19:59 ` Michael Brand
2018-05-11 0:22 ` Nicolas Goaziou
2018-05-11 13:10 ` Nicolas Goaziou
2018-05-11 13:55 ` Michael Brand
2018-05-11 14:15 ` Nicolas Goaziou
2018-05-12 8:12 ` Michael Brand
2018-05-17 16:17 ` Michael Brand
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a7t8q64z.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=michael.ch.brand@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.