emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing to cairo context from within emacs module?


From: Eli Zaretskii
Subject: Re: Drawing to cairo context from within emacs module?
Date: Fri, 06 Dec 2019 16:55:26 +0200

[Please keep the list on the CC, so that others could see this discussion.]

> From: Eivind Fonn <address@hidden>
> Date: Fri, 6 Dec 2019 11:20:01 +0100
> 
> Like Stephen I'm trying to do 'live' parsing.

I don't think I understand what "live parsing" is,  and Stephen said
he would up not using any direct access to buffer text.

> Boxing and unboxing (and copying) Emacs strings over and over isn't
> impossible, but it feels like unfettered access to the buffer should
> be in scope for a text editor that has dynamic module support.

Modules were designed to be able to communicate with Emacs via Lisp
objects, they don't get direct access to the internals of those
objects.

> If the gap can move at will that is unfortunate, but I'm not after
> a very long-term view, so I was hoping something might anyway
> be possible.
> 
> I need the gap because the buffer pointer isn't very useful on its
> own without that information.

You should also be aware of the fact that the internal representation
of buffer text is a superset of UTF-8, so direct access to it will
also need to copy a lot of code that Emacs uses internally to present
characters to Lisp programs.

And I still don't think I understand the rationale.  How about if you
explain why modules should be any different from a Lisp program in
this respect?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]