spacemacs

FlavaDave 2023-01-04T00:53:10.251939Z

I have just updated spacemacs, packages, and my OS and when I open spacemacs it opens in a scratch buffer in insert mode and when I hit ESC it wont leave insert mode, preventing me from using any commands. Anyone got any good ideas about how to address this?

eggsyntax 2023-01-04T01:13:12.021359Z

In terms of being able to do stuff, do C-x to get to a menu. Or to go ahead & get back into normal mode, you can do M-x and type evil-force-normal-state (shouldn't have to type too much to find the right one). After that I'd go look at the *messages* buffer -- my guess is that something's broken in config and so it's not loading your config properly, and there should be a message about that in *messages*.

FlavaDave 2023-01-04T01:31:13.320379Z

hmmm C-x isn't doing anything and M-x evil-force-normal-state returns no-match

FlavaDave 2023-01-04T01:32:17.997929Z

this is *messages*

Loading /Users/david/.spacemacs.d/init.el (source)...done
Loading /Users/david/.spacemacs.d/emacs-custom-settings.el (source)...done
(Spacemacs) Warning: Cannot find any of the specified fonts (Fira Code)! Font settings may not be correct.
Spacemacs is ready.

eggsyntax 2023-01-04T01:37:59.454409Z

Huh, ok, gotcha. Thaaaat sounds pretty messed up. How long had it been since you updated spacemacs? If it’s at the point where C-x isn’t working, I’d personally start thinking about making a backup of ~/.emacs.d and then doing a fresh clone of spacemacs.

FlavaDave 2023-01-04T01:38:17.212209Z

a week

eggsyntax 2023-01-04T01:38:17.590379Z

But maybe someone will have another suggestion? 🤷

eggsyntax 2023-01-04T01:38:36.854149Z

> a week Very weird.

FlavaDave 2023-01-04T01:40:01.323679Z

Yea I reinstalled spacemacs and it still is busted

FlavaDave 2023-01-04T01:40:39.811969Z

$emacs --version          
GNU Emacs 28.1
Copyright (C) 2022 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GNU Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

eggsyntax 2023-01-04T01:40:54.329819Z

Yikes.

eggsyntax 2023-01-04T01:41:31.781879Z

When you say you reinstalled, you totally deleted or renamed ~/.emacs.d?

FlavaDave 2023-01-04T01:41:51.775129Z

emacs --debug-init

Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "/Users/david/.spacemacs.d/emacs-custom-se...")
  load("/Users/david/.spacemacs.d/emacs-custom-se...")
  dotspacemacs/user-init()
  (condition-case err (dotspacemacs/user-init) ((debug error) (configuration-layer//increment-error-count) (spacemacs-buffer/append (format "Error in %s: %s\n" '"dotspacemacs/user-init" (error-message-string err)) t)))
  (progn (condition-case err (dotspacemacs/user-init) ((debug error) (configuration-layer//increment-error-count) (spacemacs-buffer/append (format "Error in %s: %s\n" '"dotspacemacs/user-init" (error-message-string err)) t))))
  (if (fboundp 'dotspacemacs/user-init) (progn (condition-case err (dotspacemacs/user-init) ((debug error) (configuration-layer//increment-error-count) (spacemacs-buffer/append (format "Error in %s: %s\n" '"dotspacemacs/user-init" (error-message-string err)) t)))))
  (progn (if "Calling dotfile user init..." (progn (spacemacs-buffer/message "Calling dotfile user init..."))) (if (fboundp 'dotspacemacs/user-init) (progn (condition-case err (dotspacemacs/user-init) ((debug error) (configuration-layer//increment-error-count) (spacemacs-buffer/append (format "Error in %s: %s\n" '"dotspacemacs/user-init" (error-message-string err)) t))))))
  (if (eq 'dumping spacemacs-dump-mode) nil (progn (if "Calling dotfile user init..." (progn (spacemacs-buffer/message "Calling dotfile user init..."))) (if (fboundp 'dotspacemacs/user-init) (progn (condition-case err (dotspacemacs/user-init) ((debug error) (configuration-layer//increment-error-count) (spacemacs-buffer/append (format "Error in %s: %s\n" ... ...) t)))))))
  spacemacs/init()
  (let ((please-do-not-disable-file-name-handler-alist nil)) (require 'core-spacemacs) (spacemacs/dump-restore-load-path) (configuration-layer/load-lock-file) (spacemacs/init) (configuration-layer/stable-elpa-init) (configuration-layer/load) (spacemacs-buffer/display-startup-note) (spacemacs/setup-startup-hook) (spacemacs/dump-eval-delayed-functions) (if (and dotspacemacs-enable-server (not (spacemacs-is-dumping-p))) (progn (require 'server) (if dotspacemacs-server-socket-dir (progn (setq server-socket-dir dotspacemacs-server-socket-dir))) (if (server-running-p) nil (message "Starting a server...") (server-start)))))
  (if (not (version<= spacemacs-emacs-min-version emacs-version)) (error (concat "Your version of Emacs (%s) is too old. " "Spacemacs requires Emacs version %s or above.") emacs-version spacemacs-emacs-min-version) (let ((please-do-not-disable-file-name-handler-alist nil)) (require 'core-spacemacs) (spacemacs/dump-restore-load-path) (configuration-layer/load-lock-file) (spacemacs/init) (configuration-layer/stable-elpa-init) (configuration-layer/load) (spacemacs-buffer/display-startup-note) (spacemacs/setup-startup-hook) (spacemacs/dump-eval-delayed-functions) (if (and dotspacemacs-enable-server (not (spacemacs-is-dumping-p))) (progn (require 'server) (if dotspacemacs-server-socket-dir (progn (setq server-socket-dir dotspacemacs-server-socket-dir))) (if (server-running-p) nil (message "Starting a server...") (server-start))))))
  eval-buffer(#<buffer  *load*> nil "/Users/davidgonsalves/.emacs.d/init.el" nil t)  ; Reading at buffer position 3366
  load-with-code-conversion("/Users/david/.emacs.d/init.el" "/Users/davidgonsalves/.emacs.d/init.el" t t)
  load("/Users/david/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode -0x148fbe78a6b07a7>) #f(compiled-function () #<bytecode -0x1f3c686ddc0d6275>) t)
  command-line()
  normal-top-level()

FlavaDave 2023-01-04T01:42:22.653689Z

> When you say you reinstalled, you totally deleted or renamed ~/.emacs.d? total deletion

eggsyntax 2023-01-04T01:44:20.536599Z

Surprises me that the errors didn't get mentioned in *messages*, but maybe that's another symptom of it being so messed up?

eggsyntax 2023-01-04T01:45:25.509139Z

Seems like it's looking in .spacemacs.d/ instead of .emacs.d though?

eggsyntax 2023-01-04T01:47:23.646149Z

Is it possible you've got a shell alias somewhere that's got .spacemacs.d by mistake? Or your shell startup is setting that as a value?

FlavaDave 2023-01-04T01:48:23.025969Z

this is *warnings*

Warning (initialization): An error occurred while loading '/Users/david/.emacs.d/init.el':

error: Invalid image type 'svg'

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the '--debug-init' option to view a complete error backtrace.

FlavaDave 2023-01-04T01:51:01.945249Z

So, Im not super knowledgable about aliases but I typed alias in the command line and there wasn't spacemacs or emacs when I greped it

👍 1
eggsyntax 2023-01-04T01:56:16.690099Z

And does anything show up if you do env | grep -i emac at the command line? Also…you’re starting emacs just with emacs?

eggsyntax 2023-01-04T01:57:33.587599Z

…I wonder whether it could somehow be pointing to an unexpected installation of emacs — I’d still expect that to use .emacs.d though, so not sure it matters, but maybe worth doing which emacs just to see if the result is surprising (dunno how you installed it in the first place).

FlavaDave 2023-01-04T01:58:19.373869Z

env | grep -i emac returns nothing

👍 1
FlavaDave 2023-01-04T01:58:48.498559Z

> Also…you’re starting emacs just with emacs? yes

eggsyntax 2023-01-04T01:59:10.850799Z

Oh, hmm, if you do emacs -Q do you get the exact same thing as you’re getting if you just do emacs?

FlavaDave 2023-01-04T01:59:19.774349Z

which emacs
/opt/homebrew/bin/emacs

FlavaDave 2023-01-04T02:00:37.737889Z

emacs -Q opens in the same buffer but it looks like old school emacs

eggsyntax 2023-01-04T02:01:24.795369Z

> So actually when I do emacs -Q — ie “start completely vanilla emacs with no init file” — C-x doesn’t work for me either — my mistake, I thought that was an emacs default, but it must only be spacemacs. ^ is what I started to type, but I take it from your last comment that emacs doesn’t look like old school emacs, it looks still at least somehow spacemacs-ish?

FlavaDave 2023-01-04T02:01:56.852499Z

yes, still spacemacs-ish

eggsyntax 2023-01-04T02:02:03.782019Z

Got it.

eggsyntax 2023-01-04T02:02:15.197299Z

And does "/Users/david/.spacemacs.d/ even exist?

FlavaDave 2023-01-04T02:02:42.111059Z

yes

eggsyntax 2023-01-04T02:03:25.197199Z

I still think that’s the likely source of trouble here, that for some reason it’s looking in the wrong dir. Unless somehow Spacemacs has shifted to making that its default dir instead of .emacs.d, which I could have missed if so.

eggsyntax 2023-01-04T02:05:09.247699Z

Another thing to try would be to delete (or move or rename) both ~/.emacs.d and ~/.spacemacs.d, and then try a fresh clone into ~/.emacs.d. If that doesn’t solve it, I’m about out of suggestions sadly 😕

eggsyntax 2023-01-04T02:05:41.023239Z

FWIW this is the first I’ve ever heard of a .spacemacs.d directory existing or having any relevance to anything.

FlavaDave 2023-01-04T02:14:42.453739Z

I use this https://github.com/practicalli/spacemacs.d

FlavaDave 2023-01-04T02:16:53.382539Z

> Another thing to try would be to delete (or move or rename) both ~/.emacs.d and ~/.spacemacs.d, and then try a fresh clone into ~/.emacs.d. So, I deleted both and did a fresh clone and it works. But as soon as I use the practicalli spacemacs config, it went right back to square one

eggsyntax 2023-01-04T02:23:10.615359Z

Oh, got it, I haven’t used theirs. Looks like it uses different dirs (based on the page you linked), namely ~/.config/emacs and ~/.config/spacemacs; maybe you’d have to delete those as well to really get a fresh install? But yeah, no clue on theirs, you’d probably have to check with @jr0cket. I’m glad that at least regular Spacemacs works!

FlavaDave 2023-01-04T02:27:18.264059Z

ohh yea that seems new. If you hit the tab for classic config you'll see the ~/.spacemacs.d but i guess I'll have to wait and hear what he says

FlavaDave 2023-01-04T02:27:27.182749Z

Thanks for all of your help!

eggsyntax 2023-01-04T02:27:56.828369Z

You're welcome, good luck!

practicalli-johnny 2023-01-04T03:16:47.198459Z

Remove .spacemacs.d directory and .spacemacs file if they exist Ensure that there is only one Spacemacs install, either in .config/emacs or .emacs.d (but not both)

✅ 1
practicalli-johnny 2023-01-04T03:21:28.238069Z

Then start Emacs and it should show a simple Spacemacs install wizard in the bottom of the window. If the major version of Emacs has changed due to the OS updates, a large number of packages will download. Wait for them to finish (ignore warnings) and then restart Emacs If that works, then yo can consider cloning the Practicalli spacemacs.d directory and removing the .spacemacs file Using the Practicalli config requires fira code fonts install

practicalli-johnny 2023-01-04T03:24:38.406409Z

If none of that works, something may be wrong with Emacs. Running emacs -Q will run Emacs without any config. M-x should allow you to call the command to show the Emacs version (type version and the commands will narrow). Hopefully it's version 28 or 27 C-x C-c to quit emacs

FlavaDave 2023-01-04T03:26:32.395169Z

Okay so I tried all of that and it didn't work and my version is 28.1

FlavaDave 2023-01-04T03:29:05.058509Z

I think I just fixed it.

🎉 2
FlavaDave 2023-01-04T03:29:24.417059Z

Looks like I had two emacs installed and one wasn't linked