From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aIwvBC6DsmFy0QAAgWs5BA (envelope-from ) for ; Thu, 09 Dec 2021 23:29:02 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sFxiOy2DsmE8PAAAbx9fmQ (envelope-from ) for ; Thu, 09 Dec 2021 22:29:01 +0000 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 60EEE924F for ; Thu, 9 Dec 2021 23:29:01 +0100 (CET) Received: from localhost ([::1]:40320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mvRuN-0002aa-Aj for larch@yhetil.org; Thu, 09 Dec 2021 17:28:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvRsn-0002Zz-3j for emacs-orgmode@gnu.org; Thu, 09 Dec 2021 17:27:22 -0500 Received: from mout02.posteo.de ([185.67.36.66]:58185) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mvRsh-00028R-3X for emacs-orgmode@gnu.org; Thu, 09 Dec 2021 17:27:20 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 902E0240103 for ; Thu, 9 Dec 2021 23:27:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1639088831; bh=GCfVW2G/eWmbz2rsvPA5hv3ghwo8TtEUbCPZobyAzQg=; h=From:To:Cc:Subject:Date:From; b=Vd+KbdkQG1HX25BpFKCIJUUcCoqdQ1KOnPnroz9q8WGJnLnNOI4SGmWjyESzU26Bw YWlKA51qoQf9J92ZF/3RHxOVufjKvknhaPW0J4fO/L9vkDcjIBjG1CihRnMXxYmlQX y3bmFfLLA2mON7FEyMZpCSvIaZrwhFm3UFVd+lpmoW+4aPPHQEUjQCgNZg0zPhVNnI rasvK4o1/LJ1dQmTYWJ5mdlpUvAToI/3pFMjwvFFZBorSN3RxHb2gqxxSOXFRw+wwz z7FFw6ovm5oiqJf3HmXeHmvE0oYKYLrfP48WE3tWT63wgZJ6Q0n2ysuclVaEqFi/pl N3cvw9wSzLT0A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4J97v302k2z9rxM; Thu, 9 Dec 2021 23:27:10 +0100 (CET) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Maxim Nikulin Subject: Re: Raw Org AST snippets for "impossible" markup References: <4897bc60-b74f-ccfd-e13e-9b89a1194fdf@mailbox.org> <87fsrbp673.fsf@gmail.com> <1ef0e093-c165-2a5f-954d-6a33b64c8ee9@mailbox.org> <87r1avgnpi.fsf@localhost> <878rx2bzhw.fsf@nicolasgoaziou.fr> <9525e029-a590-3f48-df64-ffb9176075d9@mailbox.org> <87k0gh68ke.fsf@posteo.net> <8735n2hehj.fsf@posteo.net> <87lf0u8dnf.fsf@posteo.net> <87wnkdiwrd.fsf@posteo.net> Date: Thu, 09 Dec 2021 22:27:08 +0000 In-Reply-To: <87wnkdiwrd.fsf@posteo.net> ("Juan Manuel =?utf-8?Q?Mac=C3=AD?= =?utf-8?Q?as=22's?= message of "Thu, 09 Dec 2021 16:11:18 +0000") Message-ID: <87y24txvlv.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.66; envelope-from=maciaschain@posteo.net; helo=mout02.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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , Cc: orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639088941; 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=Y0741L/q6r4Dn9xysJIo2ONZZrAIoAeFGEoh2yUQMU8=; b=oouvnQ0L2ZBjgZtlTketuIw0ycLL12y0vDs9AnWC6HnhXrnHyP08PhTT4zOiGPbdKBy2j7 HT2kUIgHYfUeKWxTgO35elPlSbQ6G4dn2+NA1fheQbvM3wp5151D1kOpzu4/YW/A/+/Uuc D7Y1drmOA/RPwYun/LEVBcQr7kOWfgVpFuo+xGSRn+otvcGjWU+RLt63SJHIj50zII8Knf r+ESrZhdh63di+9bwONoKHA41pEz4IOG1dODHYqiDC1GzVtn0crRjqkZoV/SHavasS2+4a Fcn9q0p+0ZBFLwIlSvTeEbHxWq5SuxAVsGcOsbm53n/8TX9PZVwTsjOBZtpZ+A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639088941; a=rsa-sha256; cv=none; b=pS4x3i9L9FSm3sHSn6qfoA/JdGcsFLffP/uRl1D9jxcrBDuu88JYtsfWhhkCe8vyBklA4U s+uCQtj7Ka0eIyOj0+kD6MyJ29WZbhRvWCwcD9hF6w4y9bE6rZtIXJTmQz/GbhLYauDIMs DYem1VzPQherK1Ojme8Z9cJF0cd0jXAgDDXATE36koIhYexoZ2fANUhS0xxJ4hDaSis8RJ 8UnHySwp/74iuIjg7z8JLot8g61MGYu2essylA8K/RkUk3iU5Q+zeyr/WHfjfP8OYPIB9r qynNIU2ndjTuLcRJbfDNo7mfb0Wn4EAkgNn1drOwZWA+lHhxfM/ObAWu/nuWnw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Vd+KbdkQ; 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: -4.36 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Vd+KbdkQ; 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: 60EEE924F X-Spam-Score: -4.36 X-Migadu-Scanner: scn1.migadu.com X-TUID: bynzTwWzP8Mq Juan Manuel Mac=C3=ADas writes: > Jumping into the "real world", how about these two examples of nested emp= hasis? By the way, what do you think about allowing the use of some kind of aliases, so that the aspect is less verbose? Maybe something like "(i::" instead of "(italic () ..."? I came up with this hasty sketch over your latest code, *just* to see how it looks (I don't know if I prefer it to stay verbose): #+begin_src emacs-lisp :results silent (setq orgia-alias-alist '(("i" "italic") ("b" "bold") ("u" "underline") ("s" "strike-through"))) (defun orgia-replace (before after) (interactive) (save-excursion (goto-char (point-min)) (while (re-search-forward before nil t) (replace-match after t nil)))) (defun orgia--transform-path (path) (with-temp-buffer (insert path) (mapc (lambda (el) (orgia-replace (concat "(" (car el) "::") (concat "(" (cadr el) " ()= "))) orgia-alias-alist) (buffer-string))) (defun orgia--transform-link (data) (if (not (string-equal "orgia" (org-element-property :type data))) data (let* ((path (org-element-property :path data))) (if (not (eq ?\( (aref path 0))) (or path (org-element-contents data)) (read (orgia--transform-path path)))))) ;; <=3D=3D=3D=3D ;;;;;;;;;;;;;;;;;; #+end_src #+begin_src elisp (org-export-string-as "An word" 'odt t) #+end_src #+RESULTS: :=20 : An interword #+begin_src org :results latex :results replace [[orgia:(i:: "The English versions of the " (b:: (i:: "Iliad")) " and the= " (b:: (i:: "Odyssey")))]] #+end_src #+RESULTS: #+begin_export latex \emph{The English versions of the \textbf{\emph{Iliad}} and the \textbf{\em= ph{Odyssey}}} #+end_export ------------------------------------------------------ Juan Manuel Mac=C3=ADas=20 https://juanmanuelmacias.com/