You may encounter errors after up/downgrading Emacs. Run $ doom sync on the command line after changing the installed version of Emacs. If you’ve changed the major version (e.g. 27 → 28 or vice versa) run $ doom build too.
$ doom sync will re-index any built-in/site loaddef files. This is especially necessary if paths to built-in libraries have changed.
$ doom build will recompile all your installed packages, which is necessary because Emacs bytecode not generally forward compatible across major releases (e.g. 27 → 28). Alternatively, reinstall all your packages by deleting ~/.emacs.d/.local , then run $ doom sync .
TL;DR version: run $ doom build && doom sync after up/downgrading Emacs.
$ brew upgrade will upgrade all packages installed with homebrew. $ brew upgrade emacs would upgrade only Emacs. Either will work. Which you prefer is personal preference.
There is likely a brew sub-command that’ll tell you that, but I’m not a macOS user, so I couldn’t tell you off the top of my head.
That said, here’s one quick way to tell: run $ which emacs. It’ll tell you where the emacs executable lives, and if that happens to be in a sub-directory of /usr/local/Cellar/, then it was installed by Homebrew. Any other result (including emacs not found) indicates it was installed another way.
After running brew upgrade I got the following message:
Emacs.app was installed to:
To link the application to default Homebrew App location:
ln -s /usr/local/opt/emacs-plus@27/Emacs.app /Applications
If you wish to install Emacs 26 or Emacs 28, use emacs-plus@26 or
emacs-plus@28 formula respectively.
To start d12frosted/emacs-plus/emacs-plus@27 now and restart at login:
brew services start d12frosted/emacs-plus/emacs-plus@27
Or, if you don't want/need a background service you can just run:
So apparently I am configured to emacs 27 specifically.
I tried to uninstall emacs to install it again, but I got this error.
% brew uninstall emacs-plus
Error: No such keg: /usr/local/Cellar/emacs-plus
Ah, my bad. I forgot Homebrew symlinks them. If you run $ readlink $(which emacs), it will likely resolve to a path under /usr/local/Cellar.
This is getting further away from Doom and deeper into MacOS territory. I can only guess at this point, but try $ brew uninstall emacs-plus@27. Or $ brew cask uninstall emacs-plus? Not even sure if brew cask is still a thing.
Maybe we should take this to our Discord. At this point it’ll just be trial and error the rest of the way.
You are completely right! $ brew uninstall emacs-plus@27 managed to uninstall, and then $ brew install emacs-plus did the trick! I now have emacs-plus 28 installed. And I also managed to simply install doom by running doom build and doom sync as you said.