From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YKUTHnYn8GHCdwEAgWs5BA (envelope-from ) for ; Tue, 25 Jan 2022 17:38:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id WHNzG3Yn8GGthAAA9RJhRA (envelope-from ) for ; Tue, 25 Jan 2022 17:38:14 +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 21A933ECC1 for ; Tue, 25 Jan 2022 17:38:10 +0100 (CET) Received: from localhost ([::1]:58258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nCOpc-0007oC-EB for larch@yhetil.org; Tue, 25 Jan 2022 11:38:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCOfw-0005WO-9p for emacs-orgmode@gnu.org; Tue, 25 Jan 2022 11:28:08 -0500 Received: from ciao.gmane.io ([116.202.254.214]:39338) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nCOfo-0005CZ-Az for emacs-orgmode@gnu.org; Tue, 25 Jan 2022 11:28:06 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nCOfm-0002zu-FW for emacs-orgmode@gnu.org; Tue, 25 Jan 2022 17:27:58 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: [RFC] Creole-style / Support for **emphasis**__within__**a word** Date: Tue, 25 Jan 2022 23:27:50 +0700 Message-ID: References: <87zjl6ktu2.fsf@gmail.com> <87mwgimiqm.fsf@gmail.com> <8761n5r56f.fsf@gmail.com> <87fspd72t1.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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: 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, NICE_REPLY_A=-0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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=1643128690; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ux5fdpdNSfhht87A+7Z87daAjyTrYe6VsGgQRmYUAc0=; b=VBx0gMn02vZBKWEl/PQqcr/KKJqWwixYQTWTjECHWAs1KGfIKBqsZBSa2Us3delUD1WiNK UcyRvWElFTYEvJmeXUu7jdTuPQj0ja9MZv3TYoBQJAMuiDTV9rQPEBxob9wepn4fXEOgOa fDtEl0cYBlCvzVJ6mP7TokqYIQK0KAcKes9Q4d7z/h9CdrwzGkEUal0nt+yaeLE0eTGuqf 4HQOCv8seIIF5rUs1mwCcdWaxuelegZI6aQyDm3JWyr1ywz6t9VRjeIjc3sV60D2w7rnUM W1o86Ty7NQuhCow7hRjXBbRDIinLXoXyREgBL2bUN99LQsCmMa8r17ZmCF0luw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643128690; a=rsa-sha256; cv=none; b=WHKYO35ia0JQ1DlRkMMsDO3P53KN6XAM0u+zOTXYUmcu9AByTpBdzZW5xW2GBNWQt93TvP KytbiZ2zH7AHUEbrLFQ6LZyK2k/WC5CGeK6ZkRW5AWfyuBxmHqSfO7jOlruSUQGEDi0MKN fwcpikB4T5j/MonCOXb7yeonPp4JsglCM9Hh6iDSFyiam0/UJPgGwnbEZQkL168IJQrwwe Bzb89EwL/8j/68XIdMVyhPF/kGgeoQphYcJSWHeEckPTyCUZTjHFFxU1teG5j5ixgqxiOz GcJtt7O78BZMQSVyCBQp1Dm938atMokUpa1GKb8BjstWsslay58KfxGw/YEjIw== 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: -2.53 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: 21A933ECC1 X-Spam-Score: -2.53 X-Migadu-Scanner: scn1.migadu.com X-TUID: 4mN0IKFrxS4b On 24/01/2022 19:32, Vincent Belaïche wrote: > > Thank-you both for the reply, I should have mentioned that I am aware of > this trick but it works only for document encodings which have the > zero-width space, like UTF-8, I was after a fix for documents in > ISO-8859-15, aka latin-9. I have a hope that 8bit charsets will disappear soon. UTF-8 alleviates issues with incompatible charsets used for the same alphabet. You can use a trick with custom links, it has some limitation, but it is charset-neutral. See below for details. [[sep:][~--some-cli-option=~]][[sep:][/some cli argument/]] > Vincent Belaïche writes: > >> Sorry to dig out this almost 8 year old discussion, but after looking >> into the git HEAD Org Mode manual (v9.5 or so) (info "(org) Emphasis and >> Monospace") node, and after looking into the mail archive I could not >> find any answer to this question: how to switch style within a word. >> >> I would like to put something like this in an OrgMode document: >> >>   ~--some-cli-option=~/some cli argument/ You are a bit late. It was thoroughly discussed a month ago: Denis Maier. Org-syntax: Intra-word markup. Thu, 2 Dec 2021 11:50:32 +0100. https://list.orgmode.org/4897bc60-b74f-ccfd-e13e-9b89a1194fdf@mailbox.org/ Eric S Fraga. On zero width spaces and Org syntax. Mon, 06 Dec 2021 11:40:57 +0000. https://list.orgmode.org/87r1aqj706.fsf@ucl.ac.uk > A very strong +1 on this. Org has enough /escape mechanisms/, as you > call them, to cater for special cases, and these include @@...@@, babel, > and filters, amongst others. The simplicity of org is a major > advantage. Actually I had expectation that export snippets or macros may help in such case. I can not say that results the following observations are intuitive for me. ---- >8 ---- #+macro: first $1 - Custom link #+begin_src elisp :results none :exports both (org-link-set-parameters "sep" :export (lambda (path desc backend) (if (org-export-derived-backend-p backend 'org) (org-link-make-string (concat "sep:" path) desc) (or desc "")))) #+end_src + Requires evaluation of elisp code. + May be defined to remain on its place after export to Org. + May be defined to completely disappear during export to other formats + Does not allow to put a link inside or to be put inside a link. + Does not deactivate markup when put inside: *[[sep:]]bold* /italic[[sep:]]/. + May be placed immediately after markup /inter/[[sep:]]word. + Deactivates following marker inter[[sep:]]/word/. + Markup may be placed inside description + [[sep:][~--some-cli-option=~]][[sep:][/some cli argument/]] - Zero width space + Invisible, so not really plain text markup. + It persists in export result, so a filter is required. + =C-x 8 RET 200B RET= + ~--some-cli-option=~​/some cli argument/ - Export snippet + For some reason =ox-org= does not define ~export-snippet~ transcoder, so they will be pruned during export to org. + May be used to deactivate markup: @@s:x@@*not bold* /not italic/@@s:x@@ (must be put outside). + Does not deactivate markup when it is inside: *@@s:x@@bold* /italic@@s:x@@/. + Does not help when it is necessary to activate markup without a space inter@@s:x@@/word/ /inter/@@s:x@@word. - Macro is useless (besides deactivation of markup when combined with export snippets in definition) + Beware of commas: {{{first("missed" after comma disappears, missed)}}}. + Not survived after export to Org. + Can not be used to activate markup in any form: not{{{first(*bold*)}}}, {{{first(*not*)}}}bold, not{{{first()}}}*bold*, {{{first(not)}}}{{{first(*bold*)}}}. + Can not be used (without e.g. export snippets) to deactivate markup. Still {{{first(/)}}}italic{{{first(/)}}} and broken second macro.