1

On windows 10 at this time.

Transitioning from emacs 27.2 -> 29.1

Emacs 27.2 starts up and runs the code in the .emacs and custom file ok.

Downloaded emacs 29.1 to try it out.

Emacs 29.1 errors out early in the execution of my .emacs & produces this trace (obtained using debug-init)

Debugger entered--Lisp error: (error "Eager macro-expansion failure: (invalid-read-synta...")
  error("Eager macro-expansion failure: %S" (invalid-read-syntax "Invalid byte-code object"))
  internal-macroexpand-for-load((if load-melpa-packages (progn (unless (ignore-errors (require 'package) (setq package-enable-at-startup t) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")) (package-initialize) (unless (package-installed-p 'use-package) (package-refresh-contents) (package-install 'use-package)) (when (>= emacs-major-version 24) (eval-when-compile (require ...)) (require 'diminish) (require 'bind-key)) t) (message "--Error in load-melpa-packages")))) t)
  load-with-code-conversion("c:/Users/<my_id>/AppData/Roaming/.emacs" "c:/Users/ptgd73/AppData/Roaming/.emacs" t t)
  load("~/.emacs" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode -0x164c831adbfd46de>) #f(compiled-function () #<bytecode -0x1f3c61addc0c4f35>) t)
  command-line()
  normal-top-level()

I see some other posts about Eager macro-expansion failure, don't see how they apply to this context or how to debug.

This is a section of the top of my .emacs

;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;PACKAGE STUFF
;; ;note the backquote and , inside needed to have a var in the list
;; ;the info pages just showed a simple quoted list
;; ;  use the word all to get all other packages not specified
;; ; `((delimiters-load ,rainbow-delimiters-version-all) and)
;; ;
  ;(when (emacs (>= major-version-24 load) rainbow-melpa-packages load-essentials_3)
  ;
  ;; (
  ;; (require 'package)
  ;
  ;; (when nil
  ;; (setq package-load-list
  ;;   `((rainbow-delimiters ,load-rainbow-delimiters-version) )))
  ;; ;
  ;; (package-initialize)
  ;; (add-to-list
  ;;  'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
  ;; (setq package-user-dir "~\\.emacs.d")
  ;; )
;;
;; MTF I don't always want this stuff, its usually more trouble than it's worth
; (when nil                               ;
(when t
  (require 'package) ;; You might already have this line
   ;
  (when (< emacs-major-version 24)
    ;; For important compatibility libraries like cl-lib
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; mtf use one of these two, gnu is the new, stable is stable
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;; 1
    (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
    ;; 2
    (add-to-list 'package-archives
               '("melpa-stable" . "https://stable.melpa.org/packages/") t)
  )
  ;
  ;;;;http://cachestocaches.com/2015/8/getting-started-use-package/
  ;(setq package-enable-at-startup nil)
  ;(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
  ;(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
  ;
  ;As of emacs 26.1, (package-initialize) had to be first of these 3, otherwise
  ;some wierd error happened at emacs startup.
  (package-initialize)
  (package-refresh-contents)
  (package-install 'use-package)
  )
  ;
;(unless (package-installed-p 'use-package)
 ; (package-refresh-contents)
  ;(package-install 'use-package))
  ;
  ;(global-set-key (kbd "C-x g") 'magit-status)
  ;(global-set-key (kbd "C-x M-g") 'magit-dispatch-popup)
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ; my custom-set-faces go missing found this bug, maybe fix? 7/26/2017
 ;https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25228#152
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (define-key special-event-map [config-changed-event] 'ignore)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Elpa/Melpa
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(message "reached before Melpa/Elpa")
(when  load-melpa-packages;
    (unless
      (ignore-errors ;if an error occurs return nil
    (require 'package)
    ;; (setq package-enable-at-startup nil)
    (setq package-enable-at-startup t)
    ;
    (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
    ;
    ; seems to be an error contacting this computer when running package-refresh-contents
    ;(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
    ;
    (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
    ;
    ; start the package system
    (package-initialize)
    ;
    (unless (package-installed-p 'use-package)
      ;(package-refresh-contents)
      ;  Download descriptions of all configured ELPA packages.
      ;  For each archive configured in the variable ‘package-archives’, 
      (package-refresh-contents)
      (package-install 'use-package))
    ;
    (when (>= emacs-major-version 24 )
      (eval-when-compile
        (require 'use-package))
    ;
      (require 'diminish)
      (require 'bind-key))
        t)
      (message "--Error in load-melpa-packages")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;fix
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

  (use-package projectile
    :ensure t)

;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ; Set some faces have been having trouble with customize
;; Even it emacs 26.1 !!!arg!!!
;; Maybe bisect the .emacs a few times to see who/what is changing the face
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   (set-face-foreground 'isearch "black")
   (set-face-background 'isearch "gold")
   (set-face-background 'lazy-highlight "gray")

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; don't wrap lines
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq-default truncate-lines t)

I tried finding & deleting all byte-compiled (*.elc) files in my .emacs.d directory.
Did not make a difference.

1 Answer 1

0

Removing all the contents of the elpa folder under the .emacs.d folder eliminated this issue.

1
  • This does not seem good. Emacs seems to be moving in the direction of more reliance on these packages. Does not seem like a good thing that you manually need to remove a significant part of your configuration just to get a new version of emacs to start.
    – Mikef
    Commented Oct 25, 2023 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.