From: Paul Pogonyshev <pogonyshev@gmx.net>
To: emacs-devel@gnu.org
Cc: martin rudalics <rudalics@gmx.at>,
Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: generic buffer parsing cache data
Date: Sun, 1 Jul 2007 16:49:32 +0300 [thread overview]
Message-ID: <200707011649.32728.pogonyshev@gmx.net> (raw)
In-Reply-To: <jwvy7i05lzk.fsf-monnier+emacs@gnu.org>
Stefan Monnier wrote:
> >> > I propose that each point position could have "cached parsing data".
> >> > This would be an alist indexed with cache data identifier.
> >> Have you experimented with `syntax-ppss'?
> > I propose to add something generic. For instance, Python mode needs to
> > know indentation level of blocks. It seems that `syntax-ppss` doesn't
> > return it at all. And adding everything that might ever be needed by
> > some XYZ mode seems counter-productive and complicates an already complex
> > function and its return value.
>
> 100% agreement.
>
> This said, I think it might make sense to combine the two so that
> syntax-ppss returns not just the parse-partial-sexp state but also some
> mode-specific data. At least it's been in my TODO list for a while now.
That would be nice, but I see one possible non-trivial problem here. I'm
not sure that `parse-partial-sexp' stores cached data where it is most
logical for the current mode. So it might lead to worse cache performance,
because `parse-partial-sexp' might choose to store data in more sparse
positions in a buffer than its mode would prefer. (However, I might be
wrong, there can be a way to influent this.)
Also, relying on `parse-partial-sexp' makes caching impossible or very
difficult for minor modes, because they don't generally have a say in
determining buffer syntax.
Paul
next prev parent reply other threads:[~2007-07-01 13:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-30 21:38 generic buffer parsing cache data Paul Pogonyshev
2007-07-01 11:48 ` martin rudalics
2007-07-01 12:16 ` Paul Pogonyshev
2007-07-01 12:38 ` martin rudalics
2007-07-01 13:41 ` Paul Pogonyshev
2007-07-01 15:20 ` martin rudalics
2007-07-01 20:40 ` Richard Stallman
2007-07-01 12:45 ` Thien-Thi Nguyen
2007-07-01 13:10 ` Paul Pogonyshev
2007-07-01 13:16 ` Lennart Borgman (gmail)
2007-07-01 13:43 ` Paul Pogonyshev
2007-07-01 13:28 ` joakim
2007-07-01 12:52 ` Stefan Monnier
2007-07-01 13:49 ` Paul Pogonyshev [this message]
2007-07-01 20:08 ` Stefan Monnier
2007-07-01 20:44 ` Paul Pogonyshev
2007-07-01 21:23 ` Stefan Monnier
2007-07-01 16:32 ` Richard Stallman
2007-07-01 16:32 ` Richard Stallman
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200707011649.32728.pogonyshev@gmx.net \
--to=pogonyshev@gmx.net \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=rudalics@gmx.at \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.