bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#29220: 26.0.90; eieio-persistent-read fail to restore saved object.


From: Pierre Téchoueyres
Subject: bug#29220: 26.0.90; eieio-persistent-read fail to restore saved object.
Date: Fri, 10 Nov 2017 19:32:07 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> pierre.techoueyres@free.fr (Pierre Téchoueyres) writes:
>
>> Hello Eric,
>> Firs, thank you for you fast answer. You fix resolved my first problem
>> with eieio-persistent-read, but I've hit another error when I try to use
>> complex objects save/restore.  In fact I try to find why pcache package
>> insnt working anymore with emacs 26.
>
> Sorry this is so frustrating! And thanks for the very concise recipe.
No worries.
>
>> So here is the same sample completed. Sorry.
>>
>> ;;; -*- lexical-binding: t -*-
>> (require 'eieio)
>> (require 'eieio-base)
>>
>> (defclass eieio-fail (eieio-persistent eieio-named)
>>   ((version :initarg :version :initform nil)
>>    (version-constant :allocation :class)
>>    (entries :initarg :entries :initform (make-hash-table))))
>
> This problem isn't related to my changes: it looks like the source of
> the issue is the way the hash table is written, and the fact that one of
> its entries holds an EIEIO object.
I've never said that and thank for looking to it.

>
> As far as I can tell, when the hash table is written with `prin1', the
> EIEIO object inside is also getting written with `prin1' instead of
> `object-write'. The `prin1' representation isn't readable, so the
> persistent read process chokes on it.
>
> The prin1 process for the hash table would have to detect that there's
> an object in there, and write it with `object-write'.
>
> I assume this used to work?
Yes this it the way the pcache (https://github.com/sigma/pcache) package
work. Actually it's requires by the unicode-fonts
(https://github.com/rolandwalker/unicode-fonts) package.

> There have been several changes to the
> printing process in Emacs 26, but I don't have a good grasp of the
> details -- hopefully Stefan or someone will chime in.

Hope my receipt could help.

> Eric

Pierre





reply via email to

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