On 03/09/2021 12:17, Dr. Arne Babenhauserheide wrote:
Using the following text I get failing pdf export: The link is not
recognized correctly but ends after the comma and the markup persists in
the PDF.
/Diesen Text habe ich leicht abgewandelt schon am Montag per E-Mail
ans [[https://km-bw.de/,Lde/startseite/service/kontakt][Kultusministerium BW]]
geschickt. Da hatten wir noch 2 Wochen./
It was discussed earlier.
On Tue, 20 Apr 2021 22:37:31 +0200, Nicolas Goaziou wrote
Re: [Patch] to correctly sort the items with emphasis marks in a list
https://orgmode.org/list/874kg0ae0k....@nicolasgoaziou.fr/ :
Maxim Nikulin writes:
Surprisingly there are still cases when the old approach works better:
(let ((s (org-sort-remove-invisible
"A /wrapping [[https://orgmode.org/?a=b&c=d#e][link]] emphasis/")))
(set-text-properties 0 (length s) nil s)
s)
"A wrapping [[https://orgmode.org?a=b&c=d#e][link]] emphasis/"
I expect "A wrapping link emphasis".
Yet, your expectations are wrong. There is no link in the text above.
Emphasized text starts at "/wrapping" and ends before "/?".
Granted, this is a situation where the Org syntax is not very intuitive.
Anyway, the new function is more accurate.
Maybe we should require a space after punctuation following emphasized
text. I don't know. This is orthogonal to the current discussion.
In your particular case it is possible to use "%2C" instead of comma:
/Link
[[https://km-bw.de/%2CLde/startseite/service/kontakt][kontakt]] link/
As a more general approach, additional emphasis marks can be added
around link borders
/Test/ [[https://orgmode.org/?q=query][/query/]] /test/
While I believe that during parsing of link target lookup for end of
emphasis should be suppressed, I am not sure that it is feasible with
current implementation. That is why I consider such behavior as a price
for lightweight markup and its current parser.