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 kGK2Abce2mF8HAAAgWs5BA (envelope-from ) for ; Sun, 09 Jan 2022 00:31:03 +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 MES1OrYe2mGh9AAA9RJhRA (envelope-from ) for ; Sun, 09 Jan 2022 00:31:02 +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 A7CC51F7BA for ; Sun, 9 Jan 2022 00:31:02 +0100 (CET) Received: from localhost ([::1]:57228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6LAr-0007SH-Be for larch@yhetil.org; Sat, 08 Jan 2022 18:31:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6L9j-0007S8-8c for emacs-orgmode@gnu.org; Sat, 08 Jan 2022 18:29:51 -0500 Received: from [2a00:1450:4864:20::436] (port=44878 helo=mail-wr1-x436.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n6L9h-0005vs-4d for emacs-orgmode@gnu.org; Sat, 08 Jan 2022 18:29:51 -0500 Received: by mail-wr1-x436.google.com with SMTP id k18so18864017wrg.11 for ; Sat, 08 Jan 2022 15:29:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FauAubLZSjc9ednOCtfMyJWsnh0hcnizb5WUmIsJU3k=; b=VnspXmkueE5RVqWQIP6HJB69kmDK9lv3JwxBZD4+GftrXz5mnemeyyXNNdFWpfTvWI 5ff8svx/yoUTYDi99ZoRTg3jEOy0uv9LEfwQIrexOe8kfyPDMn+dzf4RdigxZZnkQ9Bw VwvOaCNlE7t+0KWXKWelTiMwDE9zX0BnUb8HOtV4Xdu0UGKnjsmQGT+pqMPgq9QcanCq xjVCrovJIAk1wSqK+h1xZRs+nPoJz/WF/KCq7h/djXvSQbKuexSloWFkZKsY1wAimw1j AUnnuIEJJG05Kj3d6P+bs3RWhyN91iyqSVKR77cq0xjYyxyNyERlxenyIzXPfUZJxLLV KdAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FauAubLZSjc9ednOCtfMyJWsnh0hcnizb5WUmIsJU3k=; b=ZVPOwiOdonhDOBb0H7KfCGGxAd5+McOdoRbJID5/T2ekvjK0VOF68Np/oNm/qEJfiS eA+HpnA3wBCigPvUaz0F4/3DDn1f/Si8KpuopiOyq6ltc3FdCw3q+zTsE3LUrissOsuJ O2HQBigNIOAKNt1XS1JvREoPLb0iKc7Ym7a1O2UIdA7Lqjkj70xF3Cl7EaTdFsAHyRzh jaypbey9qHCD8QZZ+zVjyoRl76rc/sOL7Y09b73DsSzFfaGIBX8ORf0rgY9xQGKGiCcd n1xVWXQAzirkASp8hIiFOFlIXzqc6E//mFOba7xb44vDeMeozKUQ/b5NIDKk72P7aoGp 6Otg== X-Gm-Message-State: AOAM532RyZwBgoU9+/rEyf+3M2nLj8RbMDP7fT1bG8P0oER9z1LZBOX1 y900gwy4aZtpWQ6nx0RTch6omjFu7czroBJaX2I= X-Google-Smtp-Source: ABdhPJyITxG6LqxNHU9X60vFDBai19EuviWMOjL+5p2H/1/kVyLSYTcNGFK/tasQnecGps/t+qev71jy/XKdhCIX0ok= X-Received: by 2002:a5d:6dac:: with SMTP id u12mr58358593wrs.233.1641684586210; Sat, 08 Jan 2022 15:29:46 -0800 (PST) MIME-Version: 1.0 References: <87ee5kwwht.fsf@posteo.net> <877dbcwtf7.fsf@posteo.net> In-Reply-To: From: Kaushal Modi Date: Sat, 8 Jan 2022 18:29:10 -0500 Message-ID: Subject: Re: Way to mark contents of an Org special block as verbatim? To: "Berry, Charles" Content-Type: text/plain; charset="UTF-8" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::436 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=kaushal.modi@gmail.com; helo=mail-wr1-x436.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, 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: , Cc: =?UTF-8?Q?Juan_Manuel_Mac=C3=ADas?= , orgmode 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=1641684662; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=FauAubLZSjc9ednOCtfMyJWsnh0hcnizb5WUmIsJU3k=; b=FexMWdGvzmKZf+lLDJvZZTp5+nrfMBvjyTzdTriM+5NshwOiga5QleKz3+rhXiJ/sq8JJX oIkAfm5z58T2SWVKDDEUe28kW9acm3tmybiXWKQZg0xq19544exa2cv3n+wZJjAU6q/CTM NdK0qxSkq3zNINgbnIYmptvQ9ZFTp7fZQJpA2qKGKtOdc1M8w6Y2AVwb+X/aHexnzLVV1C DnDeYFCGwLL5gXacesz0NeOlVVT28TfFidWmJsRpz6qDZ9+0lHfKkDb9Ql/q0R3rdZbKC8 m2O5Z6zTtS7HIsBiRobuQMcApiN3uy8cniXVFYrsEiVykFNZtyvSoAsXU6KFZw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641684662; a=rsa-sha256; cv=none; b=kyeDhRsgIcV4/SS4xls/LUyOigewr/k+TbZdpgkRflqZvFyK1xkpllCa4mPamvdRJVCP9P jlaVhqkksjMTygT4HuybXJngwQOwH//2d4yhY4QJtu0UhTUgMj7pfxvy+8rda4mCkC3nAL q8MgewBze11zEHFf8bVkAGjnnfKoDbm0EdccbZQ21qycm+sqbXdE+20lx6Man9yBLMSDPZ BDuAm31dPAYam0SmWG+nnLBgZ0u962mpWzjiE84FappWKN7/csRE5teZOdbWb9QnIa4EfG XbDn/r/T64WScdtwwVv0azogPGBm41yWAvpGJttASkQ5fwaeMqNW5yWYo0VcQg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=VnspXmku; 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.31 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=VnspXmku; 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: A7CC51F7BA X-Spam-Score: -3.31 X-Migadu-Scanner: scn1.migadu.com X-TUID: SHPgwPHxypOk > What am I missing? > > It seems like you want your derived backend to transcode special blocks somewhat differently than the parent backend. And adding a special block export filter doesn't quite do the job. I tried out the example Juan posted and it works perfectly well. But it would require to user to do something similar for each arbitrary new special block they need. E.g. #+being_katex, #+begin_tikz, #+begin_tikzjax (could be anything!) where the content needs to be kept unmodified. > For that purpose, you should write a special block transcoder - perhaps falling back to the parent backend for block types you do not wish to handle as described above. Can you please point me to an example? > Block specific customizations could rely on a backend specific attribute. Yes, I am doing block-specific customization (like support #+attr_shortcode above special blocks here[1]). But I don't know how to get back the original content of the special block because the `contents` arg received by the exporter's org-hugo-special-block already has the Org entities, and sub/super replacements done. [1]: https://github.com/kaushalmodi/ox-hugo/blob/458142675bb5a0e7ee26ecea07d75c10aa52184b/ox-hugo.el#L2872