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: Emanuel Berg
Subject: Re: Display of undisplayable characters: \U01F3A8 instead of diamond
Date: Thu, 08 Sep 2022 04:12:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Yuri Khan 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.

Yes, this is exactly what I mean.

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

Good idea, base that on tty(1) perhaps?

  (info "(coreutils) tty invocation")

Also see ttyname(3).

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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