From mboxrd@z Thu Jan 1 00:00:00 1970 From: "David A. Gershman" Subject: Re: [RFC] Change visibility for bracket links Date: Wed, 05 Oct 2016 14:30:12 -0700 Message-ID: <2B66CB76-BBC4-4345-A310-CD034130DA1D@dagertech.net> References: <87bmyyold3.fsf@nicolasgoaziou.fr> <520C9DD6-7764-4B07-8E7A-FB42CC0CDF8A@dagertech.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brtme-0000hA-Rg for emacs-orgmode@gnu.org; Wed, 05 Oct 2016 17:31:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brtma-0008Ro-Jh for emacs-orgmode@gnu.org; Wed, 05 Oct 2016 17:31:23 -0400 Received: from dagertech.net ([64.183.98.170]:57774 helo=mail.dagertech.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brtma-0008Qt-DF for emacs-orgmode@gnu.org; Wed, 05 Oct 2016 17:31:20 -0400 Received: from [100.106.37.166] (173.sub-70-211-140.myvzw.com [70.211.140.173]) (using TLSv1.2 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.dagertech.net (Postfix) with ESMTPSA id 9913FA03B7 for ; Wed, 5 Oct 2016 14:31:13 -0700 (PDT) In-Reply-To: <520C9DD6-7764-4B07-8E7A-FB42CC0CDF8A@dagertech.net> 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: emacs-orgmode@gnu.org Not bad, but could it be customizable via variable giving the user the choice? >On October 5, 2016 8:40:08 AM PDT, Nicolas Goaziou > wrote: >>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 >> >>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.=20 >> >>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, --=20 David A. Gershman, CISSP dagershman@dagertech.net