From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id cHVlMnlbumZ+4gAA62LTzQ:P1 (envelope-from ) for ; Mon, 12 Aug 2024 18:59:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id cHVlMnlbumZ+4gAA62LTzQ (envelope-from ) for ; Mon, 12 Aug 2024 20:59:05 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=hfmdk-frankfurt.de (policy=none); 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1723489145; 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; bh=D6XJZ5Trvapdl+heU/lbOPAiEf2hETBGXJQfhB5ArfU=; b=nz+0VIggUjnz5mZ8hmf/5fVtyfuBsOvRTubpd2oVd/B/j3bqEH5A4d89jhh+GHuz6kt0NP +qItFjaELhwDVJEfAqBXIBRrwqm9uXBkU6X8ydFJsGm1IUa8nUaMFF4GXINv/l5FdEVZFw 06M8Bopc5LHobC4OGDh406NPUSZ8sJGFBlmpPcVWA9DLyuBUOz5gGjt/t1Q27JTZOVCRsU pfELBuTCHrVccOLyiu0DgPbep10egJ5jzOh277uBut/GxxLCzZi/cAOQXO0V/Yw3ondAvw S1Tt7lhi+6B4b26rCoq9kDkDCmW/0PVLydFU5y6pW40e5lTAupDAjSx46Top6Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1723489145; a=rsa-sha256; cv=none; b=F7yIzDCYAYhLtQMmzEBzY+vYb+dnKTwfx59+Yh9ejCbtGwcUgXaiJ0+Mgspoc6laCvuEBK d2EG3d9Ijc/jdoN2LVGk3VNA1zPGnI7tPkJwSO+P/U5TdZ701m4nQdnxpn1Im6vaZ0zV1c RNYbFrADvZmuAPp2s+9MumeiIxN9pBeleZKQ4DNHy3mNVSIqAIRxY5pw+vZA4vZadnZolr 2Cv0in4VJvRUjMn4hQo6DMj9RNaf4SBlGY8uJ1mUODIufzA2VyWICVii7CT5nC3iCO4SgU KLWwifWUY0kS6kFY904G8yz+fYORjjWW7EFuB3PtCjwa3UIaw0lt+47DSeiUnA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=hfmdk-frankfurt.de (policy=none); 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" 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 366BA6F4BF for ; Mon, 12 Aug 2024 20:59:05 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sdaFH-0004Fs-Is; Mon, 12 Aug 2024 14:58:19 -0400 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 1sdaFF-00041x-Du for emacs-orgmode@gnu.org; Mon, 12 Aug 2024 14:58:17 -0400 Received: from www.selma.hfmdk-frankfurt.de ([46.4.92.145] helo=mail.selma.hfmdk-frankfurt.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sdaFC-0002OS-P3 for emacs-orgmode@gnu.org; Mon, 12 Aug 2024 14:58:17 -0400 Received: by mail.selma.hfmdk-frankfurt.de (Postfix, from userid 113) id 24B82F62358; Mon, 12 Aug 2024 20:58:09 +0200 (CEST) Received: from selma.hfmdk-frankfurt.de (ip-037-201-128-004.um10.pools.vodafone-ip.de [37.201.128.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (Client did not present a certificate) by mail.selma.hfmdk-frankfurt.de (Postfix) with ESMTPSA id F28CBF60D3A; Mon, 12 Aug 2024 20:58:06 +0200 (CEST) Received: by selma.hfmdk-frankfurt.de (Postfix, from userid 1000) id 9B4F6396051B; Mon, 12 Aug 2024 20:58:06 +0200 (CEST) Date: Mon, 12 Aug 2024 20:58:06 +0200 From: Orm Finnendahl To: Ihor Radchenko Cc: Org mailing list Subject: Re: multipage html output Message-ID: Mail-Followup-To: Ihor Radchenko , Org mailing list References: <87bk2i8w07.fsf@localhost> <87r0b2kext.fsf@localhost> <87zfpk36er.fsf@localhost> <87a5hjxjbh.fsf@localhost> <87le11is5a.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87le11is5a.fsf@localhost> X-Disclaimer: Why are you listening to me? X-Operating-System: GNU/Linux Organization: Hochschule =?utf-8?B?ZsO8?= =?utf-8?Q?r?= Musik und Darstellende Kunst Frankfurt, Frankfurt, Germany Received-SPF: pass client-ip=46.4.92.145; envelope-from=orm.finnendahl@selma.hfmdk-frankfurt.de; helo=mail.selma.hfmdk-frankfurt.de 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, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 366BA6F4BF X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -5.86 X-Spam-Score: -5.86 X-TUID: SDxwQFmi8SvG Hi, again thanks for checking. Am Montag, den 12. August 2024 um 17:10:25 Uhr (+0000) schrieb Ihor Radchenko: > > :multipage-split-function should be added to the :translate-alist I > think. It should be documented what :multipage-split-function is > supposed to do in the docstring of `org-export-define-backend'. > > > I do not feel like :multipage-split-function is supposed to be export > _option_. It is more internal. That's why :translate-alist, where the > internals like templates and transcoders lie. That's how I had it before, but I reasoned it is not a transcoding function either, so I was unsure. Anyway I reversed it. > > (defun org-export-transcode-org-page (org-page _ info) > > ... > > (let* ((body-only (org-element-property :body-only org-page)) > > (info (cl-list* ;; add :tl-headline and :tl-headline-number to info > > :tl-headline headline > > :tl-headline-number > > (alist-get > > headline > > (plist-get info :headline-numbering)) > > info)) > > May you please explain what is the purpose of constructing custom INFO > plist, what all these parameters do, and why you re-do the export again > in the transcoder discarding the CONTENTS argument provided? > The redo of the transcoding was a leftover from debugging an earlier stage. Removed now. :tl-headline and :tl-headline-numbering are needed for constructing the side toc and the footnote section on each page. They are needed in org-html-multipage-toc, called by org-html-multipage-template and in org-html-footnote-section called from org-html-multipage-inner-template. At that stage there is no information about the page, the templates are on. Let me know if you have a better idea how to provide/access that information, I found a temporary addition to info the most natural way. As it will be needed by any multipage backend which wants to determine the footnotes for a page, I think there should be a generic solution in ox.el. As :tl-headline-numbering can be determined from the tl-headline within org-html-multipage-toc, I can get rid of that if you prefer. Let me know how to proceed. > > (defun org-export-transcode-org-data (data body info) > > "Transcode DATA with BODY. Return transcoded string. > > DATA is the top `org-data' node of the parse-tree. INFO is the > > communication channel plist." > > (if (plist-get info :multipage) > > ;;; for multipage output the `org-data' node contains `org-page' > > ;;; pseudo elements as contents, so we call `org-export-data' on > > ;;; each of them and return the collected results. > > (mapcar (lambda (org-page) > > (org-export-data org-page info)) > > (org-element-contents data)) > > This is not a transcoder's job to export its contents. > Please move special handling of org-page AST nodes to `org-export-data'. done. -- Orm