Hello, Aaron Ecay <aarone...@gmail.com> writes:
> The org-list code is a mess, and I think we should hold off on converting > it to lexical scoping until it can be refactored in a more dedicated > way. It seems a bit strong considering there's only one issue so far. I don't think the code is a mess, but "Send and receive lists" part clearly needs an overhaul. > Nonetheless I include the patch, in case it’s helpful to anyone. Lifting `org-list--get-text', `org-list--parse-item', etc. isn't necessary. I just forgot a `letrec' in `org-list-parse-list'. The problem comes from `org-list-to-substree'. `org-list-to-generic' mechanism is not adequate for this function, which relied so far on a kludge to get the job done (i.e., undocumented `eval'ing of :istart and :icount values). Actually, `org-list-to-generic' in its current form isn't adequate for anything. Even `org-list-to-*' functions do not use it. As a temporary fix, besides using `letrec' per above, we can re-implement `org-list-to-subtree' without using `org-list-to-generic'. Later, `org-list-to-*' could be re-implemented like `orgtbl-to-generic'. Also, some parameters should be able to be set to a function generating a string, which would be called with the current depth of the item. In the process I think `org-list-parse-list' should be simplified, too, as its current return value is useless (e.g., nothing uses [CBON] anymore in the code base). WDYT? Regards, -- Nicolas Goaziou