From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id UI3NCU4I4GJB3QAAbAwnHQ (envelope-from ) for ; Tue, 26 Jul 2022 17:29:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eATGCE4I4GLTHAAAG6o9tA (envelope-from ) for ; Tue, 26 Jul 2022 17:29:18 +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 C03DA243DB for ; Tue, 26 Jul 2022 17:29:17 +0200 (CEST) Received: from localhost ([::1]:53462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGMUm-00028r-BR for larch@yhetil.org; Tue, 26 Jul 2022 11:29:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGMTM-0000nV-CQ for emacs-orgmode@gnu.org; Tue, 26 Jul 2022 11:27:48 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:42835) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGMTK-0007Gt-3A for emacs-orgmode@gnu.org; Tue, 26 Jul 2022 11:27:47 -0400 Received: by mail-ed1-x530.google.com with SMTP id m8so18123009edd.9 for ; Tue, 26 Jul 2022 08:27:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=nqetvLsjezOmxKy7ChtKaT/Lm2WV+VQTNe6O/W3TSaI=; b=nYU32reAM2YxPpn7KxLOeTdIWbgPpAQug7Ucgugp6igh69Av5gOZexLe4J6e1s4I6C FGzq0p9HcpzFtP4VfOxF69i4sJmMypLjB36l2JuNJX399RDzGx93G12cAOgbsOYCTT08 ZmVTY+qLHkzlyfJkq4upVOFnDfrOG9R+9vGTFKckkYBBW7NXd5dyweMBuXPzZx5DmNly fFa/HJdbUIHsF8r+vPP7fN0PtRDRUO1LrHZfxfLhoXDUOR27/IxtwvhItemrv+GWRYqv +vSyl9x5LlY7+x+8L10/Ux+jmnjCNaWaJW1qnBmXjAT8v/8MyVHjFXopS6CTszYu2SSK pTnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=nqetvLsjezOmxKy7ChtKaT/Lm2WV+VQTNe6O/W3TSaI=; b=IsLSey0LRvcnpL87z8T7fMPtOAWAtJNpi0lxAyIHot9r2Zg/kcaB8rDMtcEH4g5KAO 32MiAxKXOQ0jWon9aYM2mcNRoPTiVKXi9HNCW5i3ULZhRZxy9zu2aVmSuC1ygDZNC1hI mvoP3fDmP1thQ38vxB86iVAeRRWbVc0aLcfCbQTWhDBfSb30YwzYTZ41ICKdjGDJluTF evEOIJEXRKA5p1kr+QY+Ivf2S3FwEsPX6idZtXmcrUkemJ7IMaqDTPMv8PR5tqJ2sQzr KK57kBfvzZYngN4zbLnHXg0sfyXw2c170+QNT4QBc+ay9zwyWZDbyyhrCYcDzCQ9YALO uznQ== X-Gm-Message-State: AJIora8BXUd0I3uK2P4esvxOYcw5G6jWpMPa3tMpAlUQixuHWFf+7SM3 P7KVY6fSGKsLAMZhpp7dpxZBW2cVdKveMzSw6X8= X-Google-Smtp-Source: AGRyM1u5BoCp3tH1t+N1JhCtfO12NZBFK+HTHeNz5KUBrOH0ZyOTwbXQxn16UPO8S3NRgkzcmL/YU6oTy+t+v56zHzk= X-Received: by 2002:a05:6402:40cb:b0:43b:e909:f7cc with SMTP id z11-20020a05640240cb00b0043be909f7ccmr13637377edb.111.1658849264503; Tue, 26 Jul 2022 08:27:44 -0700 (PDT) MIME-Version: 1.0 References: <87r128d5pp.fsf@localhost> <80f0990042a564556cc6b047a94f7e9dddf5a280.camel@outlook.com> <87v8rkav2x.fsf@localhost> <87sfmorlh0.fsf@tec.tecosaur.net> In-Reply-To: <87sfmorlh0.fsf@tec.tecosaur.net> From: =?UTF-8?Q?Andr=C3=A1s_Simonyi?= Date: Tue, 26 Jul 2022 17:27:33 +0200 Message-ID: Subject: Re: [PATCH] org-export: Remove zero-width space escapes during export To: Timothy Cc: Ihor Radchenko , K K , Max Nikulin , emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::530; envelope-from=andras.simonyi@gmail.com; helo=mail-ed1-x530.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" 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=1658849357; 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=nqetvLsjezOmxKy7ChtKaT/Lm2WV+VQTNe6O/W3TSaI=; b=JnX711m9F2UTbOA4dH6+p1pnQxFhyV6IVWHN52hh1j+c07LyHntkcjkyrArEd1S5e5SwNC 4gUW1//Gu41cw4VgKsP4MFEcbFc0WJ2lQOnGEiXLHmqu/eyoDpWKFwauhBEj0K5tocNkAs G9mKNpg9O4m9C4mWHW0xwPlVb8vYLFEEc7ASdOcQeJJ1xqc870UV3nibW5lqI3a6Tzyp6x EBaPeh0iHRamVnhmbvQgOryNxlaYMkBfjYojcfrmh+8H6dyiHiTYhtT7XFMn6JyVO4WkhG 725y4k5X77XVjKh0U4H7wLV1RuDzPBCXMxZGbD8X7jNAoKOUbqtyhKU3ktd09w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658849357; a=rsa-sha256; cv=none; b=C890/B+LKGOGCgexdLYqr6CHzn8jgmp/GdcTv+bS3Ben2phaFuMUFa+/EVzUrmGNwhw/23 LzVyAZhLKM4xQKi0fZB9F7np+2pEH6aX01Fl67ggOgbUXMsU7Wvk3nfH26veqaWb2i/ncG 8Llv0dMsD9JrIZfgKJa4O/Rv9AxzNlgjjW8Ie1xG62ma8sjfGOZyitKMEgkuzBi3lEJT5u cMFqp8yiVlOFnES6JjYqtDrnJiiCMcL6pXrOL1Lj0vLrwmxG/uS1HFzgy0d47VSdJXysjI Dw0Oon4acPkyeYSHp+6jPgaZhO4+FmHdTKC1QIMfAmu/tHbWeGsz6ZwfPXBUGA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=nYU32reA; dmarc=pass (policy=none) header.from=gmail.com; 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: -7.23 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=nYU32reA; dmarc=pass (policy=none) header.from=gmail.com; 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: C03DA243DB X-Spam-Score: -7.23 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3wH2kQXtDvhs Dear All, this might be a very stupid question as I'm not familiar with the internals of the Org export engine, but couldn't this change lead to problems with the Org-to-Org export of documents containing these "semantic separators"? thanks and best wishes, Andr=C3=A1s On Tue, 26 Jul 2022 at 16:52, Timothy wrote: > > Hi Ihor, > > > I am attaching a tentative patch that will make Org export remove > > zero-width spaces when those spaces actually separate the object > > boundaries. > > > > Any objections? > > IMO this is an immanently sensible idea. I added an export filter like th= is to > my config basically as soon as I found out about zero-width spaces. > > One minor quibble, I find the name mildly misleading. When you say =E2=80= =9Cescaped=E2=80=9D I > think of escaped characters, which isn=E2=80=99t really connected to what= the zero width > does. I=E2=80=99d personally be inclined to call the zero width space an = =E2=80=9Cinvisible > semantic separator=E2=80=9D. > > > +(defun org-export=E2=80=93remove-escaped (data info) > > + =E2=80=9CRemove escape symbols from plain-text in DATA. > > +DATA is a parse tree or a secondary string. INFO is a plist > > +containing export options. It is modified by side effect and > > +returned by the function.=E2=80=9D > > How about: > > =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > =E2=94=82 (defun org-export--remove-semantic-separators (data info) > =E2=94=82 "Remove Org-specific semantic separators from plain-text in D= ATA. > =E2=94=82 DATA is a parse tree or a secondary string. INFO is a plist > =E2=94=82 containing export options. It is modified by side effect and > =E2=94=82 returned by the function." > =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > > All the best, > Timothy