From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id YIJ8CurcemRwRwEASxT56A (envelope-from ) for ; Sat, 03 Jun 2023 08:25:46 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id GDFNCurcemSJXgAAauVa8A (envelope-from ) for ; Sat, 03 Jun 2023 08:25:46 +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 C57591A817 for ; Sat, 3 Jun 2023 08:25:45 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5Kgu-0001V6-4Z; Sat, 03 Jun 2023 02:24:44 -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 1q5Kgs-0001Ux-Ot for emacs-orgmode@gnu.org; Sat, 03 Jun 2023 02:24:42 -0400 Received: from mail.mojserwer.eu ([195.110.48.8]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5Kgq-0001ko-Nu for emacs-orgmode@gnu.org; Sat, 03 Jun 2023 02:24:42 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 6AAC59E082A; Sat, 3 Jun 2023 08:24:38 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LV5hg0PLm0r4; Sat, 3 Jun 2023 08:24:35 +0200 (CEST) Received: from localhost (178235147098.dynamic-3-poz-k-0-1-0.vectranet.pl [178.235.147.98]) by mail.mojserwer.eu (Postfix) with ESMTPSA id D819222715A3; Sat, 3 Jun 2023 08:24:34 +0200 (CEST) References: <87353exyyz.fsf@mbork.pl> <87r0qyuyoa.fsf@localhost> <87353dr73o.fsf@mbork.pl> <87ttvpp68q.fsf@mbork.pl> <874jnpdtei.fsf@localhost> User-agent: mu4e 1.1.0; emacs 30.0.50 From: Marcin Borkowski To: Ihor Radchenko Cc: Org-Mode mailing list Subject: Re: How to export to the simplest possible HTML? Message-ID: <87sfb9oyjy.fsf@mbork.pl> In-reply-to: <874jnpdtei.fsf@localhost> Date: Sat, 03 Jun 2023 08:24:34 +0200 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=195.110.48.8; envelope-from=mbork@mbork.pl; helo=mail.mojserwer.eu X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685773546; a=rsa-sha256; cv=none; b=S7iN88TQ22q8WwHp4fHfKfyUf7mbt7RfGSysfJ3u5CBqTQye/PV0wasvfu0EG9v2TBmVfB yPPIooHf2xzFPcCHaVftlT7zy6Go6OGhCmuJ4LPsBQDdpHdrIT1wFRSxjIcLGnP2MdGtmj ErzUbOg4IngWCljtrLMaDhg0/j3FaytKSV2r7TLfXd66onzyZyP7lAoTqd5iPV88/ECfDM AdD9Ey+D6vpBD8NcXlIN4CUA3sDrLYwyZS3q5DgZCJFP6Wz6NobhonGe6WBE4TaqnE9qe/ lpk2n9/TumA8tzpI5i1n0YCriZbTN/tzK1HyF+DB1SDgNteHfaoqg2q6+AAgKg== 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685773546; 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=14YQHBRtNtXXnk/OoP8uxJ59csXQ9JHL+w2Wo3G2BBI=; b=NXH1b9sIrqDlGlhnnBF7qoRkdfT+5QB/SLD9EUe2Wv9JdVwtIqW568X96qjEFCJBDdoLHX RvfxBhf1DBg75igu4wgiQ2iIATdkT2pN4xgE8yO3oGJZL/rC5hHhGp7CBfo4xfJgZ4M7bi WybNR7s92xPRsUIDtHE4L0c7h8aJQP8rtGFzOszVrRddepq3FoG43UOhtoaaybpGdi/9eC 0VYKCiQ2Wj2Ku3wqk+PkEo2JRfGgqfGxFNxr0/0HXp1gr+FaeFmfhLTHWtMg1I5HhWLnei mYu6Fr9pb8CVD+nlXvhkJqaG1x25F7sEwugDUtYn9EshtYxrnv8NJU01w1oiAQ== 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-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -3.17 X-Spam-Score: -3.17 X-Migadu-Queue-Id: C57591A817 X-TUID: CMQSN/ScP18+ On 2023-06-03, at 07:08, Ihor Radchenko wrote: > Marcin Borkowski writes: > >> On 2023-05-30, at 20:45, Marcin Borkowski wrote: >> >>>> Just use `org-export-as'. >>> >>> Thanks again, I didn't know about that function! >> >> I tried playing around with it, but it has one drawback - I can't use it >> to export a subtree containing a link to another subtree, and that is >> something I will definitely need. (I can see why it works that way - >> for that to work, I have to somehow make sure that subtrees containing >> targets of those links are also exported at some point in time - but >> I need another behavior...) > > AFAIR, ox-hugo implements what you want here. I know, but after a long consideration and some experiments I decided against Hugo - I want something (even) simpler and I plan to cook myself a pure Elisp solution. >> My current idea is to go with a custom exporter derived from the HTML >> one, indeed. Is there a better approach? > > You can loop over links in the exported subtree and export any extra if > necessary. For example, in the `org-export-filter-parse-tree-functions'. Interesting. The main problem with it is that the docstring is rather concise and I don't understand it well enough to use it. I will perform some experiments, but if they fail, I think a derived exporter with a custom link-exporting function can also be helpful. Thanks, -- Marcin Borkowski http://mbork.pl