From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +IT8EuTtVmNOhAAAbAwnHQ (envelope-from ) for ; Mon, 24 Oct 2022 21:56:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id wOlNEuTtVmMQmgAAG6o9tA (envelope-from ) for ; Mon, 24 Oct 2022 21:56:20 +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 DE7FA29C73 for ; Mon, 24 Oct 2022 21:56:19 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1on3OF-0001rN-MM; Mon, 24 Oct 2022 15:45:39 -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 1on3OA-0001qj-SQ for emacs-orgmode@gnu.org; Mon, 24 Oct 2022 15:45:35 -0400 Received: from mail.choca.pics ([2001:910:1410:500::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1on3O8-0003nf-LL for emacs-orgmode@gnu.org; Mon, 24 Oct 2022 15:45:34 -0400 Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id CAA47181942A7; Mon, 24 Oct 2022 21:45:17 +0200 (CEST) Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id jPjxqejJnuUM; Mon, 24 Oct 2022 21:45:17 +0200 (CEST) Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 4A3D5181942B4; Mon, 24 Oct 2022 21:45:17 +0200 (CEST) X-Virus-Scanned: amavisd-new at choca.pics Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id 3Wc0eiL-F4vN; Mon, 24 Oct 2022 21:45:17 +0200 (CEST) Received: from localhost (153.226.95.79.rev.sfr.net [79.95.226.153]) by mail.choca.pics (Postfix) with ESMTPSA id 0597D181942A7; Mon, 24 Oct 2022 21:45:16 +0200 (CEST) From: Damien Cassou To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: Request for feedback: ox-linuxmag In-Reply-To: <875yg9uy0j.fsf@localhost> References: <87h6zunxvy.fsf@cassou.me> <875yg9uy0j.fsf@localhost> Date: Mon, 24 Oct 2022 21:45:16 +0200 Message-ID: <87k04pgg4z.fsf@cassou.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2001:910:1410:500::1; envelope-from=damien@cassou.me; helo=mail.choca.pics 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: , 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=1666641379; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=NqZ+cnUIHt4a+mKl0N2sHjfjAW8TzGP/XmyGLbwomrQ=; b=Ga9/zabgc8pDHew97itw47FqHTDljwKkRlKEqMoY/Fas7y1fh5V/Plg0xPfIx/nYPlMrF/ sWhTVNehadPqle/qjaBIeCprCvPFTu78jz1iG7TayVfOyXCpHRWn+OV7XjXUVnf36Pz/5T rHk5bSLFVFO4FCNofflPJEJXOvDer1yIO+vr/e6vPbzZLt8pLVLs51LzJvVsY9SVKdIdlg RprRbB1hjgrEz31HIdhXoLv5XGLKvCQiOhUzdSKKBR8W3paeMjhtF5//uCw1v3Ri61NEg3 qxH0GDg0zKOoXDYtR4DGgDM8mXBEQEokU7njEak1enVUTFcQ7H9ldMPs0w/uig== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666641379; a=rsa-sha256; cv=none; b=aiBsyTcsjgTXmHtgR/CLqubG5yiHJqvdQ9vKPDeWmyxAv3+50GlpuS5hIqG0jCcjyCOrKN aiOTUit/PxABhGYnTqPLY1kmIERrejvp8hzSEIhjzrVhXWTZCpuWJoKX5fY49ipCAcj7/v OArpDowS/j/CJbUoYH2gko5eB+u5C3926KF65ot+hz9Y11EF0UB0MmPV7TTGusaXMN8nZi eyWrHVbEaLn9RxGqTJ4pmXl+dSHdYQhaJP+pXsUTJP5UMrATfwk4wT9oeeL/iFh4JWutJZ qovP5TTWi8+pDgU4tYncJiSprDzShxL+M0gkpTkbH93D4SGcI2qSVd9YX0/xmA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=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" X-Migadu-Spam-Score: -3.70 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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" X-Migadu-Queue-Id: DE7FA29C73 X-Spam-Score: -3.70 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2R5vTGWApw9v Ihor Radchenko writes: > Why not using org-export-define-derived-backend? I didn't know this function exist. I changed the code to use it. > Also, linuxmag might be confused with=E2=80=A6 What do you think about ox-linuxmag-fr as package name and linuxmag-fr as exporter name? >> (defconst ox-linuxmag--resources-dir >> (expand-file-name "resources" (file-name-directory (or load-file-name = (buffer-file-name)))) >> "Directory containing the style and template XML files.") > > This will spoil the installation dir. What do you mean by that? Do you have a different way to do it? The odt exporter contains a similar variable and external files (see `org-odt-lib-dir`). > Your template function has side effects. Side effects are usually > implemented inside the export function. like ox-linuxmag--export-to-odt I guess you are referring to `ox-linuxmag--write-meta-file` and `ox-linuxmag--write-styles-file`. I would be happy to move them to the export function but they depend on `info` and I don't know how to get that from there. Also, I copy/pasted the structure of ox-odt which does something similar in `org-odt-template`. Any recommendation? >> ox-linuxmag--export-to-odt > > Why is it marked as private function? By convention, Org exporters > provide public function to export programatically. You are perfectly right. This is now fixed. Thank you very much for helping me improve the code! I really appreciate the time and effort. --=20 Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill