From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MLoBMhV5qWJeuwAAbAwnHQ (envelope-from ) for ; Wed, 15 Jun 2022 08:15:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id QLcIMhV5qWK/KgEA9RJhRA (envelope-from ) for ; Wed, 15 Jun 2022 08:15:49 +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 79EE13F755 for ; Wed, 15 Jun 2022 08:15:49 +0200 (CEST) Received: from localhost ([::1]:43180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1MJg-0006xx-7H for larch@yhetil.org; Wed, 15 Jun 2022 02:15:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1MGZ-0006wx-Pu; Wed, 15 Jun 2022 02:12:41 -0400 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]:43742) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o1MGW-0004jD-I2; Wed, 15 Jun 2022 02:12:34 -0400 Received: by mail-pg1-x52c.google.com with SMTP id s135so10469857pgs.10; Tue, 14 Jun 2022 23:12:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=SoMOADIQYhSeGbKtTtZewLYuos+hM+xQrZkwqXjPeZ8=; b=fPipLXOwKcdl3qBU3k8N3Pp5rXMP5M5LN5FJkyTpTlGx0NDlwIX4+fB1DWhSQ2Pn2W XWZSi7iOX5bD7JyZ34ZuLenmLf8re6YKYoiUwWcUhSFB8D67PHE/VuetnYKXRt7X0Tpu 0Xv7lOr0Fmq8AR7Sh7bgGywBKGA6f1sfoiNWByHIl3xX9NSHgMyv7UwHn2XPDVszIWOe g2ghdhLpNK4Cg3xyhQ/8bfEHPrm6q737KGBFRXqT9bnSf902yUUdSWaM23pK5O/LiCCE 40TPlCNehtzc3rld2gQTgb5RtoZOML529nNke8oMfD/uvFeHWBGq6HnlDwNlHQmQ8j5P 33eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=SoMOADIQYhSeGbKtTtZewLYuos+hM+xQrZkwqXjPeZ8=; b=EtB7xB9M3FUxuNavqkOGzL/n0qxFltB+IODeIsfczH0vb51jzhl9C0AnyqsKhAKr8f bFYtWBi8E50UcE4VdJlh/Bwz2lOOVB8SZdn2Yc5kyR2os7yVw7XtrqiosQXSQ+js4aXt iQqP20t8q74CSy5gckOOuVQ9Il7Ky8+biEd2hO6xYExuCGZm2Wg8ja8lisoMGdd2w2nB fjxEZjERiGBfPzO/YqPEcYikv/UEw/FYPLCoOQNhuGflx5CXxrRngTciuJBPsrhYWdU7 JJqU/TnDvoUkqwtW4pQoUQMZYOKLbQSf4B4U0E4IlkVrFH0SLy+eAUDjHuuh/yDj7ElR zrUA== X-Gm-Message-State: AOAM532RX7jxukQlWSWMNuvr0MVRXHAofXte0feFJjp1jfCZ8PuX5kvS /KyXfCojfnGlNTOTLhwsv54= X-Google-Smtp-Source: ABdhPJws7u9jsSZPUf7aYMMvAVJa3SRnyiq2piscUQuicj2zbBSHSQFPS+EOqp0H+FckcdbMJaLcVg== X-Received: by 2002:aa7:8ec6:0:b0:51b:c6ec:5ff5 with SMTP id b6-20020aa78ec6000000b0051bc6ec5ff5mr8177708pfr.5.1655273549796; Tue, 14 Jun 2022 23:12:29 -0700 (PDT) Received: from localhost ([155.94.207.39]) by smtp.gmail.com with ESMTPSA id q18-20020a63bc12000000b004088f213f68sm5038453pge.56.2022.06.14.23.12.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jun 2022 23:12:28 -0700 (PDT) From: Ihor Radchenko To: Robert Pluim Cc: rms@gnu.org, theophilusx@gmail.com, eliz@gnu.org, monnier@iro.umontreal.ca, acm@muc.de, emacs-devel@gnu.org, emacs-orgmode@gnu.org Subject: Cusom special block export, similar org org-link :export parameter (was: Org mode and Emacs) In-Reply-To: <87zgifxt48.fsf@gmail.com> References: <87ee038ipt.fsf@gmx.de> <87o7z61v59.fsf@gmail.com> <87bkv527p5.fsf@gmail.com> <835yld93w7.fsf@gnu.org> <877d5t0yrn.fsf@gmail.com> <87r140yuof.fsf@gmail.com> <875yl9e7zm.fsf@gmail.com> <83czfh12kp.fsf@gnu.org> <87pmjhghu2.fsf@localhost> <835yl910gp.fsf@gnu.org> <87wndndbhq.fsf@gmail.com> <874k0qbrhe.fsf@localhost> <87v8t3wfgd.fsf@localhost> <87zgifxt48.fsf@gmail.com> Date: Wed, 15 Jun 2022 14:13:37 +0800 Message-ID: <87edzqv4ha.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::52c; envelope-from=yantar92@gmail.com; helo=mail-pg1-x52c.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, 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=1655273749; 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=SoMOADIQYhSeGbKtTtZewLYuos+hM+xQrZkwqXjPeZ8=; b=DnQukIN/chIgs1ylOScFKEfcbyKuFSTua/KgO3laECUqmzVS9TAjk3lqTbnAJsJZaOT05i VsXWfBCdCOvoYuf8FI02vL00s4JlGdEQhCbIYjHTNjjUf/av108aYoKWz5q1Ood6KDwzJi kFYx8A/66ijT07uyPyRfzOyGhzRLDU5aw8POmdl78q98HUBgIP/FW3v0aumcuZbFZrRP9d jWhSrzmzn8U9zbLZPzNI9E6RyN4mubgchQUxXlctZ9SRLM6RSEv19LFx7gnX4hFsChWhem 0AzGkWQK9bzq7HPNGvH5nGucnPfCp5Ko6XHZksHIb0NrNyclpIDo98i6Z+8pWg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655273749; a=rsa-sha256; cv=none; b=GEm/GVy+y1FM1WbATpLIOVICJI55Ch67B712BdP0WU9xi3RnXVgC9Z2T16Psj1qaAeshWU 22Ga6jXh8zjVBddbPTUCk6XdDTBh00HLUqUWL4AYcqLAhxm8uf01HjSQ9ONqJAU8BzqZp0 pd+ioFn9oRSrEhEi3eT0Ccym3CNcZfeb5aikVjKrDErOVgyYz5FNqXzuAL5oXxM2qQZZAy eebf7Myna1zfZLU5l8om+KfI1GAMv7+V4yhIZmcBkKr/0dwv6KakMuTgDlxvOJwOgci2ov xrjksB/VHRXNIkyWq1XtIlKwhJAAKOzc774cS4eD+k2KNTbIV2p0JA028NLjSw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=fPipLXOw; 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: -3.49 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=fPipLXOw; 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: 79EE13F755 X-Spam-Score: -3.49 X-Migadu-Scanner: scn1.migadu.com X-TUID: RD+JEMyKQZyA Robert Pluim writes: > Ihor> However, we have special blocks for this purpose. They are exte= ndable, > Ihor> as I descibed above. Though some improvements in Org core might= be > Ihor> needed if we have to use this extensibility more frequently. > > My first thought here was Org macros, but as far as I can tell they can= =CA=BCt > be multi-line, which would make them a bit cumbersome to use. Tell us > more about special blocks, the documentation on them is a bit sparse. Macros are meant to configure per-document level of export. Not global, usually. Special blocks are Org blocks with the following syntax: #+begin_environment [optional parameters] #+end_environment With "environment" being any word except "center", "quote", "comment", "example", "export", "src", and "verse". Currently, latex export directly translates such blocks into \begin{environment} \end{environment} plain text export supports special handling of environment=3Djustifyleft, justifyright. html export supports '("article" "aside" "audio" "canvas" "details" "figcaption" "figure" "footer" "header" "menu" "meter" "nav" "output" "progress" "section" "summary" "video") special blocks texinfo export translates special blocks into @environment [options] @end odt exprot supports "annotation" and "textbox" blocks. etc. Because "environment" can be pretty much anything, we can have a pre-processor in org-export-filter-parse-tree-functions that transforms different special blocks into appropriate form for a given export backend (texinfo, latex, ascii, html, etc). This way, we will not have to rely on backend-specific handling. Such pre-processor currently does not exist, but it would be fairly trivial to implement. We may even introduce an interface similar to org-link-set-parameters for easier configuration of various types of special blocks. WDYT? Best, Ihor