From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlef Steuer Subject: Re: [RFC] Change visibility for bracket links Date: Wed, 5 Oct 2016 21:21:24 +0200 Message-ID: <20161005212124.79ef7411@solydxk> References: <87bmyyold3.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brrlT-0005ZX-Ty for emacs-orgmode@gnu.org; Wed, 05 Oct 2016 15:22:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brrlN-000873-RP for emacs-orgmode@gnu.org; Wed, 05 Oct 2016 15:22:02 -0400 Received: from [195.159.176.226] (port=37151 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brrlN-00084g-JJ for emacs-orgmode@gnu.org; Wed, 05 Oct 2016 15:21:57 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1brrlE-0007Wq-J4 for emacs-orgmode@gnu.org; Wed, 05 Oct 2016 21:21:48 +0200 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 Am Wed, 05 Oct 2016 17:40:08 +0200 schrieb Nicolas Goaziou : > 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 Detlef > > 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, >