From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KEgqM0ONd183BQAA0tVLHw (envelope-from ) for ; Fri, 02 Oct 2020 20:27:47 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id CGnxLkONd1/CAQAA1q6Kng (envelope-from ) for ; Fri, 02 Oct 2020 20:27:47 +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 913289402AC for ; Fri, 2 Oct 2020 20:27:39 +0000 (UTC) Received: from localhost ([::1]:43282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kOReT-0002ni-4L for larch@yhetil.org; Fri, 02 Oct 2020 16:27:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48270) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kORdn-0002nP-2B for emacs-orgmode@gnu.org; Fri, 02 Oct 2020 16:26:55 -0400 Received: from smtp-out-6.univ-rouen.fr ([193.52.152.101]:12311 helo=mailhoc.univ-rouen.fr) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kORdk-000640-Nx for emacs-orgmode@gnu.org; Fri, 02 Oct 2020 16:26:54 -0400 Received: from IRED-15-19C0 (89-80-224-241.abo.bbox.fr [89.80.224.241]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailhoc.univ-rouen.fr (Postfix) with ESMTPSA id E22D31F4D for ; Fri, 2 Oct 2020 22:26:47 +0200 (CEST) Message-ID: <2d0b1df3720133e089e4e45af09f5faf1c21f4ac.camel@univ-rouen.fr> Subject: How to reinject custom function into derived backend which doesn't implement it, ex : footnote in ox-slimhtml backend. From: rey-coyrehourcq To: emacs-orgmode@gnu.org Date: Fri, 02 Oct 2020 22:26:43 +0200 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-3QKoRxS+0Ib9zhyGEr1I" User-Agent: Evolution 3.34.1-2 MIME-Version: 1.0 Received-SPF: pass client-ip=193.52.152.101; envelope-from=sebastien.rey-coyrehourcq@univ-rouen.fr; helo=mailhoc.univ-rouen.fr X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/02 16:26:48 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-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.23 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -0.31 X-TUID: EyWooIefhNik --=-3QKoRxS+0Ib9zhyGEr1I Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, I'm trying to develop my own `publish.el` for some research project linked = to reproductibility.=20 I chose ox-slimhtml [0] as derived backend to limit and simplify the html/c= ss outputs generated by vanilla html backend/publish.=20 Actually footnotes are not defined in ox-slimhtml, so as i read in the org = documentation [1] ),=20 i try to add this capacity by simply calling vanilla ox-html function org-h= tml-footnote-reference into translate-alist : (org-export-define-derived-backend 'ox-slimhtml-publish-to-html 'slimhtml :translate-alist '((bold . ox-slimhtml-bold) =20 (footnote-reference . org-html-footnote-reference) (verse-block . org-html- verse-block) (special-block . org-html-special-block))) Using the vanilla ox-html export function, everything is awesome and footno= te appear in my html, normal. =20 :publishing-function org-blog-publish-to-html=20 But if i switch to ":publishing-function ox-slimhtml-publish-to-html" the f= unction=20 org-html-footnote-reference is never called. There is something i don't understand in the processing of "translate-alist= ", so perhaps if the derived backend doesn't implement a footnote-reference function, i cannot extend it ? If you have some higlight on this, or solution on this problem, i'm interes= ted. [0] https://github.com/balddotcat/ox-slimhtml [1] https://orgmode.org/manual/Advanced-Export-Configuration.html Best=20 --=20 S=C3=A9bastien Rey-Coyrehourcq Research Engineer UMR IDEES 02.35.14.69.30 {Stronger security for your email, follow EFF tutorial : https://ssd.eff.or= g/} --=-3QKoRxS+0Ib9zhyGEr1I Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEQdBRWS1ZqcB6tN8l3FXLa3BDQW4FAl93jQQACgkQ3FXLa3BD QW6nwhAAnklkO2N7C/7QKRWFuiQJAFQhs64bcVgtHZ7hN8MVcvu9AkHOVhsOo0mK wABk5uK9B0YwrNwacST1V4u3nZyY+dxolgtf0EoeqFWlwo+khSKipY8EToDRY78D rfupiiHNjsVe75jrMxWNlTduvRa7uOg+aPtPHlTvGTrWAphfL9Sao4Kz0a2uMdL9 mD5SVAqzKSoMTZCvaDGFy2JsDintbPdMuCQk9STWPITDe5haCjp97TbuKs4cjSoz w4PCShdV9hdbkv1ZKYivToxYT+ZcMDReQFiwNijNbszTuDRgp3cl+WVKdDl1pBwd HcGh07HD0PHxvUsSMBInBc88LIgwqOxeDImTbMhFtGpO3yFE8XE1DyfPF1R2HjGk v/so82TY5/wslUza1A//QGdx3XQUg1oOIFpKEwWa3Rq3md0TQCQdDDRoO+E2sToW 03fstOSvj1/TAWWRn0DRuUwcdIYiTcGUL/jpqBaJ0JA/Pvc4WH36jaArH6nqKIAx NxAdRdT55E6ywQvQt3xcsGF3itNlmAVzpOkQR6fui8SddINa/UV+L1lCEKJkpzRa 6Ekv0L8yEIEVckjanzDUhR1Xuh9TJMBmVDBxCz2a0T02yyrVnwfMCCAibFJ7JRF+ U/TMEYit99ase316a7a5CEXhVLHYZ0cT8H5nF62uWUyFBX7bxY0= =+bWg -----END PGP SIGNATURE----- --=-3QKoRxS+0Ib9zhyGEr1I--