Re: [PATCH] Re: Description list with " :: " in the tag.

2023-09-20 Thread Ihor Radchenko
"Tom Alexander"  writes:

> Sorry for the delay, I've been busy in the IRLs. I've updated the patch to 
> reflect that the parser grabs the text before the last " :: " and then parses 
> it as objects. The new patch is attached.

Thanks!
Applied, onto master, with minor amendments (fixed "of of").
https://git.sr.ht/~bzg/worg/commit/ae64e1a5

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: [PATCH] Re: Description list with " :: " in the tag.

2023-09-19 Thread Tom Alexander
Sorry for the delay, I've been busy in the IRLs. I've updated the patch to 
reflect that the parser grabs the text before the last " :: " and then parses 
it as objects. The new patch is attached.

-- 
Tom Alexander

On Thu, Sep 14, 2023, at 7:24 AM, Ihor Radchenko wrote:
> "Tom Alexander"  writes:
>
>> I've written a patch (attached) with my proposed wording changes to
>> the documentation, should I be starting another thread or does
>> dropping it here work best?
>
> You can just modify subject with [PATCH], as I did.
>
>> ... I do not have commit access so I'd need
>> someone with such authority to do the last bit.
>
> Sure.
>
>> +  =TAG-TEXT= is one of more objects from the standard set so long as
>> +  they do not contain a newline character, until the last occurrence
>> +  of the substring =" :: "= (two colons surrounded by whitespace,
>> +  without the quotes).
>
> It does not fully represent what is going on - Org parser is top-down
> and does not parse objects before it is done parsing the descriptive
> list item. So,
>
> - *foo :: bar* does not actually contain bold markup
>
> Rather it is "* foo" tag + "bar* does not actually contain bold markup" 
> description.
>
> What happens is that the parser splits the first line of the item by the
> last " :: " and only then proceeds with parsing the tag and description
> using standard set of objects:
>
> - <> :: 
>
> -- 
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at .
> Support Org development at ,
> or support my work at From c8812bf7d81dc824d8ecf2c03368f58884773ddf Mon Sep 17 00:00:00 2001
From: Tom Alexander 
Date: Wed, 13 Sep 2023 18:19:05 -0400
Subject: [PATCH] org-syntax.org: Fix definition of description list tags.

Description lists support objects in their tags and they support the substring " :: ".
---
 org-syntax.org | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/org-syntax.org b/org-syntax.org
index 123fc232..fc5e9a37 100644
--- a/org-syntax.org
+++ b/org-syntax.org
@@ -470,9 +470,10 @@ BULLET COUNTER-SET CHECK-BOX TAG CONTENTS
 + CHECK-BOX (optional) :: A single whitespace character, an =X=
   character, or a hyphen enclosed by square brackets (i.e. =[ ]=, =[X]=, or =[-]=).
 + TAG (optional) :: An instance of the pattern =TAG-TEXT ::= where
-  =TAG-TEXT= represents a string consisting of non-newline characters
-  that does not contain the substring =" :: "= (two colons surrounded by
-  whitespace, without the quotes).
+  =TAG-TEXT= is the text up until the last occurrence of of the
+  substring =" :: "= (two colons surrounded by whitespace, without the
+  quotes) on that line. =TAG-TEXT= is then parsed with the standard
+  set of objects.
 + CONTENTS (optional) :: A collection of zero or more elements, ending
   at the first instance of one of the following:
   - The next item.
-- 
2.42.0



[PATCH] Re: Description list with " :: " in the tag.

2023-09-14 Thread Ihor Radchenko
"Tom Alexander"  writes:

> I've written a patch (attached) with my proposed wording changes to
> the documentation, should I be starting another thread or does
> dropping it here work best?

You can just modify subject with [PATCH], as I did.

> ... I do not have commit access so I'd need
> someone with such authority to do the last bit.

Sure.

> +  =TAG-TEXT= is one of more objects from the standard set so long as
> +  they do not contain a newline character, until the last occurrence
> +  of the substring =" :: "= (two colons surrounded by whitespace,
> +  without the quotes).

It does not fully represent what is going on - Org parser is top-down
and does not parse objects before it is done parsing the descriptive
list item. So,

- *foo :: bar* does not actually contain bold markup

Rather it is "* foo" tag + "bar* does not actually contain bold markup" 
description.

What happens is that the parser splits the first line of the item by the
last " :: " and only then proceeds with parsing the tag and description
using standard set of objects:

- <> :: 

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



[PATCH] Re: Description list with " :: " in the tag.

2023-09-14 Thread Ihor Radchenko
"Tom Alexander"  writes:

> I've written a patch (attached) with my proposed wording changes to
> the documentation, should I be starting another thread or does
> dropping it here work best?

You can just modify subject with [PATCH], as I did.

> ... I do not have commit access so I'd need
> someone with such authority to do the last bit.

Sure.

> +  =TAG-TEXT= is one of more objects from the standard set so long as
> +  they do not contain a newline character, until the last occurrence
> +  of the substring =" :: "= (two colons surrounded by whitespace,
> +  without the quotes).

It does not fully represent what is going on - Org parser is top-down
and does not parse objects before it is done parsing the descriptive
list item. So,

- *foo :: bar* does not actually contain bold markup

Rather it is "* foo" tag + "bar* does not actually contain bold markup" 
description.

What happens is that the parser splits the first line of the item by the
last " :: " and only then proceeds with parsing the tag and description
using standard set of objects:

- <> :: 

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at