I freshly (re)installed doom-emacs on macOS. The install has no personal configuration. I answered affirmatively to the questions on installing an env and the additional fonts. When opening emacs in a terminal, it writes the message:
Error in Doom Emacs core: void-function, set-fontset-font
Everything is extremely broken, to the point that SPC doesn't pop up the usual window of commands and M-x does nothing.
Things were mostly fine with an earlier installation (from commit f754d4ff) on a very similar machine.
I should also add that attempting to run doom doctor prints the message:
Cannot open load file: No such file or directory, $HOME/.local/core/autoload/format
(where it replaces $HOME in the above, obviously).
Any ideas? (I've no idea how to use the debugger.)
The output of doom info is below. (I know my $PATH is screwed up; WIP.)
((emacs
(version . "26.2")
(features . "NOTIFY ACL GNUTLS LIBXML2 ZLIB MODULES THREADS")
(build . "Apr 13, 2019")
(buildopts "--disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs/26.2/share/info/emacs --prefix=/usr/local/Cellar/emacs/26.2 --with-gnutls --without-x --with-xml2 --without-dbus --with-modules --without-ns --without-imagemagick"))
(doom
(version . "2.0.9")
(build . "HEAD -> develop, origin/develop, origin/HEAD 29614a31 2019-08-27 16:31:24 -0400"))
(system
(type . darwin)
(config . "x86_64-apple-darwin18.5.0")
(shell . "/bin/zsh")
(uname . "Darwin 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64")
(path "~/.rvm/gems/ruby-2.6.0/bin" "~/.rvm/gems/ruby-2.6.0@global/bin" "~/.rvm/rubies/ruby-2.6.0/bin" "~/.cargo/bin" "~/.local/bin" "~/.cargo/bin" "/usr/local/bin" "/usr/bin" "/bin" "/usr/sbin" "/sbin" "/Library/TeX/texbin" "/opt/X11/bin" "~/.rvm/gems/ruby-2.6.0/bin" "~/.rvm/gems/ruby-2.6.0@global/bin" "~/.rvm/rubies/ruby-2.6.0/bin" "~/.cargo/bin" "~/.fzf/bin" "~/.rvm/bin" "~/.rvm/bin" "/usr/local/Cellar/emacs/26.2/libexec/emacs/26.2/x86_64-apple-darwin18.5.0"))
(config
(envfile . envvar-file)
(elc-files . 0)
(modules :completion company ivy :ui doom doom-dashboard doom-quit hl-todo modeline nav-flash ophints (popup +all +defaults) vc-gutter vi-tilde-fringe window-select workspaces :editor evil file-templates fold multiple-cursors rotate-text snippets :emacs dired electric vc :tools eval flycheck (lookup +docsets) magit :lang data emacs-lisp markdown (org +dragndrop +ipython +pandoc +present) sh :config default)
(packages "n/a")
(elpa-packages "n/a")))
I should also say that
cd
rm -rf .doom.d .emacs.d
git clone https://github.com/hlissner/doom-emacs ~/.emacs.d
cd .emacs.d
git checkout f754d4ff93a7e21e498f0228e480c78211fe05d7
cd
doom --insecure install
doesn't produce a working installation. (It's actually even more messed up! There's no 'splash' screen or anything.) I've no idea what to do!
doom --insecure install
There is no --insecure switch anymore. You can omit that.
Error in Doom Emacs core: void-function, set-fontset-font
This suggests an issue with your installation. This function is built into Emacs. How have you installed Emacs?
And are you sure you've opened the correct version of Emacs when you start up Doom? (MacOS comes with Emacs 22 included. The error would make sense if you had started that version by accident).
Cannot open load file: No such file or directory, $HOME/.local/core/autoload/format
(where it replaces $HOME in the above, obviously).
Even with $HOME replaced with /Users/$USER/, the path is very wrong. It should be loading $HOME/.emacs.d/core/autoload/format. Are you sure this was copied correctly?
(The --insecure switch was only used with commit f754d4ff as otherwise hitting ELPA wouldn't work. The fresh reinstallation followed the instructions given, i.e. just doom install.)
emacs was installed with brew. It's version 26.2. (which emacs points to /usr/local/bin/emacs, which is a symlink to /usr/local/Cellar/emacs/26.2/bin/emacs.)
I realise now that the issue with doom doctor was that I had, for convenience, a symlink in ~/.local/bin that pointed to it; directly going into ~/.emacs.d/bin and running ./doom-doctor worked, even if using the symlink didn't. (Is that expected behaviour?)
Ah, I see the issue with doom doctor. I'll address than shortly. I'm still a bit lost for the original issue however. Does this resolve that issue?
cd ~/.emacs.d/.local
rm -f autoload.*
../bin/doom refresh -f
Unfortunately it didn't (with rm -f autoload.* replaced with rm -f autoload*).
Is there a surefire way to completely nuke everything and start over? I've tried removing ~/.doom.d, ~/.emacs.d, and reinstalling emacs with brew, but to no avail. It's terribly odd.
The nuclear option is to simply delete ~/.emacs.d and ~/.doom.d. If that's not working, I suspect either an issue with the Emacs build or your private config. Does the issue persist with a blank private config (i.e. just the doom! block in ~/.doom.d/init.el and nothing else)?
I'll set up my macos VMs tomorrow and run my own tests.
(side note, 78d951b should've resolved the issue with the good doctor)
So far as I can see, installing doom-emacs from scratch leads to an init.el file that only contains a doom! block:
;;; init.el -*- lexical-binding: t; -*-
;; Copy this file to ~/.doom.d/init.el or ~/.config/doom/init.el ('doom install'
;; will do this for you). The `doom!' block below controls what modules are
;; enabled and in what order they will be loaded. Remember to run 'doom refresh'
;; after modifying it.
;;
;; More information about these modules (and what flags they support) can be
;; found in modules/README.org.
(doom! :input
;;chinese
;;japanese
:completion
company ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
ivy ; a search engine for love and life
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
doom-quit ; DOOM quit-message prompts when you quit Emacs
;;fill-column ; a `fill-column' indicator
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
;;indent-guides ; highlighted indent columns
modeline ; snazzy, Atom-inspired modeline, plus API
nav-flash ; blink the current line after jumping
;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup ; tame sudden yet inevitable temporary windows
+all ; catch all popups that start with an asterix
+defaults) ; default popup rules
;;pretty-code ; replace bits of code with pretty symbols
;;tabs ; an tab bar for Emacs
;;treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages
vc-gutter ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
;;(format +onsave) ; automated prettiness
;;lispy ; vim for lisp, for people who dont like vim
multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent
:emacs
dired ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
vc ; version-control and Emacs, sitting in a tree
:term
;;eshell ; a consistent, cross-platform shell (WIP)
;;shell ; a terminal REPL for Emacs
;;term ; terminals in Emacs
;;vterm ; another terminals in Emacs
:tools
;;ansible
;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv
;;docker
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
eval ; run code, run (also, repls)
flycheck ; tasing you for every semicolon you forget
;;flyspell ; tasing you for misspelling mispelling
;;gist ; interacting with github gists
(lookup ; helps you navigate your code and documentation
+docsets) ; ...or in Dash docsets locally
;;lsp
;;macos ; MacOS-specific commands
magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs
;;pass ; password manager for nerds
;;pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
;;rgb ; creating color strings
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
;;upload ; map local to remote projects via ssh/ftp
;;wakatime
:lang
;;agda ; types of types of types of types...
;;assembly ; assembly for fun or debugging
;;cc ; C/C++/Obj-C madness
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
data ; config/data formats
;;erlang ; an elegant language for a more civilized age
;;elixir ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;ess ; emacs speaks statistics
;;fsharp ; ML stands for Microsoft's Language
;;go ; the hipster dialect
;;(haskell +intero) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ;
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
;;latex ; writing papers in Emacs has never been so fun
;;ledger ; an accounting system in Emacs
;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
(org ; organize your plain life in plain text
+dragndrop ; file drag & drop support
+ipython ; ipython support for babel
+pandoc ; pandoc integration into org's exporter
+present) ; using Emacs for presentations
;;perl ; write code no one else can comprehend
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
;;python ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;rest ; Emacs as a REST client
;;ruby ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;scheme ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
;;web ; the tubes
;;vala ; GObjective-C
:email
;;(mu4e +gmail) ; WIP
;;notmuch ; WIP
;;(wanderlust +gmail) ; WIP
;; Applications are complex and opinionated modules that transform Emacs
;; toward a specific purpose. They may have additional dependencies and
;; should be loaded late.
:app
;;calendar
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought
;;(write ; emacs for writers (fiction, notes, papers, etc.)
;; +wordnut ; wordnet (wn) search
;; +langtool) ; a proofreader (grammar/style check) for Emacs
:config
;; For literate config users. This will tangle+compile a config.org
;; literate config in your `doom-private-dir' whenever it changes.
;;literate
;; The default module sets reasonable defaults for Emacs. It also
;; provides a Spacemacs-inspired keybinding scheme and a smartparens
;; config. Use it as a reference for your own modules.
(default +bindings +smartparens))
Clearing it out and having an empty block, namely just (doom!), produces what you might expect: a vanilla-ish emacs experience (although, interestingly, it still whines about set-fontset-font in the modeline).
I woke up thinking about this:
Assembly required. Doom trusts you, for better or worse. It inherits your shell configuration, warts et all. If your system is misconfigured, Doom is misconfigured.
Reinstallling doom-emacs without an env didn't (apparently) change anything, but it's believable (to me) that something about my system is causing an issue.
Small addendum: reinstalling doom-emacs on my workstation (Ubuntu 16.04) was totally fine, and the two share most of their configuration (.zshrc, etc.); I'll investigate further on my personal MacBook (the discussion above is all about a work-issued MacBook) this evening.
I can confirm that the same situation obtains on my personal MacBook.
Johnny Brainlet over here has figured it out. I had installed emacs via brew, but using the command brew install emacs, not brew cask install emacs. Apparently something about the latter (i.e. the full-fat, GUI-included version) is required...
Edit: I'd be remiss to not thank you for your help and for all your work on doom-emacs鈥攊t's a treasure.
That certainly is odd. Normally I'd recommend folks avoid the cask build of Emacs -- it used to have compatibility issues -- and prefer the emacs, emacs-plus or emacs-mac formulas instead. Perhaps they've been resolved.
I'd recommend giving emacs-plus a try, at least. It is the best supported formula (afaik) for Doom.
brew tap d12frosted/emacs-plus
brew install emacs-plus
ln -s /usr/local/opt/emacs-plus/Emacs.app /Applications/Emacs.app
Just a quick heads up. I added a set-fontset-font check in 3a10e94, since it appears this function isn't defined in builds of Emacs that aren't compiled with X support.