From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id YGUFMGr91WRTgwAASxT56A (envelope-from ) for ; Fri, 11 Aug 2023 11:20:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 2LS2L2r91WT7XgEAauVa8A (envelope-from ) for ; Fri, 11 Aug 2023 11:20:42 +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 EEB003CD41 for ; Fri, 11 Aug 2023 11:20:41 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=daR0vXxw; 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=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1691745642; 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=e3GlSB8TfnqkSW8eiFiH+Za7w7+e4DD7pwTHX41yO8E=; b=uSTjXOqi2bYOkhRGGN8hEXUjhII/8TO7g0aS4J5vB0rCWAz85bJlen99kNbENzizD7hDJa zhruCDEXt/bJMuYHeb3Q5gC3D69TgJie97XLIdSSTrdpQTXbzc9HFIQ/EaZ4xHLcQr1yIy 8SsBP2zi/Kn2zi8PoxRU/lJSVug4znhhr0lxrORrPa6mTmsLWaDFwmGTGOUCgE0tgffgWw qpk4k2UYrJHy8h4hLLb9D8iTaUCFIJlvZDKTYai8WTng+2+7Z3m7vr1H9m7L02wRF1hl0N yVEU0GwtWfnYay35OEIwMJ7/BpokJmq2zwzaHIOFVvRbb+EMxq8WdXyHqJ+NnA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=daR0vXxw; 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=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1691745642; a=rsa-sha256; cv=none; b=DVr7U8L1NSryfW+CLo0nvOf6vNguWQKzRWMtZelOMA7sQ4kX2HPViIQ/iV5p/Io3W5AfAv oSon9O4SnZkqoa3dtBuJwyOkmVgg+xF4vxFR2R+GL/ln11VwrtzgxRv85U0R7NRmIfM34a JDqLd2Ih2EvZ5nEkmsKgEvHYqWHi8Msq6zAmQxcWg1cPOmTHmuCS53fwmE5B8n+UR3ECHY 4zFR2i//ybH5PkdjoVmA+y6v09sMvu43IDRZHiORnyZ2sNZnjm6z+LbO6lZCI0ahSjpco8 yttAtOCGUyEsKMw6IbgHg3b+cG8Gwqk3d52h5v6C4S3GysrfcHuLpvSaRwzB3g== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qUOJC-0002fl-JR; Fri, 11 Aug 2023 05:19:50 -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 1qUOJ9-0002fX-7z for emacs-orgmode@gnu.org; Fri, 11 Aug 2023 05:19:47 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUOJ6-0008US-QI for emacs-orgmode@gnu.org; Fri, 11 Aug 2023 05:19:46 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 595DB240028 for ; Fri, 11 Aug 2023 11:19:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1691745582; bh=E8O+3JcCCgfm/5WYZYFu/dI8xY1ITGKxdCv9P0TQSdA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=daR0vXxw3JYNVHkC7phg5jFveAdnV813uHzUmGhG3zRM5krImwZc8IMbHI1GHOZvN VZFb6iHOpfMwQQzMYhDU7y0hYLIDCOFAl9/dvkF0oNgk1UQQFvTdHoNb/xVWN/GM5A XsR2Yc5+IUkcQJvGn1DmO+/tmMFYTsCJe7qKC9jBq4a66UnwG/Oq4Qmgt0ymNrkbAT HOKsLGolIEa7a8d93E1/ltNGYGSVXWkUlbspe7bo9tS7vmJ+OOFOcM8ax8VzOgZ2+z dbN4JMHs0FB6Q7FZOMtPduqcz2a7dl4MEMTAqo5K2O+bZYq1eW7qsedqNAb2h0vIj9 /3ifDtYSsixPw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RMdXs4Zxcz9rxK; Fri, 11 Aug 2023 11:19:41 +0200 (CEST) From: Ihor Radchenko To: Tom Alexander Cc: emacs-orgmode@gnu.org Subject: Re: Seemingly inconsistent whitespace ownership In-Reply-To: <6dd08eb7-9468-402d-bf88-eefb01442b99@app.fastmail.com> References: <6dd08eb7-9468-402d-bf88-eefb01442b99@app.fastmail.com> Date: Fri, 11 Aug 2023 09:20:08 +0000 Message-ID: <87jzu2szp3.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: EEB003CD41 X-Migadu-Scanner: mx1.migadu.com X-Spam-Score: -8.48 X-Migadu-Spam-Score: -8.48 X-TUID: ICi9x549aMRY "Tom Alexander" writes: > The org-mode documentation states: "With the exception of list items, blank lines belong to the preceding element with the narrowest possible scope. For example, if at the end of a section we have a paragraph and a blank line, that blank line is considered part of the paragraph." > > https://orgmode.org/worg/org-syntax.html#org9bc833d > > So I created a test org-mode document with exactly that scenario described: > ... > and then I ran a M-x eval-expression (message "%s" (pp-to-string (org-element-parse-buffer))) to see the parse tree. I'll paste the output at the end because its a wall of text, but analyzing it: > ... > Its only child is a paragraph which has a :begin at 1 and :end at 10, which only includes the line break at the end of "foo bar." but this is exactly the scenario described in the documentation (a paragraph at the end of a section) so I would expect the paragraph to end at 14, not 10. You are right and you revealed an existing inconsistency between our incremental and recursive parsers (org-element-parse-buffer is the recursive parser). Fixed, on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=bfe1179dc Also, in addition to list items, footnote-definitions do not extend their contents to the trailing blank lines. I now clarified it in org-syntax document. https://git.sr.ht/~bzg/worg/commit/3e91f5be -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at