9

Is anyone successfully running a windowed emacs, (not terminal emacs), on one of the new Mac M1s?

Does this port work? https://emacsformacosx.com

Is there another?

5
  • emacsformacosx.com is a reliable distribution and has been around for several years, and there are also bleeding edge builds available from that maintainer. If you want to build Emacs yourself (with some help), then most people seem to gravitate towards homebrew ... there is lots of information on Google about how to install Emacs using the latter, including some threads in this forum. Go ahead and give emacsformacosx.com a try. If you don't like it after trying it, then just move it to the trash folder. I personally prefer to build Emacs from source (assembly required).
    – lawlist
    Nov 25, 2020 at 21:12
  • Yes there is another: github.com/railwaycat/homebrew-emacsmacport Mentioned also here: wikemacs.org/wiki/Installing_Emacs_on_OS_X May 12, 2021 at 21:03
  • The actual mac enhanced port is from mituharu bitbucket.org/mituharu/emacs-mac/commits/all railway cat is just packaged for homebrew. This build will build on Apple Silicon from its configure etc also available 9as is pure GNU Emacs) on packaging systems like MAcports and Homebrew
    – mmmmmm
    Jul 19, 2021 at 18:07
  • can one install it with brew for m1 max? Feb 24 at 17:08
  • brew install worked for me once I made sure brew was for m1 I think...did you try this? Feb 24 at 17:25

7 Answers 7

8

Yes, https://emacsformacosx.com works on the M1 Macs. However, it does also require that you override the security preferences regarding app identity when you have downloaded and installed the package, immediately after running it.

  1. Run the application.
  2. When you get the error about the app not being signed by an identified developer, immediately open System Preferences, Security & Privacy, and say you wish to open the application.

Mac OS Security & Privacy preferences picture

Editorial note: because I don't have 50 reputation, I am not allowed to comment on the answer, which I believe already answered the question. I think it would have been more appropriate to comment with a clarification, rather than having to enter a completely new answer.

2
  • can one install it with brew for m1 max? Feb 24 at 17:08
  • brew install worked for me once I made sure brew was for m1 I think...did you try this? Feb 24 at 17:25
4

Yes. The Emacs from macsformacosx.com works in GUI mode on the Mac M1. It is running in x86 emulation mode, not native ARM mode, but it works.

I plan to try some of the other versions later (Mitsuharu's version, homebrew version, nativecomp version) but since this one works I'm going to use it for now.

6
  • Thank you. That’s what I wanted to know. Nov 26, 2020 at 22:56
  • I've run into issues with vterm, which wants to compile C code into a dynamically linked module. It doesn't know about arm vs x86 and has compile errors. I haven't used emacs yet much on this machine so I may run into other issues as I start using it for real work.
    – amitp
    Nov 27, 2020 at 21:28
  • 1
    Also good news: the Mitsuharu version of emacs does compile for ARM, with a few minor patches (see the work branch). However I can't get dynamically loaded modules like vterm to work in it.
    – amitp
    Nov 29, 2020 at 1:46
  • 1
    Update: the Mitsuharu version does work with modules like vterm. I have switched to it because the emacsformacosx.com version was flickering when I used lsp-mode, and the Mitsuharu version didn't flicker.
    – amitp
    Jan 8, 2021 at 17:39
  • can one install it with brew for m1 max? Feb 24 at 17:08
1

You can use this repository [1] and install Emacs using brew. I think the README is self-explanatory. I use Emacs Doom as IDE with heavy reliant on LSP. This Emacs source has some needed patches to make it work on Apple ARM machines.

[1] https://github.com/d12frosted/homebrew-emacs-plus

1
  • can one install it with brew for m1 max? Feb 24 at 17:11
1

With emacsformacosx I use the following path in a script/alias:

/Applications/Emacs.app/Contents/MacOS/Emacs-arm64-12

Rosetta is not required.

4
  • can one install it with brew for m1 max? Feb 24 at 17:11
  • All I did was download and install Emacs-27.2-3-universal.dmg from emacsformacosx.com. It's a universal binary and the ARM executable seems to end up at the path I mentioned above.
    – KGBird
    Feb 25 at 19:15
  • @KGBird: I made an alias in my .zshrc to load the Emacs-arm64-12. Is there a cleaner way to avoid aliases so that emacs open Emacs-arm63-12? Apr 7 at 7:13
  • I don't know of a cleaner way.
    – KGBird
    Apr 10 at 1:16
0

I have this working as well, from both the dock UI and commandline entry points. To get the commandline entry point to work, I had to run emacs from a rosetta-enabled terminal, e.g.

Setup a rosetta2 terminal profile

https://cutecoder.org/software/run-command-line-apple-silicon/

In that terminal, start up emacs like this:

/Applications/Emacs.app/Contents/MacOS/Emacs

-C

3
  • You should not need rosetta there are several arm emacs builds around
    – mmmmmm
    Jul 19, 2021 at 18:05
  • can one install it with brew for m1 max? Feb 24 at 17:11
  • Since my post about rosetta2, newer versions have been posted which work in native arm mode. mmmmmm is right, rosetta is no longer needed. Mar 26 at 4:08
0

brew install worked for me once I made sure brew was for m1 I think

brew install emacs

but you might make need to make sure brew is for m1.

0

I used the installation from homebrew cask

brew install --cask emacs 

Once has to open Emacs using by Control-click on the Emacs app icon in the applications folder. This will fail with a message that the application cannot be run. This is because emacs in /opt/homebrew/bin is linked to /Applications/Emacs.app/Contents/MacOS/Emacs.

Adding an alias in your .zshrc file

alias emacs=/Applications/Emacs.app/Contents/MacOS/Emacs-arm64-12

will fix the problem.


Comment: I tried to create a link between emacs in /opt/hembrew/bin to /Applications/Emacs.app/Contents/MacOS/Emacs-arm64-12. This did not work, and I got the error

dyld: Library not loaded: @executable_path/lib-arm64-12/libgnutls.30.dylib Referenced from: /opt/homebrew/bin/emacs Reason: image not found

Maybe some UNIX savvy member of our community can find a clean way to fix this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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