From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id QIR7ATEMjGapJQAAqHPOHw:P1 (envelope-from ) for ; Mon, 08 Jul 2024 15:56:33 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id QIR7ATEMjGapJQAAqHPOHw (envelope-from ) for ; Mon, 08 Jul 2024 17:56:33 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=bDBxuPms; 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1720454192; 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=78LgIGoOXulzRXldD/zjo27iig2hWqatrZPOBBE6rBM=; b=dxNBYkZvtqsdPeUYJlZ34vEHGOwcKOOMd0b9DYwWm3TzqWkoA1fu/UnZIA+Cfyb9Tt5kuQ mHPp3e8amFI2D7QlRAwuFz7FtMO43fq9Dc0C2MrVZI/+BSCVKqdqZJZXd2Y3qA+hicc7/3 B2dHgs3KY5VItH0VUv+WQR9F0ov7SM9NTV7budV5xiTEV1tVD5Vf+wFGw9uTL/6W8xWJjB JJ1qPMMLWRhLH857Z7qQLQRMm6FmEmsZ7WOVwjjFEuOlpdy7WNc77t+C8OGd29AbLOqz95 F7ySmGnbTvasDJ/YNVMHZCGRhnTxekakeS/VbBXGSCaLnK5lbFxXXKaVAyVioQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1720454192; a=rsa-sha256; cv=none; b=rfLIBSJlumtANzVCf23gE5umh90iCrT7sleRPHyWJ0xhbzO/YWfVELJrby6UdvmbNZ5OtQ EMkLWn49s0aJkqAWj2NYanWiWfdAStr3Bi2pSjI/rxI/8tym2qL544+j6OsuPrZDfbVJSh PFwrnV0umKPFQfMQ9j8OKREAIbo8+XgFounsjlK3ka0C7L+nYV5O9MWh2J/1SyrGoC/rk8 LP2K7p+ptTKEecyeX7QjzGDSP1Jx2BzDGJDcTmRMDzaY+2rY7aTysIMFK+k6FwLhzWV9u4 R5iztRDIahAtOOYUjttIV032W9QdhkFBBAxxj12PbsPtsU78a5vWkFq1ATNkIA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=bDBxuPms; 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" 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 D36D2B981 for ; Mon, 08 Jul 2024 17:56:32 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQqiD-0001FT-J4; Mon, 08 Jul 2024 11:55:33 -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 1sQqiB-0001F3-Pa for emacs-orgmode@gnu.org; Mon, 08 Jul 2024 11:55:31 -0400 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 1sQqi8-0005Mw-Oh for emacs-orgmode@gnu.org; Mon, 08 Jul 2024 11:55:31 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 151F4240101 for ; Mon, 8 Jul 2024 17:55:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1720454114; bh=V7u7kSTX5X4f2oS3F8XQYJClTo+cfSuWiJrygywt6cI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=bDBxuPmsHngv2PGmmPGKg9f40JGIr3mpYxjtZnyy+6ekdviHgrgiK3ugNG6hX1Rz6 SBtrLk05jmjYPzgfJVb2yktth2sXhOTDX1WDwrHgumNHFK7LsKujDWSG/UtVhEjg/X G5OslL2+WtZd5SaSjg/9kZZMdc3M/73PeaA55kAwarI8F4xKh47DN7zv4Z0ZZALkWD yBjIqYM+PlPlee48xxF1nJep1ZeJaQcMRUrg596OqF67pNmUgzqeke3Jmn/HlXJlwY 7segP9fWxB9oqmi/hZRiYaHgF20ZUEld7Uhoqx0UawDO54YFYxRroPAihWpBtLJQZJ 3CnvzyEoXSdRA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WHpc12Xywz6tvh; Mon, 8 Jul 2024 17:55:13 +0200 (CEST) From: Ihor Radchenko To: Orm Finnendahl Cc: emacs-orgmode@gnu.org Subject: Re: multipage html output In-Reply-To: References: <875xtmd9nz.fsf@christianmoe.com> <87msmypwfw.fsf@localhost> <87zfqxpeog.fsf@localhost> <87sewp9liq.fsf@localhost> <87y16bzzxl.fsf@localhost> Date: Mon, 08 Jul 2024 15:56:48 +0000 Message-ID: <87o777zxkv.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain 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_H3=0.001, RCVD_IN_MSPIKE_WL=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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.62 X-Spam-Score: -6.62 X-Migadu-Queue-Id: D36D2B981 X-Migadu-Scanner: mx11.migadu.com X-TUID: QpFRCC1rgzoC Orm Finnendahl writes: >> Yes, roughly like this. Ideally, we should simply modify >> `org-export-as', but handling output file name may be a bit tricky - >> it is somewhat awkwardly placed in the current ox.el API (see the >> discussion in >> https://list.orgmode.org/orgmode/25393.61240.135445.401251@gargle.gargle.HOWL/T/#u). > > Today I had a look at ox.el when upgrading my code to > 9.8-pre. Unfortunately the code (and behaviour of org-element, etc.) > has changed quite a bit and I had to fix many things. > > Especially in org-export-as the parsing of the tree is now done in the > lexical context of a copy of the buffer which makes implementing a > multipage backend even more awkward. > > IMHO the code is just the wrong way around: org-export-to-file calls > org-export-as which combines the parsing with generating the output > string. The multipage code has to split that part and that doesn't get > easier when both parts have to be evaluated in the context of > org-export-with-buffer-copy. I'd rather have that turned inside out: > Instead of org-export-as being a part of > org-export-to-file/buffer/etc., its functionality could be at the > top-level and then call org-export-to... appropriately (either for > multipage output, single-page output, buffer-output...). I will handle > it by splitting org-export-as just before the > org-export-with-buffer-copy, but consider it a bit ugly. Or we can make `org-export-as' retain INFO channel when returning the output. Then, we can make `org-export-to-file' make use of the INFO channel to decide the file name. This way, there will be no need to decide the file name before running the parsing. > There is something else: A lot of my energy in the multipage backend > went into getting links and footnotes correct. Footnotes aren't a big > deal, but I have no idea how to handle cross document links if > different backends are present (e.g. linking from html to a pdf > document and vice versa ;-) I think this requires quite a bit more > thinking and maybe is unrealistic altogether, but at least the > framework could be changed to be able to tackle that in the distant > future... Yes, it is an important feature we would need to implement - turning internal links into external when they no longer point inside the same document. Somewhat relevant code: `org-export--update-included-link' and ox-publish. For links to external pdfs and co, we have discussed what can be done in https://list.orgmode.org/orgmode/87a5rpoi4c.fsf@localhost/ TL;DR: In latex, \href{file.pdf#anchor} works; In web, anchors should also work with pdfjs. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at