jed-users mailing list

[2008 Date Index] [2008 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [RFC/RFT] format_paragraph for JLM


On  9.09.08, Jörg Sommer wrote:
> "G. Milde" <milde@xxxxxxxxxxxxxxxxxxxxx> wrote:
> >> >
> >> And I have the problem that I need to know some informations about
> >> the environment. Determining them for every line in indent_hook is
> >> expensive. 
> > The parse_to_point() internal function is fast.

> But it's to simple for TeX

I agree, it can only give some of the information.

> The same holds for $ and I had problems mixing dollar and comments,
> i.e. defining $ as begin of strings and wringing $% the comment is not
> recognized. 

Sure, as in most programming languages, "in a string, # text behind a 
comment sign is still part of a string, not a comment" while in TeX,
$%comments
$ in math are comments, not math.

> But the most time, I'm searching for \begin and \end to find the
> environment where the editing point is in.

Did you perceive or measure the time it costs to determine these in an
indent_hook? It is my expectation that a perceptible delay will only
occur if the hook is used in a loop (e.g. with indent_region).

> > Some caching in the indent_hook might help, if getting the remaining
> > info is still too slow.

> Do you use caching anywhere? How do you detect and handle changes?

I considered caching for on-the fly changes between two modes in e.g.
php scripts (HTML vs. php) or literate Python sources (rst vs. python).
However, I did not implement any of these yet.

There is a provision for parsing speed up in python->in_literal_string(),
with an optional `start_mark', however it is not used as I did not
encounter performance problems with the current implementation.

Günter

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2008 date index] [2008 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]