GNU bug report logs - #29220
26.0.90; eieio-persistent-read fail to restore saved object.

Previous Next

Package: emacs;

Reported by: pierre.techoueyres <at> free.fr (Pierre Téchoueyres)

Date: Wed, 8 Nov 2017 22:20:01 UTC

Severity: normal

Merged with 33441

Found in version 26.0.90

Full log


Message #11 received at 29220 <at> debbugs.gnu.org (full text, mbox):

From: pierre.techoueyres <at> free.fr (Pierre Téchoueyres)
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 29220 <at> debbugs.gnu.org
Subject: Re: bug#29220: 26.0.90;
 eieio-persistent-read fail to restore saved object.
Date: Fri, 10 Nov 2017 18:31:08 +0100
[Message part 1 (text/plain, inline)]
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.

So here is the same sample completed. Sorry.

[eieio-fail.el (text/plain, inline)]
;;; -*- 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))))

(let* ((ef (make-instance 'eieio-fail :file "tmp"))
       (entries (slot-value ef 'entries))
       (ef2 (make-instance 'eieio-fail :file "tmp2"))
       (entries2 (slot-value ef2 'entries)))
  (puthash 'foo 42 entries2)
  (oset ef2 :entries entries2)
  (puthash 'ef2 ef2 entries)
  (oset ef2 :entries entries2)
  (oset ef :entries entries)  
  (eieio-persistent-save ef (concat "tmp-" emacs-version)))

(let* ((ef (eieio-persistent-read (concat "tmp-" emacs-version) 'eieio-fail t))
       (entries (slot-value ef 'entries))
       (entries2 (slot-value (gethash 'ef2 entries) 'entries)))
  ;; (pp ef)
  (pp (gethash 'foo entries2)))
[Message part 3 (text/plain, inline)]

Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

> ...
>
> Yes, I made a bum commit to master, then fixed it, then cherry-picked
> the bum commit over to emacs-26 without fixing it. The fix is now
> cherry-picked as well, and I'm taking a short breather from patching
> Emacs.
>
> Sorry about this,
No worries
> Eric
Pierre

This bug report was last modified 6 years and 15 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.