From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: Lexical binding bug in org-list.el?
Date: Sat, 07 Nov 2015 01:20:34 +0100 [thread overview]
Message-ID: <87ziyq7j8t.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87wptuua9n.fsf@gmail.com> (Aaron Ecay's message of "Fri, 06 Nov 2015 20:45:56 +0000")
Hello,
Aaron Ecay <aaronecay@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
next prev parent reply other threads:[~2015-11-07 0:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-06 19:43 Lexical binding bug in org-list.el? Kaushal Modi
2015-11-06 19:47 ` Kaushal Modi
2015-11-06 20:45 ` Aaron Ecay
2015-11-06 21:13 ` Kaushal Modi
2015-11-07 0:20 ` Nicolas Goaziou [this message]
2015-11-07 11:54 ` Aaron Ecay
2015-11-07 16:48 ` Nicolas Goaziou
2015-11-07 21:30 ` Aaron Ecay
2015-11-08 14:57 ` Nicolas Goaziou
2015-11-08 19:55 ` Aaron Ecay
2015-11-09 15:23 ` Kaushal Modi
2015-11-11 9:33 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ziyq7j8t.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=kaushal.modi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).