From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 EEQhEkSWdWQR5wAASxT56A (envelope-from ) for ; Tue, 30 May 2023 08:23:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2J5EEkSWdWTHsAAA9RJhRA (envelope-from ) for ; Tue, 30 May 2023 08:23:00 +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 BF0B622762 for ; Tue, 30 May 2023 08:22:59 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3sjz-0008Tp-Ob; Tue, 30 May 2023 02:21:55 -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 1q3sjy-0008Tg-EX for emacs-orgmode@gnu.org; Tue, 30 May 2023 02:21:54 -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 1q3sjw-0006kq-9y for emacs-orgmode@gnu.org; Tue, 30 May 2023 02:21:54 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id E3AB5240027 for ; Tue, 30 May 2023 08:21:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1685427708; bh=/s4VPG2lj3PnskTiUUunxBBxk8zqRT7BQCiALhbYD1w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=MiWCaEeQqyEGb/V8pWYinREXendpl5xbx+pJsA9JMNkezA6NYPXcn5xb4p7aiSNqs 4Nbt4yVrhUwLqymtNcaPo563BsjbqKXc+j3wkL1Fa83ow/teokyGi7jZgblJ8FvKXZ LajHbK2U2K90r7yVFGjyDKw+1zXYjcGAVWb1e04nXNszyGnKrQ/wFtmlnCLF5xVGn2 5FJnkbZWyE/mgrXFz/I1pAVTTPU2jITYCNrTxUbdwuxmP/8ChB6g0JnM/lq3fS8pGH SNoYhCVKxUvTpI0qwltN9zxTIOt7A9rTF1d+6JUF38WsM3FMP0/ufguEfaeRNnDv9/ x3opyIfEDUjNQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QVj3H6rlFz9rxH; Tue, 30 May 2023 08:21:47 +0200 (CEST) From: Ihor Radchenko To: Marcin Borkowski Cc: Org-Mode mailing list Subject: Re: How to export to the simplest possible HTML? In-Reply-To: <87353exyyz.fsf@mbork.pl> References: <87353exyyz.fsf@mbork.pl> Date: Tue, 30 May 2023 06:21:41 +0000 Message-ID: <87r0qyuyoa.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: -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, 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-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685427779; a=rsa-sha256; cv=none; b=mD6pot08XxNkbLTnu7cPBi7fHFjxsfqM38quG5JYBgCsQYaIDbHuaV+ZZc4ytC/QkxMfdV sC9d+kPHKlq3q9izQT+8MWMs5LYn5N5sLaoKTERumWWZYd6hWIJUE6eVtggR7y+uLfsRoE +8OKjIQ+5cIU6hZkWSamTs2gt3jDNMZgDRNFLHbOLU1SyW0JzvE72uOlCpIa7x9vxSVdjr Z8sTlDWvu+fcxsvZFwsaGI2bSiwrHMjHeF2I1TBhUL59qkDZqvLsnzQBUjv2LvA5qatWXj qgY36HBShfLlYJ/T4HheFtD2n4bWuKdi/+3aUXFsRApmOzU22bIqKl8xKHpnag== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=MiWCaEeQ; 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=1685427779; 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=0QJ4UKn8gBjxBGRmfnuHSRWqO2sDyEAiRomwgpbUMP0=; b=LmxSIgDVl20mlxDX8h61nrY11FCuqXyLLkubW3SgWQry9z0Zmrt7Zj0FoVIJv7eXc+lpCf 1xvVPxkBozxUlt3PH5o7gPdN5/B6OAuekCx3PWxG9bPcrEOUigowZmQdCWdu1jKDeO6oak 4BOktlw8isHOCrI5RA2GzQPBpYEo5pKI65W+F6qJABdbkhR5hiqhksr4+2EAmVUdBzrPf8 8igaFxrkdpaaMr5p0pS6o3wrOIKryVilEOq2ARMygLSgwwv+xiWS6vhY5Kh+zwNWQ4Xzb7 Paxrq/Bi3pA4I2V7yLiZLsBWQrsccWKSqlieb6EaPMF7ewOIJ6OWaZ4vsJQXAQ== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=MiWCaEeQ; 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: -5.11 X-Spam-Score: -5.11 X-Migadu-Queue-Id: BF0B622762 X-TUID: 1BZUl32yAvNs Marcin Borkowski writes: > ... I tried this: > > (org-html-export-as-html nil nil nil t '(org-export-with-toc nil)) You need (org-html-export-as-html nil nil nil t '(:with-toc nil)) See `org-export-options-alist'. > but the ToC still appears in the output. Also, I'd prefer to do it > a bit "less interactively" - for example, setting the current buffer to > the one with export results is unnecessary for me, since I'm going to > call my exporting function in a loop over many elements. I tried > > (org-export-with-backend 'html (org-element-at-point (point))) Just use `org-export-as'. > but it errored out: > > Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) > org-html-headline((headline (:raw-value ...)) ...) > org-export-with-backend(html (headline (:raw-value ...))) Because `org-element-at-point' does not return a parsed subtree. Just a partial one without children. > I also want to supply my custom formatting for italics & friends, so > that > > This is /italic/. > > can become e.g. > > This is italic. > > I'm considering writing a custom (derived) export backend, but maybe > that is an overkill? Any ideas? Derived backend will be the easiest. It is not even hard. Just a few lines of code. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at