emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs design and architecture (was: Shrinking the C core)


From: Yuri Khan
Subject: Re: Emacs design and architecture (was: Shrinking the C core)
Date: Fri, 15 Sep 2023 13:51:56 +0700

On Fri, 15 Sept 2023 at 12:51, Eli Zaretskii <eliz@gnu.org> wrote:

> One of the important aspects to keep in mind in this regard is that
> Emacs must give Lisp programs dynamic control of how stuff is
> displayed, and should be able to exercise that control at high
> frequency (a trivial example: pulse.el).

In CSS, this is solved in core with transitions. A style specifies
that a certain property will change gradually, provides its target
value, the transition duration, and a transition curve. The styling
engine does all the work about calculating the intermediate values and
re-layouting each intermediate frame; the page author does not have to
script carefully timed property changes, and is in fact discouraged
from doing so because doing that in Javascript incurs CPU and battery
usage overhead.

The use case of pulse.el would be translated to a couple of styles
that say effectively “A pulsed span will instantly gain yellow
background” and “A non-pulsed span will linearly revert to whatever
background it had over the course of 200 milliseconds” and a small
function that sets the span to pulsed and then immediately to
non-pulsed.

(Implementing a CSS engine over a character terminal is a nontrivial
matter though.)



reply via email to

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