From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id oLO0Fd/OsWZ7KQAA62LTzQ:P1 (envelope-from ) for ; Tue, 06 Aug 2024 07:21:03 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id oLO0Fd/OsWZ7KQAA62LTzQ (envelope-from ) for ; Tue, 06 Aug 2024 09:21:03 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=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"; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=hfmdk-frankfurt.de (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1722928863; 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=Bf2mUnuCABLntjNi+X36boYRcSsfwd7lpiZa9RJgzJY=; b=PIYbfCVXzUYX75pITx6G/EL/r7AgqVS16eN1+70r0/FrgCMWUzlNOmoAEvZUTf+a9QHloi 6iKOuD1lzDnhqQq1jNLTkonxFLFiLuNTjX2DLxUyBkexdvlT+3X0jmoRL7qsjC4JcGgkof 228icwV/voI9ZLscOi+CD0I5aJoX5hEmLThK8uOikdu6zwnixsEm47M99PefT5diB9m1bJ oHWy94V6Pwhybf96IVhdfitk16gvrxYcCgFd5EHeb1MYUhDtSk5gz8ToQiLbOzS6zofrJh uXtrpoxXJ48ugZr61Sboxh9pcyBG9KxHCO9QGp/PTrKlrzQUXb8ZXpQnWkDSZg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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"; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=hfmdk-frankfurt.de (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1722928863; a=rsa-sha256; cv=none; b=dS3ZoH674TghVXPIGyhAIEzMCl9s2nmLOTgqDb1jX7A0dFnwwYP/lHOsOZvEe2V3BpwZSJ a9RKbeFQijJ2huyrsfGv4NsR1R2O5s7U3xOySKRYr6NovP41NeUxdU8zl7UWBEtGAu2OSm /Xr18n173zpgHMUP9ADRf6ezD+FwCkzN+5WoWk0Z4Sr8UU7eFA54UyYGvCDkREkfYYW2be I7DpUujzmgwfbANqAanHnSuOEn9mKzIiINFo7s85/AQ2jz3sWg/jbC1Qro0eukHVvYnN93 f/ZvQQfg2Ld9TESuM36bNQJnjQuqCA8P1rBwO6z8brp7GTrijHPYvOKXH4ZDMA== 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 BA48072C86 for ; Tue, 6 Aug 2024 09:21:02 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbEUF-0007U1-VR; Tue, 06 Aug 2024 03:20:05 -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 1sbEUD-0007TI-CP for emacs-orgmode@gnu.org; Tue, 06 Aug 2024 03:20:01 -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 1sbEUA-0002O3-9O for emacs-orgmode@gnu.org; Tue, 06 Aug 2024 03:20:00 -0400 Received: by mail.selma.hfmdk-frankfurt.de (Postfix, from userid 113) id 2424AF60E60; Tue, 6 Aug 2024 09:19:54 +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 D8CF4F60E60; Tue, 6 Aug 2024 09:19:51 +0200 (CEST) Received: by selma.hfmdk-frankfurt.de (Postfix, from userid 1000) id 70D803960545; Tue, 06 Aug 2024 09:19:51 +0200 (CEST) Date: Tue, 6 Aug 2024 09:19:51 +0200 From: Orm Finnendahl To: emacs-orgmode@gnu.org Cc: Ihor Radchenko Subject: Re: multipage html output Message-ID: Mail-Followup-To: emacs-orgmode@gnu.org, Ihor Radchenko References: <87sew011c6.fsf@localhost> <87frrzdrbz.fsf@localhost> <87plr14wka.fsf@localhost> <87bk2i8w07.fsf@localhost> <87r0b2kext.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87r0b2kext.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, 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 X-Spam-Score: -0.94 X-Migadu-Queue-Id: BA48072C86 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -0.94 X-TUID: PaB6KeV7LBNW Hi Ihor, as always much appreciated. I'll look into that and get back. It might take a bit depending on how complicated it is as I have some other things on my org list right now, but we'll get there ;-) Best, Orm Am Montag, den 05. August 2024 um 18:22:22 Uhr (+0000) schrieb Ihor Radchenko: > Orm Finnendahl writes: > > > attached are the patches for the multipage html export proposal. The > > tgz file contains all commits after branching from the main branch to > > the org-html-multipage branch (see: > > https://github.com/ormf/org-mode/tree/org-html-multipage) > > Thanks! Although creating patches is not necessary in your case - remote > git repo is good enough for me to check things. > > I am also a bit surprised that you went as far as adding documentation > to the manual. We are a bit early into the review, so things are still > going to change. Let's focus on the code first. > > > + (setq tmp-info info) > > ... > > + (setq global-prop org-export-filters-alist) > > I noticed temporary debug statements and some (message ...) statements > sprinkled around. They are ok for the time being, but will need to be > removed before merging upstream. > > > +(defvar org-export-multipage-split-functions nil > > + "List of functions applied when multipage output has to be split.") > > Please be a bit more specific about what these functions are. Here is an > example of a complete docstring: > > (defvar org-export-filter-parse-tree-functions nil > "List of functions applied to the parsed tree. > Each filter is called with three arguments: the parse tree, as > returned by `org-element-parse-buffer', the backend, as > a symbol, and the communication channel, as a plist. It must > return the modified parse tree to transcode.") > > Also, please mention that `org-export-multipage-split-functions' are > called _only_ when multipage output is requested. This means that > `org-html-multipage-split' does not need to check :multipage property. > > > +(defun org-html-transcode-org-data (data content info) > > + "Transcode the top org-data node of the org file to export. > > ... > > > +(defun org-html-transcode-multipage (info &optional body-only) > > + "Central routine transcoding to multipage output called by > > +`org-html-transcode-org-data' called from `org-export-as'. > > ... > > I see nothing specific to HTML in these two functions. Please, factor > them out into ox.el. I think that they can be all merged into the > default `org-export-transcode-org-data'. > > > +(defun org-html-multipage-split (data _backend info) > > ... > > + (if (not (file-writable-p dir)) (error "Output dir not writable") > > + (let* ((encoding (or org-export-coding-system buffer-file-coding-system)) > > Checking output dir does not belong here. > You should probably do it in `org-html-export-to-multipage' instead. > Ideally, split function should do splitting, but not other things. > > > + ;; collect all org-pages to be exported. > > + (plist-put info :multipage-org-pages > > + (cl-loop > > + for file in section-filenames > > + for tl-headline in section-trees > > + collect > > + (list 'org-page > > + (list :output-file (format "%s/%s" dir file) > > + :tl-headline tl-headline > > + :tl-headline-number > > + (alist-get > > + tl-headline > > + stripped-section-headline-numbering)) > > + nil)))))))) > > This is awkward. Why not modifying DATA directly? Say, you can > transform it into (org-data (...) (org-page ...) (org-page ...) ...). > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at