Hello, I just noticed that the recent updates regarding the bracket link escaping syntax seem to have an issue. Does anybody happen to know how to put a pair of [] around a link without using "zero width space" or something similar? For example, [[[https://somewhere-to-url][My Link]]] does not succeed in exporting to HTML showing "Unable to resolve link: "[https://somewhere-to-url"". [[https://somewhere-to-url][[My Link]]] is not properly exported; the closing bracket "]" is not included in the exported link. Thank you! Best regards, Kiwon
Hello, Kiwon Um <um.kiwon@gmail.com> writes: > I just noticed that the recent updates regarding the bracket link escaping syntax seem to have an issue. > > Does anybody happen to know how to put a pair of [] around a link without using "zero width space" or something similar? > For example, > [[[https://somewhere-to-url][My Link]]] does not succeed in exporting to HTML showing "Unable to resolve link: "[https://somewhere-to-url"". I don't see any issue here. The "zero width space" is exactly for that situation. But, honestly, the fact that it worked differently in the past is the real issue. The current interpretation is correct. > [[https://somewhere-to-url][[My Link]]] is not properly exported; the > closing bracket "]" is not included in the exported link. This looks like a different problem. If you want to include the brackets, you need to escape them, as explained in the ORG-NEWS document, or in the manual: [[https://somewhere-to-url][\[My Link\]]] Regards, -- Nicolas Goaziou
Hello, Thank you for the reply. On Fri, Dec 6, 2019 at 9:33 PM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote: > Kiwon Um <um.kiwon@gmail.com> writes: > > > I just noticed that the recent updates regarding the bracket link escaping syntax seem to have an issue. > > > > Does anybody happen to know how to put a pair of [] around a link without using "zero width space" or something similar? > > For example, > > [[[https://somewhere-to-url][My Link]]] does not succeed in exporting to HTML showing "Unable to resolve link: "[https://somewhere-to-url"". > > I don't see any issue here. The "zero width space" is exactly for that > situation. > But, honestly, the fact that it worked differently in the past is the > real issue. The current interpretation is correct. I didn't know what the issue in the past interpretation was, but I am just not sure whether it's a good idea to enforce that we must use such a special character, which we cannot directly see from the editor. > > [[https://somewhere-to-url][[My Link]]] is not properly exported; the > > closing bracket "]" is not included in the exported link. > > This looks like a different problem. If you want to include the > brackets, you need to escape them, as explained in the ORG-NEWS > document, or in the manual: > > [[https://somewhere-to-url][\[My Link\]]] Unfortunately, this doesn't work either. [[https://www.youtube.com/][\[You Tube\]]] is exported as <a href="https://www.youtube.com/">\[You Tube\</a>] Regards, Kiwon
Kiwon Um <um.kiwon@gmail.com> writes: > I didn't know what the issue in the past interpretation was, but I am > just not sure whether it's a good idea to enforce that we must use > such a special character, which we cannot directly see from the > editor. This is because you are using an ambiguous construct. There are things you cannot do in Org (e.g., starting a line with "|" and expect it to be something else than a table), yet, Org provides a syntax to work around the problem. I agree this is not perfect. >> > [[https://somewhere-to-url][[My Link]]] is not properly exported; the >> > closing bracket "]" is not included in the exported link. >> >> This looks like a different problem. If you want to include the >> brackets, you need to escape them, as explained in the ORG-NEWS >> document, or in the manual: >> >> [[https://somewhere-to-url][\[My Link\]]] > > Unfortunately, this doesn't work either. > [[https://www.youtube.com/][\[You Tube\]]] is exported as <a > href="https://www.youtube.com/">\[You Tube\</a>] Indeed! I forgot about that: the escaping mechanism is for the link part. For the description part, you have to use a zero width space, too. Note that `org-insert-link' (C-c C-l) does that automatically. IIRC, square brackets were forbidden in descriptions (and changed into curly brackets automatically) before that change.
On Fri, Dec 6, 2019 at 10:10 PM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote: > > Kiwon Um <um.kiwon@gmail.com> writes: > > > I didn't know what the issue in the past interpretation was, but I am > > just not sure whether it's a good idea to enforce that we must use > > such a special character, which we cannot directly see from the > > editor. > > This is because you are using an ambiguous construct. There are things > you cannot do in Org (e.g., starting a line with "|" and expect it to be > something else than a table), yet, Org provides a syntax to work around > the problem. I agree this is not perfect. I understand Org-mode has its syntax. I am not saying Org-mode should be able to do everything we want. As you already agreed, I'm just not sure whether it's the best. In my opinion, one of the great advantages of Org-mode is that we can do a lot of things with plain texts, and here I am just little bit unhappy with using hidden characters to escape something, particularly in a plane text file. > > Unfortunately, this doesn't work either. > > [[https://www.youtube.com/][\[You Tube\]]] is exported as <a > > href="https://www.youtube.com/">\[You Tube\</a>] > > Indeed! I forgot about that: the escaping mechanism is for the link > part. For the description part, you have to use a zero width space, too. > Note that `org-insert-link' (C-c C-l) does that automatically. > > IIRC, square brackets were forbidden in descriptions (and changed into > curly brackets automatically) before that change. Right, that seems to be the only option for now. I may use zero width spaces or other parentheses around links. Thank you for your time again. Best, Kiwon