From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.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 gM0eOXF8jWZuyAAAqHPOHw:P1 (envelope-from ) for ; Tue, 09 Jul 2024 18:07:46 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id gM0eOXF8jWZuyAAAqHPOHw (envelope-from ) for ; Tue, 09 Jul 2024 20:07:46 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=QhxpR9CA; 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=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1720548465; 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=mKq2ysp/5VjN7tn6QPacYQ/qpEumuR4GXZaT0VkxQH4=; b=qRotHhXWCsDEjTXSkhoocz65PLIKw52U/OoIeABCfB2AGX3GC7b+y94WLFi8NUGFJuk899 bLS7oB30DzsJUhp3y5bV5rN5X8i9JBjrW+VTYmv0yTo5eHs8nMb53pTcxtdVWcMOWskSF7 OTpn4kXlsybVgvhppC3NoQ/kBkG3HWF7MMkswIGENIeFAHJY/XRrJ9OL7lUl3U691v/MtG REzUvfGJRK/5xx7ZP122vyJbPd/7paGPozrq3KMmmYO6SO4B1m2XKEgikrX5jhsIJaRiAy rMCRu/5pf8DJVGY3ZNYNP7tXxChz3u6dHBwe5iB9DLKeWN34iVRYEQvOqwazhQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=QhxpR9CA; 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=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1720548465; a=rsa-sha256; cv=none; b=eW2Y5LKc5CsFPvpaBlLU9Qk3+NNu1cTXvy8zHLrQFelALlaHaiSALL+ox8rmSSEfwwZg9G EOiuVO3XhEJAmlSuON90QYpc1K8t9K0/1fnQ6FDMXyV+xqUyuQMt7U8TWZSQz2xAIGKoCj Bu0+tqeNHj00rSFJUR7dwUhvuqTbthjLaSJ/u2HP8YZmcwniYNpFyrWdb2uwQJZWTxBTsp 7ym2+H25xQ/eH4di4/H1QbHvc4YcdwPwKx5Qh/oADyhwVk9dglCj5ixnry05EqgvafHt8l nAEsQZcsfOv6w2I8YL4VzXYV3cV6cZ4UElwN4G6z9VAOnmtLoR+ZjNgQ4qv9VQ== 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 C339426A73 for ; Tue, 9 Jul 2024 20:07:45 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sRFEm-0007XB-LL; Tue, 09 Jul 2024 14:06:48 -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 1sRFEi-0007Ww-5d for emacs-orgmode@gnu.org; Tue, 09 Jul 2024 14:06:44 -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 1sRFEf-0001zw-NZ for emacs-orgmode@gnu.org; Tue, 09 Jul 2024 14:06:43 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 31485240103 for ; Tue, 9 Jul 2024 20:06:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1720548397; bh=AGC6kXmG0zRYyCVGKz4FvP8F77Lj4H9TryPTAokYbQc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=QhxpR9CAtJfWzEgm3RUp1JrydHndAXJMbI2Fi5qKPv2u7TYlXtif9YbC44F39WQLw 6wWtj0SW3vApUYmgwJbUhoxZs/Jax7EFzaTwfFUiKqqlpREyhsWykgYLXIT8T74RRB +nftHgm1WI7U4W+g4ecxl/ltO6l+7TVTKopDjIISN5SWfdzMHGfcSfQIOHIm2huNtM xDcPPOoJWx5nDSrHdMKg5XPavnfr7hesJlK0oXqLmZYXR5YSSs9LAuQuR7oBgQrSBs GnOH7ou+oKqgf8hfWt0MNpXohgDAguVEqCtLX+nyn7xHbC384Ljhc5NppU4jgExVVw zGnFqghwFR3Bw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WJTT840Jkz6tx5; Tue, 9 Jul 2024 20:06:36 +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> <87o777zxkv.fsf@localhost> Date: Tue, 09 Jul 2024 18:08:10 +0000 Message-ID: <87r0c2781h.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-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -8.13 X-Migadu-Queue-Id: C339426A73 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -8.13 X-TUID: kODFciazbv7d Orm Finnendahl writes: >> 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. > > Are you sure that works? org-export-as currently returns a string. It > could in addition return the parse-tree in info, plus the smaller > parts which need to be exported, but we should not forget, that > org-export-as is an inferior function called from org-export-to-file > or org-export-to-buffer. But maybe I misunderstand what you mean. That's exactly what I mean. > Here is what is needed from my perspective: > > 1. parse the tree of the whole document > > 2. split the tree up. > > 3. call the export backend on each of the split parts to generate the > string and save it to disk or do whatever is appropriate. > > For me the most natural way would be that a central function > (export-according-to-org-property-list) does the parsing and then call > the different backend functions to export according to their rules > (the trees being converted in the central function or in backend > code). > > If toplevel functions like org-export-to-file use org-export-as, than > org-export-as should only be concerned with generating the string but > not with reparsing. Sorry, but I do not understand your concern. > Alternatively we can do the conversion to a string in the central > function as now with org-export-as, but there still needs to be a > mechanism to generate the different files for multipage output and > call the export backend on them to save them or whatever. Or what did > you have in mind? What I have in mind is that `org-export-as' will return a list of strings + INFO. INFO will contain data about which files to use for saving the strings. Then, the caller does the saving and whatever is necessary. If we write to files from `org-export-as' it will be a massive breaking change in the expected behavior. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at