Re: managing aggressive link activation within lines?

2019-12-22 Thread Nicolas Goaziou
Nicolas Goaziou  writes:

> IMO, it would be more productive to think about what can be done in your
> situation instead. For example, one solution could be to require "[[" to
> be escaped in a link (current syntax already requires closing brackets
> to be escaped in some situations). I'm not yet sure how to deal with it,
> tho.

I updated the link syntax in maint, so it now requires to escape every
square bracket in the URI part of a link. This should fix this issue.
Please test it and let me know if there's anything suspicious.

Thank you.



Re: managing aggressive link activation within lines?

2019-12-19 Thread Nicolas Goaziou
Hello,

Matt Price  writes:

> Ah, interesting. That makes a lot of sense.  Would it be unworkably
> destructive for me to revert the link syntax locally ? I have no particular
> need  for the new functionality and the current situation has been a
> significant cognitive burden, not least because I make so many typos that I
> am constantly re-editing existing text.

There is no new functionality. The new link syntax is an important step
forward because it solves recurring issues that has plagued links for
years, e.g., when using hex-encoded URL. I don't think reverting it,
assuming it is manageable in the long run, is a good solution.

IMO, it would be more productive to think about what can be done in your
situation instead. For example, one solution could be to require "[[" to
be escaped in a link (current syntax already requires closing brackets
to be escaped in some situations). I'm not yet sure how to deal with it,
tho.

Regards,

-- 
Nicolas Goaziou



Re: managing aggressive link activation within lines?

2019-12-19 Thread Matt Price
On Thu, Dec 19, 2019 at 2:55 AM Nicolas Goaziou 
wrote:

> Hello,
>
> Matt Price  writes:
>
> > MWE:
> > test.org:
> > --
> > This is a paragraph with  [[https://google.com][a link]]
> > ---
> > steps to reproduce:
> >
> > put cursor at beginning of file and type ~[[~.  The paragraph text will
> > collapse into the link definition, and (point) will move to the ~a~ in ~a
> > link~, so manual typing of a new link will fail.  Is there anything I can
> > do to stop this from happening?
>
> IIUC, this is related to the link syntax change introduced in Org 9.3,
> which allows, among other things, "[[" within a link. In this situation,
> once you write
>
>   [[This is a paragraph with  [[https://google.com][a link]]
> ^^
>
> the underlined part becomes the link.
>
> I agree this is not optimal. Yet, I'm not sure about how to deal with
> this.
>
> Ah, interesting. That makes a lot of sense.  Would it be unworkably
destructive for me to revert the link syntax locally ? I have no particular
need  for the new functionality and the current situation has been a
significant cognitive burden, not least because I make so many typos that I
am constantly re-editing existing text.

>
>


Re: managing aggressive link activation within lines?

2019-12-18 Thread Nicolas Goaziou
Hello,

Matt Price  writes:

> MWE:
> test.org:
> --
> This is a paragraph with  [[https://google.com][a link]]
> ---
> steps to reproduce:
>
> put cursor at beginning of file and type ~[[~.  The paragraph text will
> collapse into the link definition, and (point) will move to the ~a~ in ~a
> link~, so manual typing of a new link will fail.  Is there anything I can
> do to stop this from happening?

IIUC, this is related to the link syntax change introduced in Org 9.3,
which allows, among other things, "[[" within a link. In this situation,
once you write

  [[This is a paragraph with  [[https://google.com][a link]]
^^

the underlined part becomes the link.

I agree this is not optimal. Yet, I'm not sure about how to deal with
this.

Regards,

-- 
Nicolas Goaziou