From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ANmvA9fi82H8lQAAgWs5BA (envelope-from ) for ; Fri, 28 Jan 2022 13:34:31 +0100 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 QBv+N9bi82HxDgAAG6o9tA (envelope-from ) for ; Fri, 28 Jan 2022 13:34:30 +0100 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 8AB8D2FC4D for ; Fri, 28 Jan 2022 13:34:30 +0100 (CET) Received: from localhost ([::1]:60654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nDQSS-0006Cz-Te for larch@yhetil.org; Fri, 28 Jan 2022 07:34:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDQ7o-0001uV-Q5 for emacs-orgmode@gnu.org; Fri, 28 Jan 2022 07:13:10 -0500 Received: from ciao.gmane.io ([116.202.254.214]:32800) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDQ7l-0007Ii-VQ for emacs-orgmode@gnu.org; Fri, 28 Jan 2022 07:13:07 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nDQ7e-0004K9-1Y for emacs-orgmode@gnu.org; Fri, 28 Jan 2022 13:12:58 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: [PATCH] Intra-word markup: \relax Date: Fri, 28 Jan 2022 19:12:51 +0700 Message-ID: References: <4897bc60-b74f-ccfd-e13e-9b89a1194fdf@mailbox.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------6SfhDb0vtbPXtlawQBgiLW1Z" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US In-Reply-To: <4897bc60-b74f-ccfd-e13e-9b89a1194fdf@mailbox.org> Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1643373270; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=iwdG3A+17RFxLg5fud0aoTDnBUgwhY3EdWSgnPVoMXg=; b=GuOyNHaL3MOGJvJrY1pJSxrNv9NMkEl2u0vlNpQo1ux4V6VOZhzls9mK+7m1K7jbTJOcso o+wnx+I123b63jRFY3Z0OieLm21WoHBLkqYQiZPzEI2YvIEQb5ejmzXZTGZyt/+0M8mWcJ 2kHjmuyX3ls4TNqm4sjO8PGbYYRw/RJjiOmfVg9ODTF+ytogHXLspFfssA/t2m/RNDuDP9 ALRE0jPziEt5DzJQydfIK+fYDxWQa7oQdXXS4fsWgb1NfUX9V8yFDGH7zeZ3Yq2UOp3+Ig m6jDhfTc301Zq+r6DPlQstoI1Oc5lKcg+Ld15KhAwUVDq4K/NSEVijwN0HU+WQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643373270; a=rsa-sha256; cv=none; b=hIsVtgcOzMAlGEcDCE6DP+fQ32IiS+k0v3toT6c7kFWLsgFBVMaxobkErOoKzkL+gVDCoI ePlchdAmNULLjKe2/7musLIWYNrQaJL4PFNyNM9knsHETMWCamYGN4mY269gbULg+CIztv 8ULlnW8UsL3d1oHlACuJDHipEWzWRliBv8yvbE4M7mSD+/Xn4iaHujNvGjOrEd8dSwZIIL UzRVWm3qwvPNxsGjBvPeWtH+VPlt09H9wTfexeLwAKuqDnjWs09Au0STp/Pd76uoZOcwhx wiQgiHlVhR5tljYMftOpVJuIW6pmVIZQxsFNmBrbkPVoLY8l9CiKZKuJn3XMBg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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: -1.43 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); 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: 8AB8D2FC4D X-Spam-Score: -1.43 X-Migadu-Scanner: scn1.migadu.com X-TUID: PKAgwp2CFzd7 This is a multi-part message in MIME format. --------------6SfhDb0vtbPXtlawQBgiLW1Z Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 02/12/2021 17:50, Denis Maier wrote: > > Currently, org syntax doesn't officially seem to support intra-word > emphasis. Am I missing something? > If the assessment is correct: Is there a reason for this? And, shouldn't > that be officially added? I have an idea how to implement *intra*/word/ markup with minimal change of Org syntax. At first I had a hope that it is enough to introduce \relax entity that expands to empty string, but it does not work for second part of words: *intra*\relax{}/word/ is exported to intra/word/. So it is necessary to support consuming spaces after such entity similar to TeX commands: *intra*\relax /word/ In Org "a\_ b" already behaves in the same way. I do not like zero-width spaces since they are invisible, so they are not really "text" markup. Moreover, it is better to filter them out during export. Another failed idea was to use export snippet or a macro for such purpose: #+macro sep $1 *intra*{{{sep()}}}/word/, *intra*@@html:@@/word/ Important point that suggested solution works for all export backends. I do not consider explicit export snippets as a workaround since it requires code for all backends in org files. --------------6SfhDb0vtbPXtlawQBgiLW1Z Content-Type: text/x-patch; charset=UTF-8; name="0001-Intra-word-markup-relax.patch" Content-Disposition: attachment; filename="0001-Intra-word-markup-relax.patch" Content-Transfer-Encoding: base64 RnJvbSA5NWEwZGNiMTM3MDU3NzQwOTM4OGUxMzdkYWU5OGVjNGMxYWY1YmJkIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBNYXggTmlrdWxpbiA8bWFuaWt1bGluQGdtYWlsLmNv bT4KRGF0ZTogRnJpLCAyOCBKYW4gMjAyMiAxODo1NTo1NCArMDcwMApTdWJqZWN0OiBbUEFU Q0hdIEludHJhLXdvcmQgbWFya3VwOiBccmVsYXgKCmxpc3Avb3JnLWVsZW1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