Re: Consecutive plain list items of different types

2024-05-03 Thread Tom Gillespie
IIRC I wrote the part about there being two types of lists at the syntax level,
which are bulleted and numbered, descriptive are effectively bulleted in the
context of this behavior, but I think it is fine to say multiple.

With regard to the stated behavior about consecutive being parsed separately
I don't remember writing that part unless as was suggested I mean that they
were fully separate lists, but that wouldn't make sense.

The behavior is that everything at a level is converted to the type of
the first occurring list item at that level.

One wrinkle is that when applied to individual list items org-element
will report the type as written (which is expected) however on export
they are converted to the type of the first occurring item.

So the now-removed sentence might have referred to the org-element behavior.

Regardless, the change is an improvement. Thanks!

Tom



Re: Consecutive plain list items of different types

2024-05-03 Thread Ihor Radchenko
Ihor Radchenko  writes:

>> but more importantly, based on that description I would expect the following 
>> test document to parse into three separate plain lists, but it parses as a 
>> single plain list with 3 items:
>>
>> ```
>> 1. foo
>> - bar
>> - lorem :: ipsum
>> ```
>>
>> [1] https://orgmode.org/worg/org-syntax.html#Plain_Lists
>
> AFAIK, the first item determines the list type in our parser.
> Timothy, do you remember why you wrote about different list types being
> parsed separately?

I see no explanation, except reference to previous discussions with Tom
Gillespie. However, searching in the archives, I do not see anything
related to plain list parser.

Considering that the parser does not distinguish consecutive lists of the
same time (unless they are properly separated with double blank), I
removed the confusing statement.

Fixed.
https://git.sr.ht/~bzg/worg/commit/81425d84

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



Re: Consecutive plain list items of different types

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

> The org-mode documentation[1] states for plain lists that:
>> List types are mutually exclusive at the same level of indentation, if both 
>> types are present consecutively then they parse as separate lists.
>
> first a minor nit-pick that "both" is probably not the correct word here 
> since there are 3 types of lists, not two (unordered, ordered, and 
> descriptive). I'd go with "multiple" instead IMO.

Fixed.
https://git.sr.ht/~bzg/worg/commit/c7445f84

> but more importantly, based on that description I would expect the following 
> test document to parse into three separate plain lists, but it parses as a 
> single plain list with 3 items:
>
> ```
> 1. foo
> - bar
> - lorem :: ipsum
> ```
>
> [1] https://orgmode.org/worg/org-syntax.html#Plain_Lists

AFAIK, the first item determines the list type in our parser.
Timothy, do you remember why you wrote about different list types being
parsed separately?

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



Consecutive plain list items of different types

2023-09-21 Thread Tom Alexander
The org-mode documentation[1] states for plain lists that:
> List types are mutually exclusive at the same level of indentation, if both 
> types are present consecutively then they parse as separate lists.

first a minor nit-pick that "both" is probably not the correct word here since 
there are 3 types of lists, not two (unordered, ordered, and descriptive). I'd 
go with "multiple" instead IMO.

but more importantly, based on that description I would expect the following 
test document to parse into three separate plain lists, but it parses as a 
single plain list with 3 items:

```
1. foo
- bar
- lorem :: ipsum
```

[1] https://orgmode.org/worg/org-syntax.html#Plain_Lists

--
Tom Alexander
pgp: https://fizz.buzz/pgp.asc