Re: Comments following not-really-affiliated keywords are becoming paragraphs

2023-10-16 Thread Tom Alexander
Thanks!

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



Re: Comments following not-really-affiliated keywords are becoming paragraphs

2023-10-12 Thread Ihor Radchenko
"Tom Alexander"  writes:

> Test document:
> ```
> #+CAPTION: foo
> # bar
> ```
>
> This parses as a paragraph with the caption of foo and the body of "# bar" 
> when it should parse as a regular keyword followed by a comment.

Thanks for reporting!
Fixed, on main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=0e3d0e3d1

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



Comments following not-really-affiliated keywords are becoming paragraphs

2023-10-11 Thread Tom Alexander
Emacs version: 29.1
Org-mode version: e1569918cc94253650781e83a09695739c93352f (latest in git)

Test document:
```
#+CAPTION: foo
# bar
```

This parses as a paragraph with the caption of foo and the body of "# bar" when 
it should parse as a regular keyword followed by a comment.

Relevant org-syntax[1] bit:

> a keyword with the same KEY as an affiliated keyword may occur so long as it 
> is not immediately preceding a valid element that can be affiliated. For 
> example, an instance of #+caption: hi followed by a blank line will be parsed 
> as a keyword, not an affiliated keyword.


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

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