Problem: "Database empty"
Hi! Enjoying using elfeed since 2013, thanks Christopher! Size of my index is 215 MB. Saving takes 8 secs on SSD.
Since last week index file is not loaded anymore:
Upgrading Elfeed index for Emacs 26 ... Elfeed index upgrade complete.
and then
Database empty. Use elfeed-add-feed...
The above behaviour occurs also if I'am using a backup of .elfeed or .emacs.d directory.
Deleting all *.elc files inside elpa directory didn't help either.
Emacs version: GNU Emacs 26.3 (build 1, i686-pc-linux-gnu, GTK+ Version 3.18.9) of 2019-12-31
Elfeed version: elfeed-20200209.1942
Please help.
There was a major breaking change to cl-defstruct between Emacs 25 and 26 which necessitated a change in the database format. When Elfeed detects that you're loading an Emacs 25 index while in Emacs 26, it does an irreversible upgrade to the new format.
However, package.el has a fatal design flaw: It doesn't track which version of Emacs produced the .elc files it loads, so when upgrading Emacs you can easily end up loading invalid .elc files. With Elfeed, that means it sees that it's running under Emacs 26, but it still has all the old, now-invalid macro expansions from an earlier version of Emacs. At this point it just gives up and starts over with a fresh database there's nothing else it can do. It's trapped in some undefined state.
The good news is that your pre-upgraded index file, the only important part of the database, can be found at .elfeed/index.backup. So it's not lost. To restore it under Emacs 26: Close own all Emacs instances, purge your .emacs.d/elpa/ directory — always do this when upgrading Emacs to work around the package.el defect — rename index.backup over your now empty index, start Emacs, and reinstall your packages. It will do the upgrade again, but now you'll have a properly-compiled Elfeed that can make use of it.
Thank you for response.
Should I really delete the elpa directory or can I just delete the all *.elc files inside elpa (maybe byte compile all the sources)?
package.el does byte compilation, generates autoloads, and maybe a couple other things I'm forgetting. The only way I know to properly recompile a package is to reinstall the package from scratch.