From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id 0BWkB5rMP2Y/DwEAe85BDQ:P1 (envelope-from ) for ; Sat, 11 May 2024 21:52:58 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 0BWkB5rMP2Y/DwEAe85BDQ (envelope-from ) for ; Sat, 11 May 2024 21:52:58 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=AwE3wzC4; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1715457177; 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=s3Io30czSarQ/zJNamgw8Sq82qAphbtEptkbUqk0N+M=; b=sS0xr98RIh6ThNOvir9y/60jbs8ZLNDJJZluvTQaHy2S3Zc6sI+BKQVfIEvSQRKcdkEnvi h0Az6BjpM1Rh5tmHU6zTU4fAbkNh10PKhFWFyhXIlcNr44+qHfNm6NKoNLe1iRjmpdVlQG Pk45l6g+/8gT9xUrFrfiur8mrhb5zqpkuPjSzNd6UdBf2NYV6sditi56bHYKpSDxXrOkw+ ma2RbSs2MILXz2kRqXpZvpNCtAWUBM6FKuOEusRWau0FfKJIPbXeJeMfIccIw6MNU90CxE uIWzNdVy8z6kVt81YekgYOd890YKZWa3k3wDBC6xGy1IVBQLC6uEtPdTWhgQfw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=AwE3wzC4; 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"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1715457177; a=rsa-sha256; cv=none; b=sDP/AbMuH7l6fNzzkONajU8je3HkkoHkloDpq/kLUOyCc6aoXjSdllJXS9y1wFjdk4wCXR A1cwq4MAxMupQIn1FPtSO5bHk7c2lkDf5CnquviNMdADbgHT89TVI0SmrHSQkwMNuCYbHf 7fiARbh3UDV5HBu8PJMvdLDe1jRTYjbDddn6+YXYH8AFtjvQ4JRDpMf2zClV/KQ52hJuci y999ztniSY07Vt/vRuYQG41Y+U5JWKpvmccSZ8sJyJJExTT0z1VfeDZ/VoaRL/XhYkpR/T QXnMUVf1PJTXtDkvDr4fcV2B8jZoCnt8RW4xx8K/pjDVWsQxyFlPtNCZ/bs5kQ== 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 BEE316D6C5 for ; Sat, 11 May 2024 21:52:57 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s5slT-000345-SI; Sat, 11 May 2024 15:52:15 -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 1s5slR-00033q-UE for emacs-orgmode@gnu.org; Sat, 11 May 2024 15:52:14 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s5slQ-0003EZ-5u for emacs-orgmode@gnu.org; Sat, 11 May 2024 15:52:13 -0400 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2dcc8d10d39so35650201fa.3 for ; Sat, 11 May 2024 12:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715457130; x=1716061930; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=s3Io30czSarQ/zJNamgw8Sq82qAphbtEptkbUqk0N+M=; b=AwE3wzC4M47UemtrU3NvyHn3KEfn1V6HlwytrpsYfWVl+VLmpqwWLDlaZcHFeYTO3d KsR2GFe6M1Yd79vegqqkIDII+3jlt68zpYv8cZFuwWFcrPS3rozCOU1j4bi9UYDYCzud ZFJmDCSxxerUWEvBnCzmUf3TlzgyYeNtlCIvPgXBodKfhOonuQxF6i6joDjExbgkMLM7 i1saLNDTMmH0WK5BEowqo9vaIb4UezmWnjYc0YmAzALDMKHnW6Fxot4y+hoQVaaQ9P1u E1H8rH8v57119x6GHs6GRR9zcWRlK1hNdZidsr2wZ9Z647GPTo+CNTR8Ebs3gLy6dT7c fCvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715457130; x=1716061930; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=s3Io30czSarQ/zJNamgw8Sq82qAphbtEptkbUqk0N+M=; b=nlflsAatmBg21OCp/qNHnTC3mv+7Gyx6zBTphicz0phvwBnh4r8/Sxiut73MZ67Edn TaYDzCDPED5KGvy3vHlRJpd4ex58IesmAwp99KO8SjvDljq0DWH85/kWRSCgWpBSfw68 Ggl5r7Mvy9apX2sR/31HlC9kLO2bBLWU1/UF/AoAOy0R+OjDcWQ09lXDy7eIreiGbW4A SCsWAeTVKMZeWkpr/k/J7VXiG6qEe4ZK7CoXXO3UHiPMV5/jMh9wNHAZic0AhaRVNsKH HF4Xa9m4asTWRVyO3l+k77KYTX3DxMbq6tFkSqa+KgEbStgxTDnKNuWfdmCWbCC33Zzv 4lVw== X-Gm-Message-State: AOJu0YyBMLwIJUVG1U0fHiZoMkLB20uQIDASPcPs/aA0PpRS7gS0w2MR +6fIxxBkExtyJC0QdqTv7JMJSxDbmS5pgQheLRT1dUMXN6OLe8COTSdYpw== X-Google-Smtp-Source: AGHT+IFAR72/En7AX3iznHU4CYYXji5Tu4qDJGTiz/0EVRpBSeRPNPGPRLppjPJuutdUDybJpR4org== X-Received: by 2002:a05:651c:1415:b0:2e3:bb5a:bef with SMTP id 38308e7fff4ca-2e5204aee02mr33916181fa.48.1715457130178; Sat, 11 May 2024 12:52:10 -0700 (PDT) Received: from gentoo-local ([2a02:c7c:c11b:7600:a0ee:7e64:eaa8:9d28]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41ff063d8cesm73407715e9.46.2024.05.11.12.52.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 12:52:09 -0700 (PDT) From: Lee Thompson To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] Add option to export mixed Setext and ATX-style Markdown headlines In-Reply-To: <87msowtdgm.fsf@localhost> (Ihor Radchenko's message of "Sat, 11 May 2024 18:23:21 +0000") References: <87bk5c2pax.fsf@gmail.com> <87msowtdgm.fsf@localhost> Date: Sat, 11 May 2024 20:52:08 +0100 Message-ID: <871q682kk7.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::230; envelope-from=lee.p.thomp@gmail.com; helo=mail-lj1-x230.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: , 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 X-Spam-Score: -9.67 X-Migadu-Queue-Id: BEE316D6C5 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -9.67 X-TUID: gP7V1jFiVubk Hi Ihor, > But isn't (setq org-md-headline-style 'setext) do exactly what you describe? My apologies, I should have included an example. What I'm trying to achieve is that instead of this: (set to setext) > One > === > > > Two > --- > > 1. Three > > 1. Four Or even something like this: (atx assuming #+options: h:4) # One ## Two ### Three #### Four Setting `org-md-headline-style' to `'mixed' would produce the following: (again assuming #+options: h:4) One === Two --- ### Three #### Four > AFAIK, headlines below level 2 simply cannot be exported with setext > style, so Org mode already falls back to atx in >2 levels. Unless I'm doing something wrong or I've been hacking away with older code I haven't observed this. It may be that I'm getting mixed up in terminology and what you've demonstrated in your example is indeed setext falling back to atx, but my understanding is that in your example the first two headlines are in setext style and the third and fourth-level headlines have been converted to Markdown lists. What I am proposing is a style where setext-style underlined headlines are generated for levels 1 and 2, atx-style repeated hash characters for levels 3 to 6, and then converted to lists for deeper levels. To demonstrate: #+options: toc:nil h:6 * One ** Two *** Three **** Four ***** Five ****** Six ******* Seven ******** Eight Exports to: One === Two --- ### Three #### Four ##### Five ###### Six 1. Seven 1. Eight I hope this explains more clearly what I'm trying to achieve, do let me know if not.