emacs-devel
[Top][All Lists]
Advanced

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

Re: Display of undisplayable characters: \U01F3A8 instead of diamond


From: Yuri Khan
Subject: Re: Display of undisplayable characters: \U01F3A8 instead of diamond
Date: Wed, 7 Sep 2022 20:58:53 +0700

On Wed, 7 Sept 2022 at 20:34, Eli Zaretskii <eliz@gnu.org> wrote:

> > I believe Emanuel is alluding to the memoization pattern “if a
> > computation (e.g. of the set of all displayable characters) is too
> > expensive to perform every time its result is needed, cache the result
> > in some storage that survives between the times it is needed (e.g. a
> > data file in .emacs.d/var/)”.
>
> That's exactly what the instructions produced with the code suggest...

Um, no? This is code generation, a different pattern where slow code
generates fast code that needs to be included in the actual program
(in this case, user’s init file).

Code generation:

* M-x standard-display-by-replacement-char RET.
* It pauses for a while, gives you some comments and code.
* At a minimum, you have to read and understand the comment.
* Then you copy and paste that code in your init file and optionally
evaluate it for immediate effect.

Compare with caching/memoization:

* M-x some-hypothetical-other-command RET.
* It pauses for a while, stores a data file, has an immediate effect.
* You see the effect, decide that it is good, put
(some-hypothetical-other-command) in your init file.
* On the next startup, it reads the file (which is fast), applies the
data (which is supposedly also fast), has the same effect.

The file name could include some relevant factors such as the terminal
type on which the data depends.



reply via email to

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