From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 MBwVOm8SAmPtZwAAbAwnHQ (envelope-from ) for ; Sun, 21 Aug 2022 13:09:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8FUbOm8SAmP9ZQEA9RJhRA (envelope-from ) for ; Sun, 21 Aug 2022 13:09:35 +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 45DA3CC8A for ; Sun, 21 Aug 2022 13:09:35 +0200 (CEST) Received: from localhost ([::1]:55206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oPipg-0007YN-Uo for larch@yhetil.org; Sun, 21 Aug 2022 07:09:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39340) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPiov-0007Wc-I5 for emacs-orgmode@gnu.org; Sun, 21 Aug 2022 07:08:46 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:51769) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPiot-00023S-K1 for emacs-orgmode@gnu.org; Sun, 21 Aug 2022 07:08:45 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 2B90A5C00D0; Sun, 21 Aug 2022 07:08:41 -0400 (EDT) Received: from imap44 ([10.202.2.94]) by compute5.internal (MEProxy); Sun, 21 Aug 2022 07:08:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quanticle.net; h=cc:cc:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1661080121; x=1661166521; bh=Xa ZvwKg9l6MJ9BFixTJFTt0O6flmoan0JmekMar2oa4=; b=pvlZRNgDggeIL2LUTy vtPkLnB9nQui1a/jC3MDfFLnl9C1lgQ1JSzfmQRBAGrCM5ryO7BNKEE8/Kt7ggTn o34DLoq+ZGkgPfMiLDRw11u8wRKOGwm3jECm/QA02L6fRhFBvdLY1IqqULsQOUGZ IhOzf6lgjTy6l4swJJ/c4nEYpB0Ag9MQnJXvInjxueEKNktmYqa1w3N1LA8BFRwp vlrW1RJ3OJCH7+svLOQMAynVCM0Ad7R1V2qEm4SEo59aad2yNfDpHp/mrGltBsWk w334n+edDKGf35dMaE48JsM/5O2BIMmw4If5iGeqM5QnIs75mfQHeAuO0TmEWrmY jzPw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1661080121; x=1661166521; bh=XaZvwKg9l6MJ9BFixTJFTt0O6flm oan0JmekMar2oa4=; b=ax60RdFhP04nUzoEJIio37NCJjijrXBl+8ODZbvLvy3j jFDAAMpdX20gnLkpypGzi6rNXhWiFL3W42K+jmnICUkSUhA1n9HNsgb+SOftlXYq kynfrmqY0CISIkdQ6cqNeU8oFwOZCqncDRf6T+rgr1Y6nSOLHGgjwEVa21AtecHj kPFE4r7IQxmXAcpl9vFousTTFZkj1AVtfdb6ozRoKEtz4FHsS7iTNNBRYSeAGmhE EjjzPbTrMpP3qsPklCGeks6pmw4fAajUYmxko4iSHK5D/FsUcCHP1nZu1fll+8sb NfW7B0B8megG7Yz09gTYIevMFqomZ2vZO6Vcj9W2pg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdeihedgfeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvvefutgesmh dtreerreertdenucfhrhhomhepfdftohhhihhtucfrrghtnhgrihhkfdcuoehquhgrnhht ihgtlhgvsehquhgrnhhtihgtlhgvrdhnvghtqeenucggtffrrghtthgvrhhnpefhheelud fhiedtfeeffeehfffgtdevhefhtdevveffieejvefgvdduffehfeevvdenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehquhgrnhhtihgtlhgvse hquhgrnhhtihgtlhgvrdhnvght X-ME-Proxy: Feedback-ID: i0db1457f:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id E54E636A0073; Sun, 21 Aug 2022 07:08:40 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-841-g7899e99a45-fm-20220811.002-g7899e99a Mime-Version: 1.0 Message-Id: In-Reply-To: <87zgfzmk15.fsf@localhost> References: <87zgfzmk15.fsf@localhost> Date: Sun, 21 Aug 2022 06:07:48 -0500 From: "Rohit Patnaik" To: "Ihor Radchenko" Cc: emacs-orgmode@gnu.org Subject: Re: [Feature Request] Create an org-md-toplevel-hlevel variable to allow users to set the level of top level headings in markdown export Content-Type: multipart/mixed; boundary=5e1c88a3460b4cf08e05f8623cf80e8c Received-SPF: pass client-ip=66.111.4.29; envelope-from=quanticle@quanticle.net; helo=out5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_PASS=-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" 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=1661080175; 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=XaZvwKg9l6MJ9BFixTJFTt0O6flmoan0JmekMar2oa4=; b=rn1z9Q732SCLeQdwl+9xbOO+/E8wO2eBQKG2pDLCesj1K9fDwL1DhV8meH7BkeAhiCIvCN NkC4jiDv/XssD1/nVEYKgZ4SCgNqIs+T5dle57vqfyYJktjbSmlLpkpb43x1Kvo3OdPdSN m9tbpjSmWuVs6++UIwnq1l5skPWq1CrqLQp1fEpiyyRirku+pyoYy1mLHna43seDqQWmCP u3mGL6imsfeEd3+oY1IxIS0iRgGydR+LIcbE+M88x6ZTbmExOEFg7littySHTprtFmYsXc ZVvPiPYM7QDNCg5DJFyEVIYwWrwS/c9309fGbJwOPs0hG3yw7LSS7ULdq9Y6kw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661080175; a=rsa-sha256; cv=none; b=UTypqzgOoRQ7KeTC1zn7tpATjall7O+OCQycETiIhjP+a2iaKXMTAMoCVEJ9gIuJNJDili 24XiHhDdxKMy3aYarOTBD0cwBpKlQRn6tZ0+tMb07ivK+3tstQvhbuAN06qD37HnT3WX4D Q8D73qHDbJ+SrpUHLOX+3g1AoM5Cw8GEqiHvmgGbggmCIQa1SY6Viym/MBQlbk+nTYug2E e4S5of9bOr9suacEBQf8wSYGqa191hcnA4nfM896ZrEv2zfMOOeg575mmpYDZBx31OR63v wYzyGYZaeGaRqZS7fH/YDnyDjS3818t14pN4wa+uzrCMnIM49bdtSaM23U+J2w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=quanticle.net header.s=fm1 header.b=pvlZRNgD; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=ax60RdFh; 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.78 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=quanticle.net header.s=fm1 header.b=pvlZRNgD; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=ax60RdFh; 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: 45DA3CC8A X-Spam-Score: 3.78 X-Migadu-Scanner: scn1.migadu.com X-TUID: 47CgOjMF9fTz --5e1c88a3460b4cf08e05f8623cf80e8c Content-Type: text/plain > This contribution will be welcome. I've attached a patch which implements the change. I followed the pattern that ox-html uses to the greatest extent possible. I tested it by exporting org-mode files to markdown with the table of contents both enabled and disabled. I didn't see any errors, and I was able to make the top level heading a level 2 (or even level 3) heading rather than level 1. Thanks, Rohit --5e1c88a3460b4cf08e05f8623cf80e8c Content-Disposition: attachment;filename="0001-Added-top-level-header-setting-for-md-export.patch" Content-Type: application/oct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