I’m winding up with entries like the following in detached-sessions.db
(46115f100fbdf5c4601272c011eb45f5 . #s(detached-session 46115f100fbdf5c4601272c011eb45f5 "nix flake update" projectile "~/Projects/personal/system-configurations/" attached "~/.local/state/emacs/detached/sessions" nil ("Tiamat" . localhost) nil \.\.\.))
The “...” of truncated lists, like from ‘print-length’, is being written to the DB.
And beyond each entry being truncated, the file itself ends with `\.\.\.)`, with only the first dozen or so entries saved.
I had experienced this issue before (like ~0.9), but it went away (I trashed the .db file after updating to 0.10, and everything seemed to be working smoothly). I thought I had seen something on the mailing list about this, but can’t find it now (hard to search for “\.\.\.”).
When I ran into this before, I had checked those vars, which are set to ‘nil’, and checked them inside the calls to write the DB, and I think everything seemed fine, but they would still write out truncated. I’m wondering if there was some other package or something interfering. It only takes one write with those vars (or whatever) set to wreck the DB.
For now, I’ve deleted the db file and added the following to my init:
(defun patch--detached--db-update-sessions (orig-fn)
"Ensure we print the full object to the DB."
(let ((print-length nil)
(print-level nil))
(funcall orig-fn)))
(advice-add 'detached--db-update-sessions
:around
#'patch--detached--db-update-sessions)
crossing my fingers that it’ll keep the same thing from happening.