From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: [RFC] Change visibility for bracket links Date: Wed, 5 Oct 2016 17:46:36 +0200 Message-ID: References: <87bmyyold3.fsf@nicolasgoaziou.fr> Reply-To: Rainer@krugs.de Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c0528427c920053e20156f Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50336) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1broP3-0007FL-5C for emacs-orgmode@gnu.org; Wed, 05 Oct 2016 11:46:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1broP1-0000u7-IV for emacs-orgmode@gnu.org; Wed, 05 Oct 2016 11:46:40 -0400 Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]:32973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1broP1-0000u3-Bd for emacs-orgmode@gnu.org; Wed, 05 Oct 2016 11:46:39 -0400 Received: by mail-oi0-x22e.google.com with SMTP id r126so277187847oib.0 for ; Wed, 05 Oct 2016 08:46:39 -0700 (PDT) In-Reply-To: <87bmyyold3.fsf@nicolasgoaziou.fr> 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: Org Mode List --001a11c0528427c920053e20156f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Le mercredi 5 octobre 2016, Nicolas Goaziou a =C3=A9crit : > Hello, > > I'd like to make the following change to bracket links display (i.e., > when `org-highlight-links' contains `bracket', which is the default). > > Basically, I want to leave a visible pair of brackets around the link, > i.e., > > [[uri][description]] > > is displayed as > > [description] > > instead of > > description > > and > > [[uri]] > > is displayed as > > [uri] > > instead of > > uri > > +1 Very good suggestion. Rainer The rationale behind this suggestion is that editing a mostly invisible > link is unintuitive when point is at the boundaries of its visible part. > > More precisely, in the following visible part of a link > > description > > if point hits "d" from the right, changes happen in the description of > the link, but if point comes from the left, changes happen before the > link. > > I guess I could get used to it, but sometimes, the link happens to be at > column 0. In this case, the only way to "come from the left" is to move > to the previous line and go past the newline character. This is, IMO, > very annoying, notwithstanding the fact that it is impossible to realize > at the beginning of the buffer. > > Leaving a pair of brackets, OTOH, disambiguates the situation. Editing > before the opening bracket makes changes before the link. Conversely, > editing after the former makes changes to the uri or the description, > whichever is displayed. > > The cost a little more visual clutter, but it seems very acceptable to > me. I attach a quick patch for testing. > > Feedback welcome. > > Regards, > > -- > Nicolas Goaziou 0x80A93738 > --=20 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax (F): +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug --001a11c0528427c920053e20156f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Le=C2=A0mercredi 5 octobre 2016, Nicolas Goaziou <mail@nicolasgoaziou.fr> a =C3=A9crit=C2= =A0:
Hello,

I'd like to make the following change to bracket links display (i.e., when `org-highlight-links' contains `bracket', which is the default= ).

Basically, I want to leave a visible pair of brackets around the link,
i.e.,

=C2=A0 [[uri][description]]

is displayed as

=C2=A0 [description]

instead of

=C2=A0 description

and

=C2=A0 [[uri]]

is displayed as

=C2=A0 [uri]

instead of

=C2=A0 uri


+1

Very good = suggestion.=C2=A0=C2=A0

Rainer
<= div>
The rationale behind this suggestion is that editing a mostly invisible
link is unintuitive when point is at the boundaries of its visible part.
More precisely, in the following visible part of a link

=C2=A0 description

if point hits "d" from the right, changes happen in the descripti= on of
the link, but if point comes from the left, changes happen before the
link.

I guess I could get used to it, but sometimes, the link happens to be at column 0. In this case, the only way to "come from the left" is t= o move
to the previous line and go past the newline character. This is, IMO,
very annoying, notwithstanding the fact that it is impossible to realize at the beginning of the buffer.

Leaving a pair of brackets, OTOH, disambiguates the situation. Editing
before the opening bracket makes changes before the link. Conversely,
editing after the former makes changes to the uri or the description,
whichever is displayed.

The cost a little more visual clutter, but it seems very acceptable to
me. I attach a quick patch for testing.

Feedback welcome.

Regards,

--
Nicolas Goaziou=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0x80A93738


--
Rainer M. Krug, PhD (Conservation Ecology, SUN)= , MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of E= xcellence for Invasion Biology
Stellenbosch University
South Africa
Tel : =C2=A0 =C2=A0 =C2=A0 +33 - (0)9 53 10 27 44
Cell: =C2=A0 =C2= =A0 =C2=A0 +33 - (0)6 85 62 59 98
Fax (F): =C2=A0 =C2=A0 =C2=A0 +33 - (0= )9 58 10 27 44

Fax (D): =C2=A0 =C2=A0+49 - (0)3 21 21 25 22 44
email: =C2=A0 =C2=A0 =C2=A0Rainer@krugs.de

Skype: =C2=A0 =C2=A0 =C2=A0RMkrug

--001a11c0528427c920053e20156f--