From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
Received: from mp10.migadu.com ([2001:41d0:2:4a6f::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms5.migadu.com with LMTPS
	id QNKhN+Aq42KbjQAAbAwnHQ
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Fri, 29 Jul 2022 02:33:37 +0200
Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp10.migadu.com with LMTPS
	id gFGYNuAq42KeEAAAG6o9tA
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Fri, 29 Jul 2022 02:33:36 +0200
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by aspmx1.migadu.com (Postfix) with ESMTPS id 62E80C855
	for <larch@yhetil.org>; Fri, 29 Jul 2022 02:33:36 +0200 (CEST)
Received: from localhost ([::1]:56188 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	id 1oHDwd-00054l-0B
	for larch@yhetil.org; Thu, 28 Jul 2022 20:33:35 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:41078)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <maciaschain@posteo.net>)
 id 1oHDw1-00054R-Db
 for emacs-orgmode@gnu.org; Thu, 28 Jul 2022 20:32:57 -0400
Received: from mout01.posteo.de ([185.67.36.65]:37367)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <maciaschain@posteo.net>)
 id 1oHDvz-0006hb-1G
 for emacs-orgmode@gnu.org; Thu, 28 Jul 2022 20:32:57 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 93F7024002B
 for <emacs-orgmode@gnu.org>; Fri, 29 Jul 2022 02:32:50 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1659054770; bh=xcrCouPqz5Fq7wMp08TnFXpkdS9TEfMctzQhqWSgvp8=;
 h=From:To:Cc:Subject:Date:From;
 b=n1NicRZQIbz3XC5B0pgyIDRNLNvGyb1XpYG4I8UYMu2kbDb8xFBR0GBVvEeEOHWc9
 s/+kmm99e1Txt+6gmPKk7G+jyceTBn5UEzgnhG+jMWo18QLbhV2QeDIt5kcuBTJwL3
 n7pZ1C5SvDWqHN4yUNJFL0eqXRdNkUSlDxfWlnJLWX8SZ237zQ8XC/Wkr6rqOoBt0Q
 hxy4x/cx+webYvP4U8M0eECp6bSKBxgeOBPD3LpzIiSWPW2RmrFkPsZeJgIPtloIzR
 yLKShAhIhqRl5epHPiA0xv1E2ITLDbQhOY3PxcU4HjntC9ics6RDs329Sxye/W5VHR
 g3t/ESEM9FJFw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Lv7lP63GXz9rxK;
 Fri, 29 Jul 2022 02:32:49 +0200 (CEST)
From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= <maciaschain@posteo.net>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] Add new entity \-- serving as markup separator/escape
 symbol
References: <BY5PR10MB4289167298649297E045360996959@BY5PR10MB4289.namprd10.prod.outlook.com>
 <87r128d5pp.fsf@localhost> <tbnj6u$11sv$1@ciao.gmane.io>
 <80f0990042a564556cc6b047a94f7e9dddf5a280.camel@outlook.com>
 <87v8rkav2x.fsf@localhost> <87mtct9y1f.fsf@localhost>
