12

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?

Drew
  • 75,699
  • 9
  • 109
  • 225
Rich Pixley
  • 221
  • 1
  • 2
  • 4
  • https://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 https://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 '20 at 21:12
  • Yes there is another: https://github.com/railwaycat/homebrew-emacsmacport Mentioned also here: https://wikemacs.org/wiki/Installing_Emacs_on_OS_X – Troy Folger May 12 '21 at 21:03
  • The actual mac enhanced port is from mituharu https://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 '21 at 18:07
  • can one install it with brew for m1 max? – Charlie Parker Feb 24 '22 at 17:08
  • brew install worked for me once I made sure brew was for m1 I think...did you try this? – Charlie Parker Feb 24 '22 at 17:25

7 Answers7

9

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.

John K
  • 91
  • 2
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.

amitp
  • 2,451
  • 12
  • 23
  • Thank you. That’s what I wanted to know. – Rich Pixley Nov 26 '20 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 '20 at 21:28
  • 1
    Also good news: the [Mitsuharu version of emacs](https://bitbucket.org/mituharu/emacs-mac/commits/) 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 '20 at 01: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 08 '21 at 17:39
  • can one install it with brew for m1 max? – Charlie Parker Feb 24 '22 at 17:08
  • brew install worked for me once I made sure brew was for m1 I think...did you try this? – Charlie Parker Feb 24 '22 at 17:25
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

M.Rez
  • 111
  • 4
1

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

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

Rosetta is not required.

KGBird
  • 111
  • 2
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

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.

Oliver Díaz
  • 101
  • 2