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 wG51LlGSAGP7RwEAbAwnHQ (envelope-from ) for ; Sat, 20 Aug 2022 09:50:41 +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 cA6jLlGSAGOFTAAA9RJhRA (envelope-from ) for ; Sat, 20 Aug 2022 09:50:41 +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 6557817BA1 for ; Sat, 20 Aug 2022 09:50:41 +0200 (CEST) Received: from localhost ([::1]:40406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oPJFg-00055T-F8 for larch@yhetil.org; Sat, 20 Aug 2022 03:50:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oPJDt-000554-K3 for emacs-orgmode@gnu.org; Sat, 20 Aug 2022 03:48:49 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:45732) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oPJDr-00079m-QC for emacs-orgmode@gnu.org; Sat, 20 Aug 2022 03:48:49 -0400 Received: by mail-pl1-x62e.google.com with SMTP id u22so5836502plq.12 for ; Sat, 20 Aug 2022 00:48:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc; bh=rDmcDYaIvUlKusVRoroZiGADBfqgWvQKlDOyf9DeNuU=; b=jvhkr9KFB43C+qORyFwbUJiW9Pu1rh78jsF9kZhGtPXKOxIcNKA2tVCLof1WBSvRLx XBZB1z6rvDJI4FosqbKbKYOylat0eap7if85FEalFvBruReCuioaXPU4shdsKLtR8tdE oDS/IKZc+n/KzRAv2OPqEpTsxAqeFQrTMlWjGCLuyMkzR9IpeTAwKcn4m79csVqFPTAP R6rnkXSG4c96tg1iH17ybazEvroZ226SYT36JgGfE0z3ycPGclng7NjTHZ0D6lTcelyw 4NDHTU0kcs3yyXozjechEyYHBSAAPWeax7MKx9QhtLs6vy4j+o4rfKCb6gZvA2bUkocs KcRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc; bh=rDmcDYaIvUlKusVRoroZiGADBfqgWvQKlDOyf9DeNuU=; b=rKgU0Yp1PEYq03kyXMMSI4hQSiwl9j+5+zXfY1Jin9vDT5BpKNuvFBTMuS9Teqzkkc PQatPWniE8f4hgOkBrKjM/+hOxHtHYpxbqEYClOA+pPQTYBSvU5ErDxGtDmCwxqEq6BW A3XAa3OJG5NGa/9RT7DvAwAxHrcj2q91OP5+PuzrvSj6e8du9MdbAQrvO1luNHPxn1Gd PCasJv84AuYN08P84TzQcBF3PnAtAhFcQiNfgWtfUtP1Egg8S0+nQU50le2WfimDuRdO 9twEKpdF1RqXjq548GUWZpY+jXqBu1K4WOFQvzJQKxRmbbQFau+pbcLFyjtFwoE45a+L iTLQ== X-Gm-Message-State: ACgBeo3Uc97zSPGU9MCOYH0nQzxO+RC6CbQS8dMJmByNd2JfBUQ3vcNK HaV/QAGK3xuX83yOHBc50QqNYD2JIw0= X-Google-Smtp-Source: AA6agR43mS6Uc7sRCVI6QdA/Ds09HgcFbU3ZxzG7oL37sicX6iVpdJ9T3j5FrBpWrywE7IuRWR5YaQ== X-Received: by 2002:a17:90a:e543:b0:1fa:d591:12c4 with SMTP id ei3-20020a17090ae54300b001fad59112c4mr10474715pjb.91.1660981726224; Sat, 20 Aug 2022 00:48:46 -0700 (PDT) Received: from localhost ([2409:8a70:2b9:1e80:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id w1-20020a1709026f0100b0017150330889sm4296192plk.189.2022.08.20.00.48.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Aug 2022 00:48:45 -0700 (PDT) From: Ihor Radchenko To: Rohit Patnaik 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 In-Reply-To: References: Date: Sat, 20 Aug 2022 15:49:42 +0800 Message-ID: <87zgfzmk15.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=yantar92@gmail.com; helo=mail-pl1-x62e.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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" 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=1660981841; 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=rDmcDYaIvUlKusVRoroZiGADBfqgWvQKlDOyf9DeNuU=; b=gSDtcR1aA2iet+RFhSM/+0n03Fdhh1uMrKdAEeO3VMLgBeN1CYCnSDHzJ0yksI8iPwj1u9 Gxsl7QPfY/Ph0oRv+j0UCp3Or8MlhxhNWOUB/GZC6XcmAzy869UEicC6nKY1Ju4dbvQw2y uV9fpFvTOmHY3grxc7QIGZWtwJYrVXdOhRFL0hTOER6XQUjr2YbcJS/lSj7encf6HZho/Q Fq6KT3MYP4SjblWmRQgMxLq5bfcocZQxj7RtSdGz/wTd7kmV3gr6ITS5f6gUlXKom6ju66 Rz2BFo2SIaZH2+wKZa+XXmmDClDat8R8Kb40bXd7DsDHt2A24gER7NFbfsjG1A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660981841; a=rsa-sha256; cv=none; b=RSMpU6f2Rss+IE3dkaHTwRi4hq90d3d90xbZxYqFGLwUZ0bM2EZ+GD94kOkCR+QVC/pfGT RJd/3ODbmKoqZM1EIOgrRJ2m+i70895f/fBB4obtfXy/UjDHC/9OOtnHR4RN//dvTcVHWg ibM9KpV3aSg7MEaBnVIN2JRtzQRZLFzy2hFFzeIlU84PtpxyhAmgT3LgG+5TN3cFFfCdEy wwr32ay+uhMiYXxk+iCfTboFj7xw0kWW9/788vyWYR640+n51ynLcuh32PbFO1NT97n8cW qeaGsIDrTQ5cdRa+ASSzOmIBME/tAsw2vtupiOffh7cWNTXvlFrEkdkZCLNbpA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jvhkr9KF; dmarc=pass (policy=none) header.from=gmail.com; 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: -4.95 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jvhkr9KF; dmarc=pass (policy=none) header.from=gmail.com; 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: 6557817BA1 X-Spam-Score: -4.95 X-Migadu-Scanner: scn0.migadu.com X-TUID: kbd1pq+/Nsyw "Rohit Patnaik" writes: > Hello, > > I've been exporting several of my org-mode notes to markdown recently, and I've been running into an issue where I've had to manually adjust the level of the top level headings in my exported notes because the wiki system I'm importing the notes to reserves h1 (i.e. #) for page titles, using h2s (i.e. ##) for sections within the page itself. > > I noticed that ox-html.el has a org-html-toplevel-hlevel variable, which allows the user to set the heading level of top-level headings within the exported content. Would there be any problems with implementing a similar variable (e.g. org-md-toplevel-hlevel) to allow the user to set the heading level of top level headings within exported markdown content? Sounds reasonable. I do not see any issue with this approach. Just be careful to compute the level early before we decide the deeply-nested headline style (org-md-headline-style). > It looks like it would be a small change, and I'd be happy to implement it myself, but I thought I'd run it by the list to see if there were any major issues that might arise from making this change. This contribution will be welcome. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92