0

I've encountered this error on an Arch Linux system running Emacs-27.2.

I sync my Emacs ~/.config/emacs/init.el which calls a host of other files located under ~/.config/emacs/settings/*-settings.el as I'm simple and get confused by long files.

I have no such issues on other systems, one Gentoo running Emacs 27.2, the others Arch Linux on a VPS (x86 arch also 27.2) and a Raspberry Pi running ArchLinuxARM, also 27.2.

On starting I receive the error...

package-load-descriptor: End of file during parsing

I opened up my ~/.config/emacs/init.el and started stepping through it, line by line, the top few lines are...

;;; init.el --- Emacs configuration
;;; LOAD PACKAGES
;;; --------------------------------------
(setq debug-on-error t)
(require 'package)
(package-initialize)

;; Adding repositories along with priority https://emacs.stackexchange.com/a/2989/10100
(setq package-archives
      '(("GNU ELPA"     . "https://elpa.gnu.org/packages/")
        ("MELPA Stable" . "https://stable.melpa.org/packages/")
        ("MELPA"        . "https://melpa.org/packages/")
        ("org"          . "https://orgmode.org/elpa/"))
      package-archive-priorities
      '(("MELPA Stable" . 10)
        ("GNU ELPA"     . 5)
        ("org"          . 5)
        ("MELPA"        . 0)
        ))

The error arises on the line...

(package-initialize)

I've found two related threads...

I've no problems starting Emacs with emacs -Q which is unsurprising since its when trying to initalise packages that the error arises.

I've no idea how to try and work out what package might have a missing parenthesis though.

One thing I've tried is rsync-ing the whole of ~/.config/emacs/ from a system where this doesn't occur to the system where I have the problem....to no avail, its still occurs.

I'm stumped as to what to try next, I have thought about completely removing everything under ~/.config/emacs/ and cloning the repostiory anew (which only includes ~/config/emacs/init.el/and ~/.config/emacs/settings/*-settings.el) but don't see how that differs hugely from the aforementioned copying of rsyncfrom a working system.

Any suggestions/advice would be most welcome.

4
  • Try starting emacs with the --debug-init option and add the backtrace to your question.
    – NickD
    Sep 8 at 5:24
  • @NickD unfortunately --debug-init doesn't provide any additional information, *Messages* just shows package-load-descriptor: End of file during parsing and nothing else. :-/
    – slackline
    Sep 8 at 10:02
  • It's possible you have some conditional lisp somewhere eg system-type or emacs-version. Note there are I guess a dozen such introspecting variables!
    – Rusi
    Sep 12 at 2:16
  • I opted to remove ~/.config/emacs/ contents complete and start anew with my ~/.config/emacs/init.el and ~/.config/emacs/settings/* and things are back to normal.
    – slackline
    Sep 14 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.