Date: Fri, 29 Jul 2022 00:32:49 +0000
In-Reply-To: <87mtct9y1f.fsf@localhost> (Ihor Radchenko's message of "Thu, 28
 Jul 2022 21:17:32 +0800")
Message-ID: <871qu4lpvy.fsf@posteo.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@posteo.net;
 helo=mout01.posteo.de
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: emacs-orgmode@gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=subscribe>
Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org
Sender: "Emacs-orgmode" <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
X-Migadu-Flow: FLOW_IN
X-Migadu-To: larch@yhetil.org
X-Migadu-Country: US
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1659054816;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:cc:mime-version:mime-version:
	 content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references:list-id:list-help:
	 list-unsubscribe:list-subscribe:list-post:dkim-signature;
	bh=xcrCouPqz5Fq7wMp08TnFXpkdS9TEfMctzQhqWSgvp8=;
	b=p9Pzlcar9TBeK0bCdrEkvFMwXwuR+AUGpjVK4I5kZ15RMJVXJnoep+69c1Cgc2kGUE8yKy
	yaoUUjrTltfkgB9h0H/y6DqJqSJZarkbNBFOFGZuf75LpSRzYFjfn6pV+kyENogiu+eEaJ
	Z6Sigmaa0a47C06CNt55wF4/xxcVvQLkHXc5tQZCfLDzO3EvzHur4OLe6erAUOC5kiSGnc
	sO/5QziEWZuHME/ZjxlLlwDeQpA6DqiDYQb1Kzr4Pdzahl7rUrvgdy0jPoWlHJziGPrld7
	2DNeCuiEd3yXYWPjSEzIWGdHBe7J950Iv70/UXoPWzTk91iQAb+vkT6lS/1MaA==
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659054816; a=rsa-sha256; cv=none;
	b=QW6tWABmh2JYcwkx5Ccii0StjdWawax6DjdELLY1OvUjAC96sKAKpPDTDQsqT+2izKB3qB
	JA8/RHrvgLiFJptbwoNc2hAFu8LWtZlmrIVaFq9inlCQYzQJbimCVU8+WIkEo/GgJoP92c
	ODQnfrYYErxxB5cDqdRSYzsC/5UH3+WO3QO3pK3PjJeWOmfj3tHqRIF3gYhYtvGx9D9btk
	X5kqgAE+n6vARS8rb+LYM+nSVUtDnhHTSKHSGb31BugbiOmY0WkFyBtO8/IMGDSc1b60Zt
	X4/zLDsgoWbC2prREzhsV+5Ua2v5M1+r/Rd1cJs+d3wRu6MHPmC/GBoCZbuE6w==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=pass header.d=posteo.net header.s=2017 header.b=n1NicRZQ;
	dmarc=pass (policy=none) header.from=posteo.net;
	spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"
X-Migadu-Spam-Score: -3.93
Authentication-Results: aspmx1.migadu.com;
	dkim=pass header.d=posteo.net header.s=2017 header.b=n1NicRZQ;
	dmarc=pass (policy=none) header.from=posteo.net;
	spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"
X-Migadu-Queue-Id: 62E80C855
X-Spam-Score: -3.93
X-Migadu-Scanner: scn0.migadu.com
X-TUID: 4Pw1rmosbLg6

Hi, Ihor,

Ihor Radchenko writes:

> Given the raised objections, zero-width space does not appear to be a
> useful escape symbol because it has its valid uses as a standalone space
> symbol.
>
> The raised objections can be solved using some kind of intricate
> heuristics, but I do not feel like it is a good direction to go. The
> code will be too complex and fragile.
>
> Therefore, I am proposing a different approach for shielding
> fontification: introducing a special entity.
>
> The new entity is \--, which is a valid boundary between emphasis
> markup. It will be removed during export (replaced by "").
>
> "\--" specifically is somewhat arbitrary choice. The actual requirements
> for the entity name are: (1) No clash with LaTeX (which is why simpler
> \- would not cut it); (2) Being a valid markup boundary: entity must end
> with (any space ?- ?\( ?' ?\" ?\{).
>
> I am attaching a tentative patch introducing the new entity. Note that
> some minor tweaks to the parser were needed. I do not see it as a big
> deal - the current entity regexp has much more cumbersome exceptions.
>
> Also, the patch will not work correctly on org =E2=86=92 org export, simi=
lar to
> pointed in one of the replies to the previous abandoned approach. I do
> not want to address it here because a much more appropriate solution for
> this issue is changing org-element-interpret-data.
>
> Consider (org-element-interpret-data '("asd" (bold () "bold") "bsd"))
> This will return "asd*bold*bsd", which is not correct even though the
> given Org datum is not wrong by itself - such things can easily appear
> when user filters are applied to parse tree during org=E2=86=92org export.
>
> Otherwise, the patch should be good enough to play around and kick-start
> the discussion.

I'm late joining this thread, although I am particularly interested in
the topic.

I can't make any technical comments because I haven't had time to test
the patch yet, but I have to say that your idea of using a special
entity seems to me the best approach to the problem. I would vote for
this to be the way to go.

I believe that using the zero width space character as an escape
character is not a happy idea, and I have already left my arguments in
some other thread, long ago. The zero width space is a random
workaround, but should not (in my opinion) be part of the markup. For
various reasons: it is not an ascii character, there are certain
contexts in which it can produce an unexpected result in LaTeX, etc. In
addition, the zero width space, as an escape character, has a curious
anomaly: it is an escape character that does not have a plan B and a way
to escape the escape character when you want to use it by itself.

I also like the idea of using a special entity because it is not
necessary to invent anything new and it takes advantage of an existing
resource.

Well, that's my opinion.

Best regards,

Juan Manuel