see https://qiita.com/takaxp/items/e07bb286d80fa9dd8e05 and https://qiita.com/takaxp/items/6a7f9b26eb1b1a8237a0
Note
Version 30.2 has been released. The previous inline patch (emacs-29.1-inline.patch) is still applicable to Emacs 30.2. Installer packages for Intel-based Mac and Apple Silicon Mac are also available.
- avoid βM-x γβ
- faces for composing text
- non ja locale
- directly change input source
- Emacs HEAD (emacs-head-inline.patch)
- Emacs 30.2, 30.1 (emacs-29.1-inline.patch)
- Emacs 29.4, 29.3, 29.2, 29.1 (emacs-29.1-inline.patch)
- Emacs 28.2, 28.1 (emacs-28.1-inline.patch)
- Emacs 27.2, 27.1 (emacs-27.1-inline.patch)
- Emacs 26.3, 26.2, 26.1 (emacs-25.2-inline.patch)
- Emacs 25.3, 25.2 (emacs-25.2-inline.patch)
- M-x mac-build-info
- M-x mac-ime-input-source-list
- M-x mac-ime-activate
- M-x mac-ime-deactivate
- M-x mac-ime-toggle
- mac-ime-before-put-text-hook
- mac-ime-after-put-text-hook
Add the following code to your init.el.
(when (and (memq window-system '(ns nil))
(fboundp 'mac-get-current-input-source))
(when (version< "27.0" emacs-version)
;; Required for some cases when auto detection is failed or the locale is "en".
(custom-set-variables
'(mac-default-input-source "com.google.inputmethod.Japanese.base")))
(mac-input-method-mode 1))Tip
You can find available input sources by M-x mac-ime-input-source-list. The available sources will be listed in the Message buffer.
For your convenience, some build scripts are provided. Before you run the script, please run setup.sh first.
git clone --depth=1 https://github.com/takaxp/ns-inline-patch.git
cd ns-inline-patch
sh ./build/setup.sh
sh ./build/emacs-30.sh -nImportant
Please provide -n option to enable NativeComp if needed.
Tip
Specifying CC may resolve your issue when you get an error on missing AppKit.h.
CC=/usr/bin/clang sh ./build/emacs-30.shIf your environment for building Emacs is under PROXY, you can use emacs-mirror to get Emacs source codes. Please change the URL of the git repository specified in emacs-head.sh and emacs-30.sh if needed.
You can download my pre-built Emacs HEAD, 30.2, 29.4, 28.2, 27.2 with ns-inline patch. Emacs.app will be installed under /Applications/Emacs-takaxp in your macOS. Please copy Emacs.app into /Applications if needed. The provided packages contain GnuTLS and jansson. Also TREE-SITTER is included in 29.4 or later packages.
All packages are signed and notarized with my Apple developer ID: H2PH8KNN3H.
Warning
These packages are built based on the latest development source code. So it may be unstable or broken.
- Emacs 31.0.50 HEAD of Master branch with NativeComp
| Version | Chip | macOS | π | Date | md5 |
|---|---|---|---|---|---|
| 31.0.50 | Apple | Tahoe or later | π¦ | 2026-03-20 | 3ab10361e7c55b796f21c941672f56a5 |
| 31.0.50 | Apple | Sequoia (15) | π¦ | 2026-03-20 | 9c4de27b60fd49c3f343987fc4b71065 |
| 31.0.50 | Apple | Sonoma (14) | π¦ | 2026-03-20 | cfaee8b36083947ef611f01335b7b4b9 |
| 31.0.50 | Intel | Tahoe or later | π¦ | 2026-03-20 | 6edc4edff9a61662238668f6d89a56d8 |
| 31.0.50 | Intel | Sequoia (15) | π¦ | 2026-03-20 | c8c8ef7390e4c634c42490a4f87d260c |
Important
Please read Using NativeComp section if you have any troubles.
If you want to try the above HEAD package without enabling NativeComp, please check disable NativeComp section.
- Emacs 30.2 with NativeComp
| Version | Chip | macOS | π | Date | md5 |
|---|---|---|---|---|---|
| 30.2 | Apple | Tahoe or later | π¦ | 2026-03-14 | 4804ceaa2392aa2e75c80fca753dd5a6 |
| 30.2 | Apple | Sequoia (15) | π¦ | 2026-03-14 | a0762202c6bb0f282669d7178ff2e56a |
| 30.2 | Apple | Sonoma (14) | π¦ | 2026-03-14 | a34a9727cbac59b67058a8e8df4ba19e |
| 30.2 | Intel | Tahoe or later | π¦ | 2026-03-14 | 2f65369a818d18b382e3ececeab274f9 |
| 30.2 | Intel | Sequoia (15) | π¦ | 2026-03-14 | eaaea6ff0a92bce72b7ba5991770841b |
Important
Please read Using NativeComp section if you have any troubles.
- Emacs 30.2
withoutNativeComp
| Version | Chip | macOS | π | Date | md5 |
|---|---|---|---|---|---|
| 30.2 | Apple | Tahoe or later | π¦ | 2026-03-13 | c53696495162e1cda44467c960a56cca |
| 30.2 | Apple | Sequoia (15) | π¦ | 2026-03-13 | 2597efceb90c72726200ae31a4ea77e3 |
| 30.2 | Apple | Sonoma (14) | π¦ | 2026-03-13 | eb0c0e0cd9e2d372b5489ea9e37e7762 |
| 30.2 | Intel | Tahoe or later | π¦ | 2026-03-13 | a48c13e135b88c656e7fe73d36b5566d |
| 30.2 | Intel | Sequoia (15) | π¦ | 2026-03-13 | 295cc10126d11db4e1271191f93b5d30 |
- Emacs 29.4 with NativeComp
| Version | Chip | macOS | π | Date | md5 |
|---|---|---|---|---|---|
| 29.4 | Apple | Tahoe or later | π¦ | 2026-03-13 | c752a2ef757792391903eae2250cfdf4 |
| 29.4 | Apple | Sequoia (15) | π¦ | 2026-03-13 | 3b6feda59e574a7ecd7fddefea3b03f6 |
| 29.4 | Apple | Sonoma (14) | π¦ | 2026-03-13 | ed299905476e222bb0fc94d968d03bfc |
| 29.4 | Intel | Tahoe or later | π¦ | 2026-03-13 | a56bdce24afcc3dc8895c520f114db34 |
| 29.4 | Intel | Sequoia (15) | π¦ | 2026-03-13 | e524791289974b41486f367ece0ec0ca |
Important
Please read Using NativeComp section if you have any troubles.
- Emacs 29.4
withoutNativeComp
| Version | Chip | macOS | π | Date | md5 |
|---|---|---|---|---|---|
| 29.4 | Apple | Tahoe or later | π¦ | 2026-03-13 | 0cbe422978d5ec8706a36007cd179036 |
| 29.4 | Apple | Sequoia (15) | π¦ | 2026-03-13 | fd05d58389a2a1b7c55b074cc77c867e |
| 29.4 | Apple | Sonoma (14) | π¦ | 2026-03-13 | f226ee11ed332d764fe3428a55cbe7ee |
| 29.4 | Intel | Tahoe or later | π¦ | 2026-03-13 | 574a928f270a468f737217eb7fbb453d |
| 29.4 | Intel | Sequoia (15) | π¦ | 2026-03-13 | 627b58efb880090c283e0defdc742396 |
- Emacs 28.2
withoutNativeComp
| Version | Chip | macOS | π | Date | md5 |
|---|---|---|---|---|---|
| 28.2 | Apple | Tahoe or later | π¦ | 2026-03-13 | 0f94d657345e05413c3e631c8c71cca9 |
| 28.2 | Apple | Sequoia (15) | π¦ | 2026-03-13 | cbc20c66b49e798baa4a52d345501c15 |
| 28.2 | Apple | Sonoma (14) | π¦ | 2026-03-13 | fda1c4883182bc4b217570e12124ac88 |
| 28.2 | Intel | Tahoe or later | π¦ | 2026-03-13 | 103e7a1f85038a643b9ea15efb2b0a70 |
| 28.2 | Intel | Sequoia (15) | π¦ | 2026-03-13 | 786fd12f9616b6fdba1e6da0061618c2 |
- Emacs 27.2
withoutNativeComp
| Version | Chip | macOS | π | Date | md5 |
|---|---|---|---|---|---|
| 27.2 | Apple | Tahoe or later | π¦ | 2026-03-13 | f145f239ee6ebfff137a5c1353247925 |
| 27.2 | Apple | Sequoia (15) | π¦ | 2026-03-13 | d4e03c78596485da0e4b1a746352c254 |
| 27.2 | Apple | Sonoma (14) | π¦ | 2026-03-13 | 8f6f81d47eb2123b2f7bf66351d0680c |
| 27.2 | Intel | Tahoe or later | π¦ | 2026-03-13 | ba2dcc3fc41740e95d4942c93bb4a1d2 |
| 27.2 | Intel | Sequoia (15) | π¦ | 2026-03-13 | 9a48ad3a12858be0939668b6a4c0b923 |
For Emacs 31.x, 30.2, and 29.4 users, you can try to use an Emacs supporting NativeComp by downloading pkg from the links in above sections. Integrated lisp code are natively compiled so the pkg size is increased compared to that of the normal pkg file.
Currently, installing gcc by brew is required to compile additional lisp code by the installed Emacs. And adding the following configuration will be needed to your early-init.el or beginning of init.el when you face a warning like Warning (comp): libgccjit.so: error: error invoking gcc driver.
(setenv "LIBRARY_PATH"
(string-join
'("/opt/homebrew/opt/gcc/lib/gcc/15"
"/opt/homebrew/opt/libgccjit/lib/gcc/15"
"/opt/homebrew/opt/gcc/lib/gcc/15/gcc/aarch64-apple-darwin25/15")
":"))Note
15specified in the above paths may have to be aligned to your environment.- For Intel mac user, please replace
aarch64withx86_64. darwin25may also be changed, check the output of M-xemacs-version, or run/opt/homebrew/bin/gcc-15 -dumpmachine.
If you use batch-native-compile or batch-byte+native-compile in a batch mode, setting for LIBRARY_PATH in your shell may be required as well.
export LIBRARY_PATH="/opt/homebrew/opt/gcc/lib/gcc/15:/opt/homebrew/opt/libgccjit/lib/gcc/15:/opt/homebrew/opt/gcc/lib/gcc/15/gcc/aarch64-apple-darwin25/15"
${EMACS} -Q --batch --eval="(setq native-comp-eln-load-path (list (expand-file-name \"eln-cache/\" user-emacs-directory)))" -f batch-byte+native-compile init.elJust run the following two commands.
# setup grew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# install gcc
brew install gccThe following code will disable NativeComp module in each emacs session. So, no need to install GCC via Homebrew. Put the following code to early-init.el or beginning of init.el.
(setq native-comp-jit-compilation nil
native-comp-enable-subr-trampolines nil) - libffi.7.dylib (or libffi.8.dylib), libffi is NOT contained in HEAD pkg.
- libgmp.10.dylib
- libintl.8.dylib
- libtree-sitter.0.26.dylib
- libgnutls.30.dylib
- libnettle.8.dylib
- libunistring.5.dylib
- libhogweed.6.dylib
- libp11-kit.0.dylib
- libidn2.0.dylib
- libtasn1.6.dylib
The system-configuration-features is:
ACL GNUTLS LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER SQLITE3 THREADS TOOLKIT_SCROLL_BARS TREE_SITTER ZLIB
Enjoy!