emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Brand <michael.ch.brand@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: Link "bracket-types"
Date: Thu, 10 May 2018 08:08:07 +0200	[thread overview]
Message-ID: <CALn3zogC+m-DE-0uCOvNMU3kO0u3qNskjjv8jfMi9DETOTn-TA@mail.gmail.com> (raw)

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

             reply	other threads:[~2018-05-10  6:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10  6:08 Michael Brand [this message]
2018-05-10  8:14 ` Link "bracket-types" Nicolas Goaziou
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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALn3zogC+m-DE-0uCOvNMU3kO0u3qNskjjv8jfMi9DETOTn-TA@mail.gmail.com \
    --to=michael.ch.brand@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).