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 ms5.migadu.com with LMTPS id WOCGO/TycGLOhwAAbAwnHQ (envelope-from ) for ; Tue, 03 May 2022 11:16:37 +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 6CwOAPXycGI+HAEA9RJhRA (envelope-from ) for ; Tue, 03 May 2022 11:16:37 +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 77FFE192BE for ; Tue, 3 May 2022 11:16:36 +0200 (CEST) Received: from localhost ([::1]:55570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nloe3-0000hG-7L for larch@yhetil.org; Tue, 03 May 2022 05:16:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nloco-0000e6-4U for emacs-orgmode@gnu.org; Tue, 03 May 2022 05:15:18 -0400 Received: from ciao.gmane.io ([116.202.254.214]:41116) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlocm-0000az-2B for emacs-orgmode@gnu.org; Tue, 03 May 2022 05:15:17 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nloci-0009Y0-OF for emacs-orgmode@gnu.org; Tue, 03 May 2022 11:15:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Karl Voit Subject: Re: How to export to markdown programmatically without the table of contents? Date: Tue, 3 May 2022 11:15:04 +0200 Organization: www.karl-voit.at Message-ID: <2022-05-03T11-09-34@devnull.Karl-Voit.at> References: <87ilqpip86.fsf@mbork.pl> <87h767j2ry.fsf@mbork.pl> User-Agent: slrn/1.0.3 (Linux) X-GPG-Key: http://www.Karl-Voit.at/Karl_Voit_GnuPG_public_key.gpg X-Registered-Linux-User: 224337 X-Confession: Pastafarian http://www.venganza.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Reply-To: Karl Voit Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651569396; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:references:references:list-id: list-help:list-unsubscribe:list-subscribe:list-post; bh=VVu4xH60pkrvkF8Odg18bjJ0gPeOCBH6qt90YdYNJm4=; b=O+fRDcM2CZBGbDQQTtIL5V/599sdq3VSzHiHcE8u3JFAZdCEaDRXUc4a7BN04CDdt6vLGb Jl5whPdT8YxzBUb4pK0ad3G7GBKibR/WfZIuVaXQcc6h76zRxdId8ttGpDu/UTNCu6gZ9n y15967v4kK0Bqw0HZ5vk1xEAJfFOp9yCUjIqLF5c4lSLsGbghR9kLtri7bLAI+Qs2LliJm jXBTRCDrxVE+9V/TnHrhKYNtzkXinZJ+bl/wQCvVQnWptq/XDumKMBbppYekkd/mqirRp7 IhFwnnH1isSQebrfKf5RWt+JWSXGc1D+BvdqlIh9vJpIJMXTGjzCHnOSVQc5gg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651569396; a=rsa-sha256; cv=none; b=NUGQAxiGJQx9NRaV2FP4EK2AtpSxKaCqGMnH3Lz+se65AW+PkONEUOUOZbnZDa8cjNeJ+A iK7ksXHc5z6MPyS7esIhytRryboe09zf6855V5nsmNO+T810T2I9z6ym+/4PPOTOg4LDuL 260v1hSD/2nhL8GaCYpFjXXGOBRKrRuI9bNxh5TTK5QS+L5yRE/AC5dY9u9melJwqP/Csk 1xzivP979jS0bwolQAsti3GseOkW/H8Wn+F5zqe1lVkjscGrAOrto+DljAF2yJ0WLEzmzd KLINf9u4gSiyZoGtg0dd02tr9oZrQYvUHLstXMZ/CgADAjexvHUdqNq7OhKi3A== 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: -1.78 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: 77FFE192BE X-Spam-Score: -1.78 X-Migadu-Scanner: scn1.migadu.com X-TUID: vk5lemJml4bO Hi, * Marcin Borkowski wrote: > > On 2022-05-01, at 22:01, Berry, Charles wrote: > >>> On May 1, 2022, at 2:20 AM, Marcin Borkowski wrote: >>> >>> I'd like to export a Org-mode formatted string to markdown, but without >>> the table of contents. >>> >>> (org-export-string-as my-string 'md t '(toc nil)) >> >> >> It does seem odd that BODY-ONLY as `t' gives a toc. With latex it does not regardless of `:with-toc'. >> : (org-export-string-as my-string 'md t '(:with-toc nil)) >> seems to give what you want. > > http://mbork.pl/2021-05-02_Org-mode_to_Markdown_via_the_clipboard I tried this neat code snippet today with Emacs 26.3 and Org-mode 9.1.9 and I got an error: | org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export When I execute the following code, I get the same error: | (setq region "/foo/ *bar* https://example.com baz") | (org-export-string-as region 'md t '(:with-toc nil)) Could it be that I don't have "md" as backend somehow? Is there a hidden requirement? Do I need something like "(require 'ox-md)"? I somehow noted that those export requirements are not necessary any more. Maybe this is wrong? Thanks! -- get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode: > get Memacs from https://github.com/novoid/Memacs < Personal Information Management > http://Karl-Voit.at/tags/pim/ Emacs-related > http://Karl-Voit.at/tags/emacs/