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