emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [RFC] Change visibility for bracket links


From: Rasmus
Subject: Re: [O] [RFC] Change visibility for bracket links
Date: Wed, 12 Oct 2016 13:08:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Nicolas Goaziou <address@hidden> writes:

> A "good writing experience" includes a "good editing experience", or so
> I think. I'm suggesting to solve some problems related to the latter,
> under certain circumstances I explained in my original post. 

I agree there’s a problem, but I find the proposed solution potentially
annoying...

> The `org-link' face is not enough, as pointed out, because it's not
> a matter of making the links stand out in the buffer.

I see.

>> Clément suggestion of a using something akin to prettify symbols mode is
>> great, though.  We could limit the length of the url being shown.  It can
>> always be edited with e.g. "C-c ’" or, as currently, "C-c C-l".
>
> The problem is not really about editing the link itself, but editing
> around the link. The problem also arises for the text just before or
> just after the link. "C-c C-l" cannot help here.

It is a problem.  It's also a problem with super/subscripts as pointed out
earlier.

> I cannot tell, however, if Clément's suggestion is good or not. This is
> why I'd like to see a mock of the result, if anyone wants to implement
> one.

Here’s a quick-and-dirty "mockup" in Emacs 25.1.  It doesn’t work
properly, obviously, but try to move the cursor from left-to-right to get
a taste of what it could be like.  Of course, the behavior could be
tweaked, e.g. characters displayed etc...

(progn 
  (setq prettify-symbols-alist
        
'(("[[https://www.very-long-links-that-might-be-obnoxious-when-exampned.org/]["; 
. " ")
          ("]]" . " "))
        prettify-symbols-unprettify-at-point 'right-edge)
  (prettify-symbols-mode)
  (insert "\ntext before 
[[https://www.very-long-links-that-might-be-obnoxious-when-exampned.org/][my 
description]] text after\n"))

Rasmus

-- 
However beautiful the theory, one should occasionally look at the evidence



reply via email to

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