Re: Weird behavior of org-element-object-lex

2022-10-20 Thread Max Nikulin
On 20/10/2022 21:15, Damien Cassou wrote: After a quick chat with yantar92 on IRC, I understood that the easiest solution is to fix the paragraph transcoder to inject the "- " when its parent is an item. The item transcoder can just return CONTENTS. Why are you trying to avoid item list marker

Re: Weird behavior of org-element-object-lex

2022-10-20 Thread Damien Cassou
Damien Cassou writes: > Ihor Radchenko writes: >> Damien Cassou writes: >>> (defun ox-linuxmag--item (item contents info) >>> ... >>> The reason `ox-linuxmag--item` has to parse ITEM again is because >>> CONTENTS contains "item 1 ;" >>> which misses the initial dash "-" character: i.e., I woul

Re: Weird behavior of org-element-object-lex

2022-10-20 Thread Damien Cassou
Ihor Radchenko writes: > Damien Cassou writes: >> (defun ox-linuxmag--item (item contents info) >> ... >> The reason `ox-linuxmag--item` has to parse ITEM again is because >> CONTENTS contains "item 1 ;" >> which misses the initial dash "-" character: i.e., I would like "- item >> 1 ;" in the p

Re: Weird behavior of org-element-object-lex

2022-10-20 Thread Ihor Radchenko
Damien Cassou writes: > (defun ox-linuxmag--item (item contents info) > ... > The reason `ox-linuxmag--item` has to parse ITEM again is because > CONTENTS contains "item 1 ;" > which misses the initial dash "-" character: i.e., I would like "- item > 1 ;" in the paragraph instead. Just use ITE

Re: Weird behavior of org-element-object-lex

2022-10-19 Thread Damien Cassou
Ihor Radchenko writes: > Damien Cassou writes: >> Is that a bug? > > Not really. table-cell and citation-reference do not have a regexp > signature and are handled specially. For these two types of objects, > org-element--object-lex is called only when the parent is a table-row or > citation obje

Re: Weird behavior of org-element-object-lex

2022-10-19 Thread Ihor Radchenko
Damien Cassou writes: > here is the beginning of `org-element-object-lex`: > > (defun org-element--object-lex (restriction) > "Return next object in current buffer or nil. > RESTRICTION is a list of object types, as symbols, that should be > looked after. This function assumes that the

Weird behavior of org-element-object-lex

2022-10-19 Thread Damien Cassou
Hi, here is the beginning of `org-element-object-lex`: (defun org-element--object-lex (restriction) "Return next object in current buffer or nil. RESTRICTION is a list of object types, as symbols, that should be looked after. This function assumes that the buffer is narrowed to an ap