From: Michael Brand <michael.ch.brand@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Link "bracket-types"
Date: Fri, 11 May 2018 15:55:50 +0200 [thread overview]
Message-ID: <CALn3zohO-Sf0Yb0RmN+TcAkUbpGFzP1c8FXpOgFrh6_0VXFcVg@mail.gmail.com> (raw)
In-Reply-To: <877eoanxrv.fsf@nicolasgoaziou.fr>
On Fri, May 11, 2018 at 3:10 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Completing myself,
>
> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
>> If you mean that fontification should show one pair of brackets instead
>> of hiding them all, I suggested it already, users found it added too
>> much cruft.
>>
>> You may want to check ML archives about it.
>
> I searched the ML archives about that. It was a thread named
>
> [RFC] Change visibility for bracket links
>
> in which you participated.
>
> It never ended on anything concrete because the involved participants
> disagreed on the default value -- or, to put it differently, I disagreed
> with mostly anyone else -- and some users suggested another way to do
> it, but never implemented their suggestion fully.
Thanks for the hint, found and read it again:
http://lists.gnu.org/archive/html/emacs-orgmode/2016-10/msg00136.html
To summarize the thread there, the initial proposal there was that the links
#+begin_example
1) [[https://en.wikipedia.org/wiki/Filter][Filter (Wikipedia en)]]
2) https://en.wikipedia.org/wiki/Filter
3) [[https://en.wikipedia.org/wiki/Filter]]
4) [[https://en.wikipedia.org/wiki/Filter_(higher-order_function)]]
5) <https://en.wikipedia.org/wiki/Filter_(higher-order_function)>
#+end_example
are rendered as
#+begin_example
1) [Filter (Wikipedia en)]
2) https://en.wikipedia.org/wiki/Filter
3) [https://en.wikipedia.org/wiki/Filter]
4) [https://en.wikipedia.org/wiki/Filter_(higher-order_function)]
5) <https://en.wikipedia.org/wiki/Filter_(higher-order_function)>
#+end_example
To summarize the thread here: By changing 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
the links are rendered as
#+begin_example
1) Filter (Wikipedia en)
2) https://en.wikipedia.org/wiki/Filter
3) [[https://en.wikipedia.org/wiki/Filter]]
4) [[https://en.wikipedia.org/wiki/Filter_(higher-order_function)]]
5) <https://en.wikipedia.org/wiki/Filter_(higher-order_function)>
#+end_example
which for me is the exact right amount of show and hide of _both_
bracket pairs and URL for all cases 1..5 in all my use cases.
Inclusive org-toggle-link-display to toggle only case 1.
For me this is the better solution than my initial idea of different
faces for the different cases. Not at least because aligned tables and
filled paragraphs with links like
#+begin_example
[[abbrev:123]]
#+end_example
are aligned and filled also in non-Org tools.
(For the last reason I use links of case 1 almost never in filled
paragraphs, almost only in un-filled paragraphs with Visual Line mode.
In filled paragraphs I avoid case 1 by using case 2 (or if necessary 4
or 5) and if helpful prepend a "description" just as Org-semantically
normal text, separated from the URL with whitespace.)
I will continue to use this change in my local branch.
> Anyway, here is an updated patch from the original thread, as a POC. It
> adds `partial' to `org-descriptive-links'. It isn't complete, as
> `org-toggle-link-display' should be altered so as to not modify
> `org-descriptive-links'.
Do you mean here attached and updated as of today?
> Maybe it's time for an old idea revival.
Currently we disagree in that you suggest one bracket where I prefer
none for descriptive links and you suggest one bracket where I prefer
two for the other cases, see rendering examples and my reasons for raw
plain text in non-Org tools above. If there would be an option to show
0 (current behavior), 1 (your suggestion) or 2 brackets (new)
everywhere I could use 2 as a compromise. If the option 0, 1 or 2
would be individual for case 1 and for case 3/4 that would of course
be perfect at least for me.
Michael
next prev parent reply other threads:[~2018-05-11 13:56 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
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 [this message]
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=CALn3zohO-Sf0Yb0RmN+TcAkUbpGFzP1c8FXpOgFrh6_0VXFcVg@mail.gmail.com \
--to=michael.ch.brand@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/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.