From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id wCjhFyJSxGX/IgEA62LTzQ:P1 (envelope-from ) for ; Thu, 08 Feb 2024 05:01:38 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id wCjhFyJSxGX/IgEA62LTzQ (envelope-from ) for ; Thu, 08 Feb 2024 05:01:38 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=lzHV23NK; 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=pobox.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707364898; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=gYSQSLhACHxQV5Yn8Wa+dlJv7tlUjh5m7ofuFEi9YhM=; b=V1javQ47u9C+haGdrjfkHL9sCpAQk3HuTAEOUd1uPYIIkT0bN7v5dOi107+0nYvRidY4n1 U1bBEC4pO68BuQ15wsd+ya08LoZX+C7KNUX8Lh5GcvWzwcd8YM+CZsPC5qKJJqQRghwaR7 Uv57Ychpau0de31zC3NjWm1GL489qzt+cPfbp2fx8odQTgbQAmFq9GxtySHXN3Wg2+asy7 +c4I8IMazMsb25KLPNlQq46ypoXk+nFUnD3A2WZDhY1vxYJlkawZXBgQXMYo47KvU+Ng4C lx3Nz9BUinRhlygpARClsdX4yvRd8i2z8fcHgK3qxo+reu94M0iV53JHyl3vrg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=pobox.com header.s=sasl header.b=lzHV23NK; 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=pobox.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707364898; a=rsa-sha256; cv=none; b=JCS2+wE/Nyck5aHV2G0vREGaud42Mr3nOrCWHjGSgquJsrxweg4WH3Q4dQNRn6tw2hVvhy fw8d2JyNF6xxZ641JBdf+I7RB1kv9Z69HNniV5KhX3phzRHKDyEG51kxON2c5tpQ53QI8c BpkeJ1IedXyddSaDkUz0HyyAM/bOZR+OhAXBu/A8pQRhH8PIJ1lC1d8UbQhTNBQ+3wq5Dj FzmsXZ+k72YaRKmcDTLLXiPi13zGHHou380PCc6gRnqTPszqW/gCvLUVp1nkEhD5bLEBJ+ BgWuAqWXF8HFLkjBj0xfIY0zshFAw83JxvjzObKz5XvqBSeLbIORfcNgbt2/IQ== 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 2AD7915A6A for ; Thu, 8 Feb 2024 05:01:38 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXvaX-0005yt-Ha; Wed, 07 Feb 2024 23:00:38 -0500 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 1rXvaU-0005y4-I2 for emacs-orgmode@gnu.org; Wed, 07 Feb 2024 23:00:34 -0500 Received: from pb-smtp2.pobox.com ([64.147.108.71]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXvaQ-0004fp-W5 for emacs-orgmode@gnu.org; Wed, 07 Feb 2024 23:00:34 -0500 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 83C271DC7E7; Wed, 7 Feb 2024 23:00:28 -0500 (EST) (envelope-from jmay@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=date:from :to:cc:message-id:in-reply-to:subject:mime-version:content-type :content-transfer-encoding; s=sasl; bh=hQ1TTuFdjC0sZCwLLEbdL6YS4 oWfwNQsrpotSJ0q8KM=; b=lzHV23NK2kFtf5VEypeOySAnJc60j3KoHbRrytd9U ueW+HzMPqD85rr5HIdC8RHn/7lMc1mXWcL5Nnu5AM/FV0X710Idrcm4LGGICqui5 ic3IFnayWNL9Ul4HCu35HPK6ExiwBy0A1OcX0kU32eMcbgOFq9gSD6VOioCJy31H EI= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 7A3DE1DC7E5; Wed, 7 Feb 2024 23:00:28 -0500 (EST) (envelope-from jmay@pobox.com) Received: from hey.com (unknown [204.62.115.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id F2B331DC7E4; Wed, 7 Feb 2024 23:00:27 -0500 (EST) (envelope-from jmay@pobox.com) Date: Wed, 07 Feb 2024 20:00:27 -0800 From: Jason May To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Message-ID: <27899b3fba30cc984e2d8fa4701d26066471f8b9@hey.com> In-Reply-To: <87cyt8qk0h.fsf@localhost> Subject: Re: Org mode version 9.7-pre (9.7-pre-n/a-g093879 Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="--==_mimepart_65c451db84357_16621ac108941"; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Pobox-Relay-ID: 984578E4-C636-11EE-A84A-25B3960A682E-00045388!pb-smtp2.pobox.com Received-SPF: pass client-ip=64.147.108.71; envelope-from=jmay@pobox.com; helo=pb-smtp2.pobox.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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.13 X-Migadu-Scanner: mx13.migadu.com X-Spam-Score: -8.13 X-Migadu-Queue-Id: 2AD7915A6A X-TUID: d8V23vvnovEq ----==_mimepart_65c451db84357_16621ac108941 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I think you're right. This request was prompted by an issue encounted in org-journal, and it probably exists in org-roam and other similar packages. Ignoring blank lines sounds like a reasonable approach. For more significant syntax violations such as your example, perhaps org-entry-get and other functions should raise errors instead of silently returning nil? I'm going to investigate how it might be possible to initiate an org- lint if an exception situation was to arise in org-journal. On February 7, 2024, Ihor Radchenko wrote: > Jason May writes: > > > Extraneous content (e.g. blank lines) in the PROPERTIES drawer > > cause =3Dorg-entry-get=3D to return nil without indication of any > problem. > > > > Desired behavior: =3Dorg-entry-get=3D should be forgiving. > > It should ignore blank PROPERTIES lines, or any line with invalid > > syntax. > > A message to the *Warnings* buffer might be appropriate. > > Blank lines in properties might be an ok change. > I am not so sure about invalid syntax. > > Consider > > :PROPERTIES: > :PROP1: val1 > :PROP2: this line was > accidentally modified > :END: > > Property drawer not being recognized is more likely to be noticed > compared to `org-entry-get' returning incomplete "this line was". > > In any case, M-x org-lint will report problems with property drawers. > > --=C2=A0 > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at ----==_mimepart_65c451db84357_16621ac108941 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I think you're right.

This request was prompted by an issue= encounted in org-journal, and it probably exists in org-roam and other s= imilar packages.

Ignoring blank lines sounds like a reasonable app= roach.

For more significant syntax violations such as your example= , perhaps org-entry-get and other functions should raise errors instead o= f silently returning nil?

I'm going to investigate how it might be= possible to initiate an org-lint if an exception situation was to arise = in org-journal.




On February 7, 2024, Ihor R= adchenko <yantar92@posteo.net> wrote:
Jason May &l= t;jmay@pobox.com> writes:

> Extraneous content (e.g. blank l= ines) in the PROPERTIES drawer
> cause =3Dorg-entry-get=3D to retur= n nil without indication of any problem.
>
> Desired behavior= : =3Dorg-entry-get=3D should be forgiving.
> It should ignore blank= PROPERTIES lines, or any line with invalid
> syntax.
> A mes= sage to the *Warnings* buffer might be appropriate.

Blank lines in= properties might be an ok change.
I am not so sure about invalid synt= ax.

Consider

:PROPERTIES:
:PROP1: val1
:PROP2: this l= ine was
accidentally modified
:END:

Property drawer not bein= g recognized is more likely to be noticed
compared to `org-entry-get' = returning incomplete "this line was".

In any case, M-x o= rg-lint will report problems with property drawers.

--=C2=A0
Ih= or Radchenko // yantar92,
Org mode contributor,
Learn more about Or= g mode at <https://orgmode.org/>.
Support Org development at <= ;https://liberapay.com/org-mode>,
or support my work at <https:/= /liberapay.com/yantar92>
----==_mimepart_65c451db84357_16621ac108941--