From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EDpHBU4+W2PIcQEAbAwnHQ (envelope-from ) for ; Fri, 28 Oct 2022 04:28:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2McjBU4+W2MIJQAAauVa8A (envelope-from ) for ; Fri, 28 Oct 2022 04:28:30 +0200 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 ACC6435B31 for ; Fri, 28 Oct 2022 04:28:29 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ooF4h-0000CS-9n; Thu, 27 Oct 2022 22:26:23 -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 1ooF4Z-0000Bf-RZ for emacs-orgmode@gnu.org; Thu, 27 Oct 2022 22:26:17 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ooF4X-0005yI-QV for emacs-orgmode@gnu.org; Thu, 27 Oct 2022 22:26:15 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id F37AC240026 for ; Fri, 28 Oct 2022 04:26:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666923971; bh=4gJO4qm8OAuNXH62BaxJ6ReI2tyXcrMlgGvJmACyovs=; h=From:To:Cc:Subject:Date:From; b=Y2cbss4KZMgJ4Rw0HKRS3htiAK4iL11p5CoP3S3e/Ds9+4NspYr/wo76+LHGWp9Od eEUI6kpjVQSi16avfbtfu8a4nsq4ioUfeCTHPk26yPgQltKBNNysPTTKkL9/7+gYgA XywaRaMmC1dHd47wwl5GZx5GPe31sXGY6WqRWPGGfW7RIpFb3qtDQugkjjZlGiVEkD 1O74mzYnTsfOlF2J6tuWVjZKpGeKXXBxFfvuUCYRWhju6U5d/BGD01jqceTmDyF98v n4LhB8FzoCrx2IGjg27C7pIGLwAFK90ngCAuVsXMUnAiQWl93X9FTj1V5dIDcuhUxe AoqWBtD6NDr6g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Mz5y84Lhnz6tmW; Fri, 28 Oct 2022 04:26:08 +0200 (CEST) From: Ihor Radchenko To: Damien Cassou Cc: emacs-orgmode@gnu.org Subject: Re: Request for feedback: ox-linuxmag In-Reply-To: <87k04mwe4j.fsf@cassou.me> References: <87h6zunxvy.fsf@cassou.me> <875yg9uy0j.fsf@localhost> <87k04pgg4z.fsf@cassou.me> <871qqwtjo6.fsf@localhost> <87k04mwe4j.fsf@cassou.me> Date: Fri, 28 Oct 2022 02:26:51 +0000 Message-ID: <87lep0n0no.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666924109; 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=7zAteV53S9VIYoTjyJN8E7wklBW5O0JqT77Ku8dhs48=; b=XlsdpkPv4puadxr2EsnoQL3AVrtLhoE1i2t5aODF27IBXkgtNCQZ+jBlRN24XiawKrVujd ddeH1oaBRVl70EbsbzzSrqf5rdS/7LSqkVyjYo6cvZlrH3tzmJFlzVqGC+FGW/N4HXF4d4 rs1fp+aQ4crbV7FNi9B2OK0aTWXVpBlJczNN6gRSNIwgt6/0Vfj9vdpu3idVsmGukme96d kAg3CNUbAOSoNPnyX8cuaIBX1V1cHVyt9fX0bqFbH+8RLttI2uh2+kgy1XGZ+czNoOpkMN XTtK3wXQM3Sq6fjSkAYrmAkVniR1dSY53gWdVlAZb12l6Ua69LngbI1PI1JjVA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666924109; a=rsa-sha256; cv=none; b=nRy4wKmnrWAUYqrhCLArWgST7X4RWeQnv+AjzN3tWIzXYIHvCfJPcAaOExq+g6wkc9NUKX QbRdlYaCBFvc1YKA3a5ZKTRXXa2x6+NlWKjgcVmL6xNm6A1Tuq1tshdEv5S73v1xFQ0nAi XwC0UNuoCA1XSAXxuqbJLxnQylSQvQ1zUyLK4XIvWxLCArkU2XxltFESyN9QK1PmNdXPLH wCGZ88+A276TCb3iwoxmjf/MdDo1dNWAskcuriS7T8lgSNVqwkZoj2oscCh3CAREoAi6zf AMBQLotYOOAeP/b4+2vFv4Zen7F3Gsepty7HkdLzz6iuj8jrtQGfuDISOogsQw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Y2cbss4K; 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" X-Migadu-Spam-Score: -6.91 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Y2cbss4K; 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" X-Migadu-Queue-Id: ACC6435B31 X-Spam-Score: -6.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: OMgRSCtDq/pB Damien Cassou writes: > Hi Ihor, > > Ihor Radchenko writes: >> I think :filter-final-output in :filters-alist will be more suitable. >> It is called at the very end and may set some let-bound value to be >> used in the ox-linuxmag-export-to-odt. > > I'm not really sure what you mean with the last sentence. In my last > commit, I made use of :filter-final-output: > > https://github.com/DamienCassou/ox-linuxmag-fr/commit/195f154d5f76f50a94e4bdc95f27c8400e77992d > > (please note the new URL of the project reflecting its new name). > > As you can see, I didn't change ox-linuxmag-fr-export-to-odt. Do you > suggest some changes there as well? I think you misunderstood what I meant. (Note that this particular suggestion is more about code style and ensuring side-effect-free export if something fails). The idea is that before org-export processed the Org buffers and produces the final form of the converted output, nothing should touch the filesystem. Otherwise, if the export process fails for some reason (like user filter erring), some garbage may be produced and left on the disk. So, my suggestion is to set some transient data in your custom output filter. Then, inside ox-linuxmag-fr-export-to-odt, you can reuse the data to write all the necessary files on disk knowing that nothing failed before. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at