From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id 4G4AGkIFGmZYPwAAe85BDQ:P1 (envelope-from ) for ; Sat, 13 Apr 2024 06:08:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 4G4AGkIFGmZYPwAAe85BDQ (envelope-from ) for ; Sat, 13 Apr 2024 06:08:34 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=quanticle.net header.s=fm2 header.b=YzC24PvF; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=u2CE1XQI; 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=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712981314; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=/6D0kfVlPh84lqYdO+kn8QemLV6Rb+3KWvicd9z9j4o=; b=kb0Ic6mwFJtV6Z4fZkKarEjpvRsX+2mxMR4F2dQ08hRIyfSQ8qMJi/p73HK8TGNMKJwRjF GMXGqNGtOSFXzs6OqLPrv62wpzs7jy4/pV5DB0dq0t1qItyuPRPgGypjGfDQxQj6d4lVv9 0oWKaqTa5yYyBqoxzziHWEsp57Woh0m70Bi1UfZNg6JQ/PRKuFWBqr4++23bm1nRzY+JCZ JtYtW3HMN0ZCjOZH5OeBC6vqPVWnEDZJuLad6Jljzu/rjf2VqQP7xFxkItWc88a6/F3/jg JmFhan1ILbQPppWCPCVJrGI+mXJeYNhaB+qfm+IzrONdZiNB3kfNs8LHghTeog== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712981314; a=rsa-sha256; cv=none; b=VQMYkOiZaBVuLhUC+xCtIdRc6WqTQfj4V39GKpS1xa07bhzv+FKn/vpbRPmjWNrBbKLHy7 Ok9YVQd6/0SYOu+bzy8eieUc16ugJqEp5wijT2fZ7bYCGCmHOu/KLe+j327/Ox+cPYDkKa YmcQIQD/3v9+spD1w1DKXt2sayndXZxVKkWo8OAzVE0AWKlwWSgmdWPAKIl7+4IIsohXt7 NkC6nqOdAGT1GqrM/m5ghPy056Q2eqC4ON4I7EWoFloFgaZb2RKw8kWTdyA0OoAv2laWpC HBNQf6v5J1QJmnHApzrAQI+sL7uDrasiYI3mI3pBJWSLq4eej3/L8XQA98KJaw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=quanticle.net header.s=fm2 header.b=YzC24PvF; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=u2CE1XQI; 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=none 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 684AD1020F for ; Sat, 13 Apr 2024 06:08:32 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rvUgD-00022G-3a; Sat, 13 Apr 2024 00:07:53 -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 1rvUg9-00021x-J6 for emacs-orgmode@gnu.org; Sat, 13 Apr 2024 00:07:49 -0400 Received: from wfout8-smtp.messagingengine.com ([64.147.123.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rvUg2-0006Sz-Uk for emacs-orgmode@gnu.org; Sat, 13 Apr 2024 00:07:45 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.west.internal (Postfix) with ESMTP id 6AE131C000D1 for ; Sat, 13 Apr 2024 00:07:39 -0400 (EDT) Received: from imap44 ([10.202.2.94]) by compute2.internal (MEProxy); Sat, 13 Apr 2024 00:07:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quanticle.net; h=cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm2; t=1712981258; x=1713067658; bh=/6D0kfVlPh84lqYdO+kn8QemLV6Rb+3K Wvicd9z9j4o=; b=YzC24PvFEgp8sTUUCPsT1c3Xy7alaZvrZwhuuf/wSnbpYqkT iFobZvNWHEOYaQ8lLUk6Oiyeg0YYoZ/QtLIMFNcObiSl+hNSTGN5oL0toeJVN/1Z 36O8KfwCFbBwVJQcJ9h38ognUfI0vtVpchpJ+BKOYIyUZMqXOOwtkWCxv7yNyc4r SE+DhziWxM6EtWfglVu0ZjVnfgkwNcpjYGZhQbTVRzuq7to1pExOfqWz8JjfD6T6 mqmkH/T4lP15H662b6qMgi8VSUhSjzzlAsknsoSe7ookKFMpio32XjnoD5Unwrg0 AN29UKlR1upEeiNPhw7xDhMkdMhTJwoqGy7mXQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1712981258; x=1713067658; bh=/6D0kfVlPh84lqYdO+kn8QemLV6Rb+3KWvi cd9z9j4o=; b=u2CE1XQIYu57I5aBI/AxNmiEPCIYKCR1TwLYFYfYtrhOErKum3M eZP1A+VT2OWezHZycHlZPRJadwigAZ8OaDFwhgR8pZqm41I1m4PyYjOPSNkA8YjJ fDOJm2VHjIRkADJAQB+Wmw8+2Os6U1MFWIJv2gHaE8SNsEnJ4KMnTIoipvOg0VII DvXJgtn53EmYVcQnrBdqsy1jkYNrj4NOO/AjzkgMIcCKvJ7G23SQ3/VwZPGDiZtX CbtVn7g5OX5qmlr6hPdcUsqxWO2FuT/uSFpEVfiFKSBNcLF5lQ8RTHmzjraXrCye UtkJN4VZOJnLGiy5kKxtF4CgJqWEdUbnjFQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeihedggeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfffhffvufgtsehttdertd erredtnecuhfhrohhmpedftfhohhhithcurfgrthhnrghikhdfuceoqhhurghnthhitghl vgesqhhurghnthhitghlvgdrnhgvtheqnecuggftrfgrthhtvghrnhepudfgteejffeuge evvefhieefjeejvdeuueevhefhvdehiedvvdefffekgeefleetnecuffhomhgrihhnpehg ihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehquhgrnhhtihgtlhgvsehquhgrnhhtihgtlhgvrdhnvght X-ME-Proxy: Feedback-ID: i0db1457f:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 768A236A0076; Sat, 13 Apr 2024 00:07:38 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-379-gabd37849b7-fm-20240408.001-gabd37849 MIME-Version: 1.0 Message-Id: Date: Fri, 12 Apr 2024 23:07:13 -0500 From: "Rohit Patnaik" To: emacs-orgmode@gnu.org Subject: How does =org-md-item= produce the correct indentation for nested lists? Content-Type: text/plain Received-SPF: pass client-ip=64.147.123.151; envelope-from=quanticle@quanticle.net; helo=wfout8-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_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-Migadu-Spam-Score: -5.21 X-Spam-Score: -5.21 X-Migadu-Queue-Id: 684AD1020F X-Migadu-Scanner: mx13.migadu.com X-TUID: ZW3QPjnt5I8m Hello, I was looking at the implementation for =org-md-item=, in ox-md.el, and I'm wondering how indentation logic for nested lists works. Specifically, I was looking at the following code: #+BEGIN_SRC elisp (concat bullet (make-string (- 4 (length bullet)) ? ) (pcase (org-element-property :checkbox item) (`on "[X] ") (`trans "[-] ") (`off "[ ] ")) (let ((tag (org-element-property :tag item))) (and tag (format "**%s:** "(org-export-data tag info)))) (and contents (org-trim (replace-regexp-in-string "^" " " contents)))) #+END_SRC and I'm wondering why it's adding indentation in front of the bullet. Naively, I would expect the result of this snippet, for an unordered list to be something like: =- [item contents]= That is, it concatenate the bullet, then three spaces (4 - length of bullet), then another four spaces, then the contents of the item. Instead, what I see is a four-space indent, followed by the bullet and its padding, followed by the item contents: = - [item contents]= This is the correct result, but I don't see how the code from ox-md.el produces that result. The reason I'm asking is because I have similar logic in the org-mode exporter I'm writing for PMWiki markup: https://github.com/quanticle/ox-pmwiki/blob/master/ox-pmwiki.el#L214 and I would like to change the logic so that instead of indenting with spaces, it repeats the list marker (** for a second level nested list, *** for 3 levels of nesting, etc). Thanks, Rohit Patnaik