From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OLSCGEvQoGCrUgAAgWs5BA (envelope-from ) for ; Sun, 16 May 2021 09:56:59 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id YKclFEvQoGAwQgAAbx9fmQ (envelope-from ) for ; Sun, 16 May 2021 07:56:59 +0000 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 937B711975 for ; Sun, 16 May 2021 09:56:58 +0200 (CEST) Received: from localhost ([::1]:32840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liBdx-0003yl-Bw for larch@yhetil.org; Sun, 16 May 2021 03:56:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liBdM-0003xL-56 for emacs-orgmode@gnu.org; Sun, 16 May 2021 03:56:20 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:56238) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1liBdK-0003D8-DH for emacs-orgmode@gnu.org; Sun, 16 May 2021 03:56:19 -0400 Received: by mail-wm1-x331.google.com with SMTP id b7so1223315wmh.5 for ; Sun, 16 May 2021 00:56:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:cc:date:message-id :mime-version; bh=CtWJo9j1GaoSqgCteatbHAUVmFum/0xgr4oJthnLnYo=; b=Ct3CoLd/08lvg8zbw1NsfBRvqzZt/g5QC3GS1ZTP3y6o4KzUcsWlghA4Qm9lw+C4Me 1bAVzOhje+mPpMPKSi/TRRIEyzerlshin4N5Do2+rBtgCfIvReM1L1iq+KKNpKZNZEN9 jnwPQXW/PQRmYCGFTkmFto01LvF1lChwNaxQLH5/hTQk4J3NOX3xWIV/TbadJUPQ9OfV XIF0q1xzhX3/KSn8CGSKXWX3X8p1ctf6bO64aYA5HTMZ1MUTrbqa7cCJxP5bxYVOSci5 IHcQHorxcn+laxQYFJcypKpDFAAAjR4ckx8SB/hhUG8EN2hgk8J54m7m7OBqGExyRVBm 0d4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:cc:date :message-id:mime-version; bh=CtWJo9j1GaoSqgCteatbHAUVmFum/0xgr4oJthnLnYo=; b=b6gDKFPnfALyttlu3l4xDT76ugpi9tKMMk60jmQqykBMqbP5Enp1piItcBPZ2TFwRw /+x6y9y34ITabbyCq1FXUZ6IWYoI2j4e7qW2ZDB8h8vn5/A9ySC8bkKuUyYl5f80YFhS pZZ338ArBBDGmd70O+cbzMLpHyKrrdgUfik8pdRtkY2K8ZFKu2jMPNrUdFbxY0pTXlv3 dkwcj/Fvl5dR/2h/PcYIHWN3ali5V1+y/P0suwORtLgF1r6a69afydygyZ6DAzCHVfSb GFWPUlpno1N0pxFNvVmP/ueqlXxmWxgtghNb6SXSENF1MzVjIIAbLFQpLpYbftx84R07 yHlQ== X-Gm-Message-State: AOAM532wzPA5BrRyutYIsX0/zjPZgUaSW9ssE5J1oUJk1ZvYRsO+QoeI +gD4PW/eEeE60Gx+hzKHcqI= X-Google-Smtp-Source: ABdhPJzMrzFjjcXrZzEcFaNLZtcqv2EoTcFev0nvjg04yJgK0aGwuyz56NvS+uGtfqtnXrzLpaSCPQ== X-Received: by 2002:a7b:c052:: with SMTP id u18mr17677482wmc.105.1621151776820; Sun, 16 May 2021 00:56:16 -0700 (PDT) Received: from localhost ([158.255.2.9]) by smtp.gmail.com with ESMTPSA id k20sm1015745wrc.1.2021.05.16.00.56.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 May 2021 00:56:16 -0700 (PDT) From: Ihor Radchenko To: Nicolas Goaziou Subject: Re: Question about Org syntax In-Reply-To: <877djz17cm.fsf@nicolasgoaziou.fr> References: <87mtsvxs94.fsf@localhost> <877djz17cm.fsf@nicolasgoaziou.fr> Date: Sun, 16 May 2021 16:01:07 +0800 Message-ID: <87h7j3xg3g.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=yantar92@gmail.com; helo=mail-wm1-x331.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.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, 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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621151819; 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=CtWJo9j1GaoSqgCteatbHAUVmFum/0xgr4oJthnLnYo=; b=f0bTQkncd0Lk9oKDtrY5ue2RTx7hYi8oVi0SeS/Zl6mTYq8tXeveJYS1vzJIUi1Q22MJZT t+bpXERfrcfrxfBLKMLBmbgjTv028GrhPWgp+fBUgQhaaV0S3D502+YyV5vGYJnJAc81uI FtotyAGah8GeuPzAZwkAW9PcJD+FmJEKpiChmz9nA2Yb/I8UEL2ZdlsE/a6qOe/R1LMEXs +Nkekf9jMwfLJjR+a3j1POL9JPK3WPUsHDnS95ktkPNwReSLE5dnn7f3/iIKRRVN3gDNoV yB8Ha6o4FR3g31OP2H2XHaBOCGAyiHpD0Avvm5D+i6m4XK1C5C23CIdPSKJxZA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621151819; a=rsa-sha256; cv=none; b=pbGZtmcXxMoYKBoXrIOvC7oeoaN/UyJAuDzZctw9Uf4URxJUC3wRoE54gPJIi/K/nec+1j CNx06yu8B5EIQN5u7Lsc4KQhjaYRg8gg9mGiMja4SHA88tr4H8xWDF1CbYypu5+oNBIPF1 Uk2cGvKbV/mBzUqiprWuIkMHiqluC9/blBbg0Pyt8ytXnNTOiIXHFCHw/bcWjh0jz6r+to w6nQQGI1sDzfpcQ00nCCtuROEhMvt/3HvK62+Z4WyWFigweVl7u5ObUonyLPpwRo2QOMq7 ZEkxwGutpEjXaqVzZBywm7UaXTBHHIJU4UxHpyKwYHbs9oT0lH1YKOBzvjfBcQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="Ct3CoLd/"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.15 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="Ct3CoLd/"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 937B711975 X-Spam-Score: -1.15 X-Migadu-Scanner: scn0.migadu.com X-TUID: /Dtk3h20vjAk Nicolas Goaziou writes: > It should be a paragraph. I'll fix it soon. > > Note the problem can be reproduced with only > > * test > :end: Thanks! Also, I have few more questions (or maybe bug reports) about syntax/parsing: 1. Does org-element--current element suppose to return (paragraph ...) on empty buffer? 2. Some of the element parsers honour LIMIT argument partially. Part of the parsing is typically done using looking-at (ignoring the LIMIT) and part is honouring it. This can backfire when LIMIT is before first characteristic line of the element. For example take headline parser: * Example headline :contents-begin of the parsed headline will be _after_ :end Or even * example headline :contents-begin is equal to :begin, sometimes leading to infinite loops in org-element--parse-to called by org-element-cache (hence, known bug with Emacs hangs when org-element-use-cache is non-nil) Some of the parsers potentially causing similar issues are: In particular, org-element-footnote-definition-parser, org-element-headline-parser, org-element-inlinetask-parser, org-element-plain-list-parser, org-element-property-drawer-parser, org-element-babel-call-parser, org-element-clock-parser, org-element-comment-parser, org-element-diary-sexp-parser, org-element-fixed-width-parser, org-element-horizontal-rule-parser, org-element-keyword-parser, org-element-node-property-parser, org-element-paragraph-parser, ... 3. Some of the element parsers ignore LIMIT altogether: org-element-item-parser, org-element-section-parser... Is there any reason behind this? I though that parsing narrowed buffer is supposed to honour narrowing. Also, ignoring LIMIT might cause issue when trying to parse only visible elements. Best, Ihor