emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Link "bracket-types"


From: Michael Brand
Subject: Re: [O] Link "bracket-types"
Date: Thu, 10 May 2018 21:59:07 +0200

Hi Nicolas

On Thu, May 10, 2018 at 6:27 PM, Nicolas Goaziou <address@hidden> wrote:

> IIUC, you want fontification to make it obvious there are square
> brackets in links, so that you know when they can be removed, for
> improved readability outside Org.

Yes, and generally just to see what is going on in Org with a little
bit more details.

In the meantime I tried a changed org-activate-links

#+begin_example
-                   (visible-start (or (match-beginning 4) (match-beginning 2)))
+                   (visible-start (or (match-beginning 4) start))
-                   (visible-end (or (match-end 4) (match-end 2))))
+                   (visible-end (or (match-end 4) end)))
#+end_example

to show the brackets of case 3/4 always which I even prefer over my
earlier proposal of fontification. And org-toggle-link-display can
still be used to toggle case 1.

Somehow I don't like to hide the brackets for case 3/4 where nothing
else is to be hidden.

> If I'm correct, why don't you write a function that normalizes links for
> you, so you don't have to bother, e.g., something that turns [[URL]]
> into URL unless URL contains parenthesis or spaces?

The search criteria is more complex because e. g.
: https://en.wikipedia.org/wiki/Filter_(signal_processing)
does not need brackets.

The changed org-activate-links works better for me than an automatic
normalization as I don't need and want to change all
: [[URL]]
now and prefer something similar to lazy evaluation: Change such links
only when I stumble upon for some other reason because after bracket
removal or replacement with angle brackets I have to interact anyway
with org-fill-paragraph and table realignment etc. because I used
org-descriptive-links nil before.

Michael



reply via email to

[Prev in Thread] Current Thread [Next in Thread]