nonsequitur/smex

setq: End of file during parsing

benma opened this issue · 8 comments

Hi

I start emacs with emacs -q -l smex.el (so no other modules are loaded). M-x smex-intitalize fails with setq: End of file during parsing.

Emacs version: 24.1.1.

Do you know what causes this? If not, I can dig into it sometime.

Which Smex version do you use? Check the version info at the beginning of smex.el.

Please post a backtrace:

  1. Run M-x toggle-debug-on-error
  2. A backtrace buffer will now pop up when an Emacs error occurs. Post the backtrace for the 'End of file during parsing' error.

Smex version 1.1.1, although the problem also exists with 1.1.4. I used smex for a long time with no issue, the problem started appearing only last week or so. Not sure how this is possible

Unfortunately, toggle-debug-on-error did nothing. The messages buffer says

Debug on Error enabled globally
setq: End of file during parsing

No new buffers appeared which could contain the trace.

I used smex for a long time with no issue, the problem started appearing only last week or so.

That indicates that something in your Emacs environment has changed.
Try reverting to the last working state to see where the bug was introduced.

Vanilla Emacs 24.1.1 plus emacs -q -l smex.el and M-x smex-intitalize runs without errors.

I investigated further and found out that the root of the problem was that I had a ".smex-items" file in my home directory that was empty. I deleted it, now it works fine again. I don't know how this file came to be. If it happens again, I will report back so we can find out.

Thanks for your time.

til commented

This happened to me too yesterday, with no obvious changes to my environment as far as I can see. After removing the ~/.smex-items file everything worked fine again.

I've added a fix to ignore empty save files, but I still have no idea how they could appear in the first place.

Did your save files suddenly become empty or were you just getting started with Smex?

In my case, they became empty. Smex has been working with no problems for years before.

til commented

Same here - I have been using smex for years, and the file suddenly
became empty.

I have another computer with mostly the same setup and there the file is
not empty: it contains two parts of lisp code, separated by comments
smex-history and smex-data.