bbatsov/prelude

Fresh install errors during initialization

ejheil opened this issue · 5 comments

Expected behavior

Prelude runs without errors on initial install

Actual behavior

Error: Symbol's value as variable is void: prelude-mode-map (see also below)

Steps to reproduce the problem

Install using pipe-to-shell (curl -L https://git.io/epre | sh) on emacs 27.1 on MacOS. No existing .emacs.d directory. Same behavior when using `

Environment & Version information

Emacs version

GNU Emacs 27.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95)) of 2020-08-12

Operating system

MacOS Catalina 10.15.6

Debug Output

Debugger entered--Lisp error: (void-variable prelude-mode-map)
  byte-code("\303 \30\304\10\305\306#\210\304\10\307\310#\210\304\10\311\312#\210\304\10\313\314#\210\304\10\315\316#\210\304\10\317\320#\210\304\10\321\322#\210\304\10\323\322#..." [map prelude-super-keybindings prelude-mode-map make-sparse-keymap define-key "\3o" crux-open-with "\3g" prelude-google "\3G" prelude-github "\3y" prelude-youtube "\3U" prelude-duckduckgo "\1" crux-move-beginning-of-line [(shift return)] crux-smart-open-line [134217839] [(control shift return)] crux-smart-open-line-above [(control shift up)] move-text-up [(control shift down)] move-text-down [(meta shift up)] [(meta shift down)] "\3n" crux-cleanup-buffer-or-region "\3f" crux-recentf-find-file [134217754] crux-indent-defun "\3u" crux-view-url "\3e" crux-eval-and-replace "\3s" crux-swap-windows "\3D" crux-delete-file-and-buffer "\3d" crux-duplicate-current-line-or-region [3 134217828] crux-duplicate-and-comment-current-line-or-region "\3r" crux-rename-buffer-and-file "\3t" crux-visit-term-buffer ...] 5)
  (defvar prelude-mode-map (byte-code "\303 \30\304\10\305\306#\210\304\10\307\310#\210\304\10\311\312#\210\304\10\313\314#\210\304\10\315\316#\210\304\10\317\320#\210\304\10\321\322#\210\304\10\323\322#..." [map prelude-super-keybindings prelude-mode-map make-sparse-keymap define-key "\3o" crux-open-with "\3g" prelude-google "\3G" prelude-github "\3y" prelude-youtube "\3U" prelude-duckduckgo "\1" crux-move-beginning-of-line [(shift return)] crux-smart-open-line [134217839] [(control shift return)] crux-smart-open-line-above [(control shift up)] move-text-up [(control shift down)] move-text-down [(meta shift up)] [(meta shift down)] "\3n" crux-cleanup-buffer-or-region "\3f" crux-recentf-find-file [134217754] crux-indent-defun "\3u" crux-view-url "\3e" crux-eval-and-replace "\3s" crux-swap-windows "\3D" crux-delete-file-and-buffer "\3d" crux-duplicate-current-line-or-region [3 134217828] crux-duplicate-and-comment-current-line-or-region "\3r" crux-rename-buffer-and-file "\3t" crux-visit-term-buffer ...] 5) ("/Users/edheil/.emacs.d/core/prelude-mode.elc" . 503))
  require(prelude-mode)
  eval-buffer(#<buffer  *load*> nil "/Users/edheil/.emacs.d/init.el" nil t)  ; Reading at buffer position 4604
  load-with-code-conversion("/Users/edheil/.emacs.d/init.el" "/Users/edheil/.emacs.d/init.el" t t)
  load("/Users/edheil/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0x1ff574c5040d>) #f(compiled-function () #<bytecode 0x1ff574c50421>) t)
  command-line()
  normal-top-level()

I'm getting the same issue, also with emacs 27.1 on macos catalina, but I have different debugger output (I launched with with emacs -nw --init-debug). I think it doesn't include byte-code compiled functions.

Debugger entered--Lisp error: (void-variable prelude-mode-map)
  (define-key prelude-mode-map (kbd "s-/") 'hippie-expand)
  (progn (define-key map (kbd "s-r") 'crux-recentf-find-file) (define-key map (kbd "s-j") 'crux-top-join-line) (define-key map (kbd "s-k") 'crux-kill-whole-line) (define-key map (kbd "s-m m") 'magit-status) (define-key map (kbd "s-m l") 'magit-log) (def$
  (if prelude-super-keybindings (progn (define-key map (kbd "s-r") 'crux-recentf-find-file) (define-key map (kbd "s-j") 'crux-top-join-line) (define-key map (kbd "s-k") 'crux-kill-whole-line) (define-key map (kbd "s-m m") 'magit-status) (define-key map $
  (let ((map (make-sparse-keymap))) (define-key map (kbd "C-c o") 'crux-open-with) (define-key map (kbd "C-c g") 'prelude-google) (define-key map (kbd "C-c G") 'prelude-github) (define-key map (kbd "C-c y") 'prelude-youtube) (define-key map (kbd "C-c U"$
  (defvar prelude-mode-map (let ((map (make-sparse-keymap))) (define-key map (kbd "C-c o") 'crux-open-with) (define-key map (kbd "C-c g") 'prelude-google) (define-key map (kbd "C-c G") 'prelude-github) (define-key map (kbd "C-c y") 'prelude-youtube) (de$
  eval-buffer(#<buffer  *load*-146093> nil "/Users/tncowart/.emacs.d/core/prelude-mode.el" nil t)  ; Reading at buffer position 5369
  load-with-code-conversion("/Users/tncowart/.emacs.d/core/prelude-mode.el" "/Users/tncowart/.emacs.d/core/prelude-mode.el" nil t)
  require(prelude-mode)
  eval-buffer(#<buffer  *load*> nil "/Users/tncowart/.emacs.d/init.el" nil t)  ; Reading at buffer position 4604
  load-with-code-conversion("/Users/tncowart/.emacs.d/init.el" "/Users/tncowart/.emacs.d/init.el" t t)
  load("/Users/tncowart/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0x1fed32816dd9>) #f(compiled-function () #<bytecode 0x1fed32816de5>) t)
  command-line()
  normal-top-level()

I can confirm that I'm getting the same error stack trace as @tncowart. I am using a fresh install with the default script (curl -L https://git.io/epre | sh). Running Emacs 27.1 on Fedora 32.

This looks more like an erratic search and replace than anything else.

I'd just replace "prelude-mode-map" with "map" as the rest of "prelude-super-keybindings" definitions and leave it at that until patched.

I'd be happy to post a PR if that's ok with everyone.

o/

This looks more like an erratic search and replace than anything else.

Yeah, I've made a copy-mistake error. Sorry about that!