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 oEBqKDkJ9mNnyAAAbAwnHQ (envelope-from ) for ; Wed, 22 Feb 2023 13:23:21 +0100 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 8HRtKDkJ9mPdWgEA9RJhRA (envelope-from ) for ; Wed, 22 Feb 2023 13:23:21 +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 EEFA013261 for ; Wed, 22 Feb 2023 13:23:20 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUo8u-0000Ni-6d; Wed, 22 Feb 2023 07:22:40 -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 1pUo8r-0000NQ-Hs for emacs-orgmode@gnu.org; Wed, 22 Feb 2023 07:22:37 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUo8o-0007bu-Sn for emacs-orgmode@gnu.org; Wed, 22 Feb 2023 07:22:36 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B9BD0240775 for ; Wed, 22 Feb 2023 13:22:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1677068551; bh=4RFngZylEhYnuWlK8icFeFa9vhyhz5hfKLrmrAsvdYU=; h=From:To:Cc:Subject:Date:From; b=nS/n9IUogZz/73XYttQKC0YrqfXFtynWBVPk2+cUU7T46HeNBLwjbxCyynibpJnbZ OhjoAyOdzLlXJrsJedCQhEcnQ4Ar3O5i2wQJtb6hyJ9P7ZVgCoWa4fVy5sEwSfhauZ qB7tYlAEsVqZHtwkKButi2AV9MdeYDDhdbttlILXYujlmjgm6G6ZfI4T7r0rk88xQ1 K2NB8sQf7q04+wyOH5ELZg0RfL0x0mXaXts/t0m93JEg9lif/W+R8O4oeHH5STPLFt G3ZUcz7Y/ZPbC/PRQVnuAbHDeAAthEEzAAZy2Bjt7Rg7oIRQV1JsmAXQdyLtnjxuSY eqLUND1SUH10w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PMFfC3GXpz6tqy; Wed, 22 Feb 2023 13:22:27 +0100 (CET) From: Ihor Radchenko To: Timothy Cc: emacs-orgmode@gnu.org Subject: Re: [POLL] Naming of "export features" In-Reply-To: <87h6vfnl3a.fsf@tec.tecosaur.net> References: <875yc95rxp.fsf@tec.tecosaur.net> <87h6vfnl3a.fsf@tec.tecosaur.net> Date: Wed, 22 Feb 2023 12:23:10 +0000 Message-ID: <871qmhdh3l.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.66; envelope-from=yantar92@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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677068601; 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=d5khmDJGXoZHd7BVL3iqMowEdVH86RoW/JrY4fU7fkA=; b=M0b9m+1jo+OHCutF9IMD2d6N0avrBjiQ8zP1/m10NNnjtwBh24toAy7QKpNyD21Ns8UYE8 1ou9bRvixqTvRJN4U7lyIwZHkSCNeEqsNny1pm8ZkaptlgpTgJECNv4BFOf9xgifcL1cfq 09tiI9JvWqYkF8hvc3e/rEsxDhghcDQiu2SgdLefGPGCLe1K7mdStBvKT6jBp8DXMREsXl Ns6hC8vBgBp5ETf1KKdJPP7FAfqo4kkJHqKuHJ4+clUX6sPN369gnKlezx4rsHdm6Jy+On QJmLS0TlROAa1Q21wxdZ79EQAM6Zsg8Yj5vPqBx/4SOxZ34alXhHtzqC3+L6xA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="nS/n9IUo"; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677068601; a=rsa-sha256; cv=none; b=eb8WQBfBt5D4vyc380yRdzq8WzjmJ6so9uvUODlBW8XCwqEr3BAoeWAqVvXAeSZnOKZcpo V8hXzYvDK5ai1MM56QOoUdaNv9FqFmXjJKp8MGkF+CXozGE3pNdEk8Qo0xdGknq4VA9aPI likQb8t5zx4gGqwZvEMsNr/QbWjFSn1JU1nYO37mvvqe6A+mAvyRLyOmW3uXg+EqnrmJsz P8Q6+6VsWllQL0O/zROSqauAItBmc/iwjabawhMr72qDpd30JGvOsOuL52rfMoB1gnFgg7 g67N22KpZpJSMsGKh/0ofkbiO5J5In5NNDacHWkdhxdGDpWyp2JNwS3NSZbLwA== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="nS/n9IUo"; 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-Spam-Score: -6.15 X-Migadu-Spam-Score: -6.15 X-Migadu-Scanner: scn1.migadu.com X-Migadu-Queue-Id: EEFA013261 X-TUID: 0romhoYAQqqH Timothy writes: > Here is a list of terms which I=E2=80=99d feel comfortable applying to th= e system: > =E2=81=83 export features > =E2=81=83 export capabilities > =E2=81=83 export snippets I am looking at the concept again, and I feel that we may be missing some flexibility here. I do not like the fact that each feature can only have a simple implementation within specific backend. Imagine that we would like add a top _and also_ bottom comment when the Org buffer contains emoji. With the proposed patch, it will be impossible. I am thinking about something conceptually similar, but more general. Instead of detecting "features" in the whole document, let's consider that for every exported Org element (including org-data, representing the whole document) we may emit different export output depending on certain condition being satisfied for either original Org raw source of the exported element, the element AST, or the exported element contents. Let's call it "transcoder conditions". What I have in mind is an ability to parametrize the transcoders like the following: (org-export-define-backend 'html '((paragraph . ((paragraph-is-a-link? figure-transcoder :name figure) (:unless 'figure paragraph-transcoder)))) :transcoder-conditions '((paragraph . ((paragraph-is-a-link? (lambda (paragraph contents info)...= )))))) Several ideas in the above: 1. Name features as "transcoder conditions" 2. The transcoder conditions are now linked to specific Org AST element. They may not only be matched against the whole parse tree + whole raw Org text, but also against the specific branch of AST + chunk of raw Org text corresponding to the branch + the actual exported contents of the AST children. 3. "feature implementations" are no longer needed. Instead, export transcoders can contain the implementation lists inline. Each implementation is selected not only depending on the presence of the "feature"/transcoder condition, but also depending on multiple features or arbitrary lisp expression results. 4. :when/:prevents apply to specific (possibly named) implementations. This makes more sense than matching against feature. For example, presence of svg images in latex export may or may not mean that \usepackage{svg} is being used, depending on svg implementation. We want to match against \usepackage{svg} specifically rather than only against the presence of svg images. WDYT? --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at