From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Cc: info-gnus-english@gnu.org
Subject: Heads up: Gnus registry breakage on Emacs development versions
Date: Sun, 25 Mar 2018 16:15:00 +0800 [thread overview]
Message-ID: <87a7uwbmgr.fsf@ericabrahamsen.net> (raw)
Hi folks,
If you've been running Emacs from the development version of master or
the Emacs 26 branch over the past few months, and you're using the
registry, your registry has probably been corrupted by some bugs in the
way EIEIO objects are persisted to disk.
To know if you're affected, look at your gnus.registry.eieio file, and
see if the hash table values there are wrapped in huge numbers of
quotes: it may look like actual calls to `quote', or it may look like
piles of apostrophes. A single `quote' is normal.
The problem is now fixed in both master and emacs-26, so if you're using
a dev version of Emacs, please pull and re-build. After you've done
that, load the following code, and call M-x gnus-registry-fixit to fix
your registry.
Sorry!
Eric
#+begin_elisp
(defun gnus-registry-strip-quotes (lst)
(let (acc)
(when (consp lst)
(while (eq (car lst) 'quote)
(setq lst (cadr lst)))
(while (consp lst)
(push (gnus-registry-strip-quotes (car lst)) acc)
(setq lst (cdr lst))))
(nconc (nreverse acc)
lst)))
(defun gnus-registry-fixit ()
"Fix Gnus registry after eieio-persistent patches.
For use with Emacs master branch, after installing 0afb43eeb, or
the 26 branch, after daa9e853bd."
(interactive)
(unless (gnus-alive-p)
(gnus))
(when gnus-registry-enabled
(with-slots (tracker data) gnus-registry-db
(maphash
(lambda (track-sym hsh)
(maphash
(lambda (k v)
(setf (gethash k hsh)
(gnus-registry-strip-quotes v)))
hsh))
tracker)
(maphash
(lambda (k v)
(setf (gethash k data) (gnus-registry-strip-quotes v)))
data))))
#+end_elisp
reply other threads:[~2018-03-25 8:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a7uwbmgr.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=ding@gnus.org \
--cc=info-gnus-english@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).