* managing aggressive link activation within lines?
@ 2019-12-18 16:32 Matt Price
2019-12-19 7:55 ` Nicolas Goaziou
0 siblings, 1 reply; 5+ messages in thread
From: Matt Price @ 2019-12-18 16:32 UTC (permalink / raw)
To: Org Mode
[-- Attachment #1: Type: text/plain, Size: 926 bytes --]
Hi everyone,
Not sure if this has always been an issue but with a pretty recent org git
and emacs-git, I'm running into a usability issue with org-activiate-links.
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?
From what i can tell, ~org-activate-links~ was last modified in
1fd07c1eeb0f29de9ce058fac995031413201d4d in late August, but I'm not sure
if that's when this behaviour was introduced, or if it has been around for
a while and I'm only noticing it now. I know many people don't type links
manually, but I do so almost exclusively, so this can be frustrating when
I'm editing existing text.
Thanks as always!
[-- Attachment #2: Type: text/html, Size: 1236 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: managing aggressive link activation within lines?
2019-12-18 16:32 managing aggressive link activation within lines? Matt Price
@ 2019-12-19 7:55 ` Nicolas Goaziou
2019-12-19 11:57 ` Matt Price
0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2019-12-19 7:55 UTC (permalink / raw)
To: Matt Price; +Cc: Org Mode
Hello,
Matt Price <moptop99@gmail.com> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: managing aggressive link activation within lines?
2019-12-19 7:55 ` Nicolas Goaziou
@ 2019-12-19 11:57 ` Matt Price
2019-12-19 13:03 ` Nicolas Goaziou
0 siblings, 1 reply; 5+ messages in thread
From: Matt Price @ 2019-12-19 11:57 UTC (permalink / raw)
To: Matt Price, Org Mode
[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]
On Thu, Dec 19, 2019 at 2:55 AM Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:
> Hello,
>
> Matt Price <moptop99@gmail.com> 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.
>
>
[-- Attachment #2: Type: text/html, Size: 2137 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: managing aggressive link activation within lines?
2019-12-19 11:57 ` Matt Price
@ 2019-12-19 13:03 ` Nicolas Goaziou
2019-12-22 14:00 ` Nicolas Goaziou
0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Goaziou @ 2019-12-19 13:03 UTC (permalink / raw)
To: Matt Price; +Cc: Org Mode
Hello,
Matt Price <moptop99@gmail.com> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: managing aggressive link activation within lines?
2019-12-19 13:03 ` Nicolas Goaziou
@ 2019-12-22 14:00 ` Nicolas Goaziou
0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2019-12-22 14:00 UTC (permalink / raw)
To: Matt Price; +Cc: Org Mode
Nicolas Goaziou <mail@nicolasgoaziou.fr> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-12-22 14:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-18 16:32 managing aggressive link activation within lines? Matt Price
2019-12-19 7:55 ` Nicolas Goaziou
2019-12-19 11:57 ` Matt Price
2019-12-19 13:03 ` Nicolas Goaziou
2019-12-22 14:00 ` Nicolas Goaziou
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).