From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 AHTsDUoF/WPFOQAAbAwnHQ (envelope-from ) for ; Mon, 27 Feb 2023 20:32:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2F3VDUoF/WOVGgAAauVa8A (envelope-from ) for ; Mon, 27 Feb 2023 20:32:26 +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 E9E88255BD for ; Mon, 27 Feb 2023 20:32:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWjDp-0006Dv-3w; Mon, 27 Feb 2023 14:31:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWjDl-0006DZ-TL for emacs-orgmode@gnu.org; Mon, 27 Feb 2023 14:31:38 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWjDj-0003WH-Ek for emacs-orgmode@gnu.org; Mon, 27 Feb 2023 14:31:37 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 1485A24039B for ; Mon, 27 Feb 2023 20:31:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1677526292; bh=HqHQGbt7QtHL9glxWJpa1KTcKLzT58bjEpUhEuR8Nl4=; h=From:To:Cc:Subject:Date:From; b=bR49VC8psLGaVQ87Gi60g2xCmpAJZlVNulmnkfTq45FalaYF3PCmBHjXfIGZ6iE4H k9jGNH/USYRi9gmRiEyyDkiBpfmU6hKFdjYXRAQeGncTsPSMpb2CJyo8A/37fTy+3B rdfp0KBDN/o/Fozx5RgW3/2SW+AOJEktAUPECIfY3BGcCnMCmCHkZ98JHr+C0crZf/ OkvVT4k43X+TXuXS9cMoRvqIMhbYqEMx4PjWIm2tc5y6QADlpaZFuY0UQdclfIL8vb 1iEO24mTsS3PgnyOH0inSE0j+pf6hzIlTnAoxNuZor8trUoPxbbK4o+V8uzjCd4j7D yBe7/imaonMfg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PQVwz3Qcsz9rxP; Mon, 27 Feb 2023 20:31:31 +0100 (CET) From: Ihor Radchenko To: sebastien.miquel@posteo.eu Cc: emacs-orgmode Subject: Re: [POLL] Naming of "export features" In-Reply-To: <4cf06875-2494-9a17-8c6a-b4bd9449b28b@posteo.eu> References: <875yc95rxp.fsf@tec.tecosaur.net> <87h6vfnl3a.fsf@tec.tecosaur.net> <871qmhdh3l.fsf@localhost> <27a9349f-2171-d065-d257-6074f627c1ef@posteo.eu> <874jrbs6iv.fsf@localhost> <87edqf43m0.fsf@localhost> <2e2828cc-95c7-f895-dfd8-e524c850e7ca@posteo.eu> <87fsaszk48.fsf@localhost> <4cf06875-2494-9a17-8c6a-b4bd9449b28b@posteo.eu> Date: Mon, 27 Feb 2023 19:32:10 +0000 Message-ID: <87sfeqyked.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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, 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677526346; a=rsa-sha256; cv=none; b=bR9kKQK/lMy/xuBD10VWKMsLoy6uxDueJtysGIzo5NmF01GL8PAkebqkz1zWRIG5YhvsoZ BTDk99fZSJpam5ZUa+DWyrppRvNUdeACyicnqoJOvCvYYKRiQPe9cwdhMwXSVOjlchA9H8 LW0Zu/GwsNmOPSCCuw/oGBCq/6KzO6L4BE1QuPzOi5YOjBFO6vSTFJ9cK81BbSetY6U/nO qqi0w5eH1RjOTqiOT7GdtawYkH6Do9HzBJRFiwygcaioTMH/+bcyewbYy6qovbf1QIZRrZ FGLDp68nL9yrsbpUnWHjEu1+C0Sp+Mi8hmsZVRbLDnbq2rHRgEvxmgkRhZ2qTg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=bR49VC8p; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677526346; 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=x5SvnLgjk6lffluZbIAU8etD6xVatLwq/htM24t53P0=; b=GlZFrcknuElwrIn8tnNQHAxQN+a3+JSF5V8BkSUkkpQfoc+vqhVMQV/Q7HU8P01LH0w3Ih Ec1vQIk3Hralllh+lEpGj26428Hw094214QFMmKH2rDhuQ6YbckABDEoedm6sky7g07xXW cDEqfFxWa+joiNEZT1yVd+2I32YtfimoYjRcXDADGH10S2jrye9lRSxqu2a+EgB+rxBWOG Uy1aESh7SsCXFeiZPHMHwbDDEL2abj8dh+UgI8sLvK7r/faenF9UFcROyrAp0kNdIsDXl/ HMfF6O/FQ2DRvwvHhAZybmNpR7zX5FNzlJTUcbi5AkcIIygpK06FgMJ9q+u3rQ== X-Migadu-Spam-Score: -4.67 X-Spam-Score: -4.67 X-Migadu-Queue-Id: E9E88255BD Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=bR49VC8p; 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"; dmarc=pass (policy=none) header.from=posteo.net X-Migadu-Scanner: scn1.migadu.com X-TUID: NTj9j5qPLXNB S=C3=A9bastien Miquel writes: >> The proposed template system will provide more flexibility to modify the >> default export transcoders. > > Reading your original proposal, I see nothing that provides more > flexibility. I can guess at how it would allow one to prepend/append > stuff to the output of the default transcoder. Anything more flexible > than that would require breaking these default transcoders into parts, > which you did not originally mention. Here is my refined proposal, which we converged to upon further discussion with TEC. Basically, we will extend the notion of export transcoder to be a list instead of a function: :translate-alist '(... (table :snippets ((table-begin :when caption :snippet "\\begin{table}[htb= p]") (caption :snippet (format "\\caption{%s}" ())) (centering :snippet "\\centering") (tabular-begin :snippet (format "\\begin{tabular}%s" )) (contents :snippet ) (tabular-end :snippet "\\end{tabular}") (table-end :when caption :snippet "\\end{table}") :conditions ((t . table-begin centering table-end tabular-begin c= ontents tabular-end) ((lambda (el info) (org-element-property :caption el= )) . caption))) ...) >>> Here's a couple interesting examples that currently cannot, I think. >>> + a `multicol` heading property, that wraps the content of the >>> heading in a multicol environment. >> Could you please illustrate with examples? > > Exported content would be: > #+BEGIN_SRC latex > \section{ABC} > \begin{multicols}{3} > Section content > \end{multicols} > #+END_SRC With new template system, it will be very easy. You just need to add new elements to the section template: By default: (section :snippets ((contents :snippet (lambda (_ _ contents) contents)))) You can just add :snippets (wrap-multicol-begin :before contents :snippet "\\begin{multicols}{3}") (wrap-multicol-end :after contents :snippet "\\end{multicols}") :conditions (t . wrap-multicol-begin wrap-multicol-end) >>> + a `nocontent` property that do not export the content of the >>> heading >> This can be done with :filter-parse-tree or :filter-headline > > I guess. This isn't "couple of lines"-easy though. Sure. With new system, it will be just :snippets (section) (prevent-contents :prevents contents) :conditions (t . prevent-contents) > See higher. More flexibility requires breaking up some transcoders > into pieces. AFAIU it, the proposal you originally described does not > bring any more flexibility beyond what can be done through short > advices, or indeed the `:filter-` functions. I'm not sure this > dedicated syntax is preferable to advices. I hope that the above examples clarified things. As you can see, it is possible to manipulate the order of elements in the original templates and disable some existing parts quite easily. Of course, we will first need to rewrite built-in transcoders into templates. Most of them can be rewritten rather trivially, fortunately. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at