Skip to content

Latest commit

 

History

History
228 lines (176 loc) · 16.9 KB

README.org

File metadata and controls

228 lines (176 loc) · 16.9 KB

An enhanced inline patch for GNU Emacs

https://github.com/takaxp/ns-inline-patch/workflows/Build%20NS%20with%20inline-patch%20(HEAD)/badge.svg https://github.com/takaxp/ns-inline-patch/workflows/Build%20NS%20with%20inline-patch%20(emacs-29)/badge.svg https://github.com/takaxp/ns-inline-patch/workflows/Build%20NS%20with%20inline-patch%20(emacs-28)/badge.svg https://github.com/takaxp/ns-inline-patch/workflows/Build%20NS%20with%20inline-patch%20(emacs-27)/badge.svg https://github.com/takaxp/ns-inline-patch/workflows/Build%20NS%20with%20inline-patch%20(emacs-26)/badge.svg

see https://qiita.com/takaxp/items/e07bb286d80fa9dd8e05 and https://qiita.com/takaxp/items/6a7f9b26eb1b1a8237a0

Note: Version 29.4 has been released. The inline patch (emacs-29.1-inline.patch) is applicable to Emacs 29.4. Installer packages for Intel-based Mac and Apple Silicon Mac are also available. You may install them in macOS Catalina or later.

Supported features

  • avoid “M-x あ”
  • faces for composing text
  • non ja locale
  • directly change input source

Supported Emacs version

  • Emacs HEAD (emacs-head-inline.patch)
  • Emacs 29.1, 29.2, 29.3, 29.4 (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)

Integrated functions

  • M-x mac-build-info

Note: This function is not valid in pre-built packages described in later section.

How to use?

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))

Build scripts

For your convenience, some build scripts are provided. Before you run the script, please run setup.sh first.

sh ./build/setup.sh
sh ./build/emacs-29.sh

If 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-29.sh if needed.

Pre-built distribution package

You can download my pre-built Emacs 26.3, 27.1, 27.2, 28.1, 28.2, 29.1, 29.2, 29.3, 29.4 and HEAD with ns-inline patch. Emacs.app will be installed under /Applications/Emacs-takaxp in your macOS. The pkg contains GnuTLS and jansson. These packages are signed and notarized with my Apple developer ID: H2PH8KNN3H.

Emacs 30x (with inline patch) !unstable!

These packages are built based on the current development source code. So it may be unstable or broken.

ChipVersionDownloadmacOSmd5
Apple31.0.50⬇pkg (23NOV2024)Sonoma94495b9e701357f5b0450160eabd05aa
Intel31.0.50⬇pkg (23NOV2024)Ventura16eb1da3578a53b3aa7e5c1d378b1a0a

You can also try to use an Emacs supporting NativeComp by downloading pkg from the following links. 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.

ChipVersionDownloadmacOSmd5
Apple31.0.50⬇pkg(NC) (23NOV2024)Sonomad0936475121d814449a0d3f3676a54aa
Intel31.0.50⬇pkg(NC) (23NOV2024)Ventura93173ca46e5b907060e7013ddc60372a
Apple29.4⬇pkg(NC) (13AUG2024)Sonoma909bca461aab416c4ed8a3971531685c
Intel29.4⬇pkg(NC) (13AUG2024)Venturaede9e15e84926b4d834dd21029fde595
(setenv "LIBRARY_PATH"
        (string-join
         '("/opt/homebrew/opt/gcc/lib/gcc/14"
           "/opt/homebrew/opt/libgccjit/lib/gcc/14"
           "/opt/homebrew/opt/gcc/lib/gcc/14/gcc/aarch64-apple-darwin23/14")
         ":"))

Note:

  • 14 specified in the above paths may have to be aligned to your environment.
  • For Intel mac user, please replace aarch64 with x86_64.

install gcc by grew

# setup grew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# install gcc
brew install gcc

Emacs 29 (with inline patch)

Note: Before installing the pre-built package, please remove previous Emacs.app from the installed directory if you have installed Emacs 29x. If the previously installed Emacs.app is not removed, the installation may fail.

ChipVersionDownloadmacOS[MB]md5
Apple29.4⬇pkg (2024-08-13)Sonoma59.3122378bfe6c89eb8e29d292e6d982758
Intel29.4⬇pkg (2024-08-13)Ventura59.64871fb28c204254733de5f92fb2b2609
Apple29.3⬇pkg (2024-03-26)Sonoma59.300e6c45e8ca4701a2c14c68fcee3ac63
Intel29.3⬇pkg (2024-03-26)Ventura59.7309c842fa1b4f9be822e2fb20433716b
Apple29.2⬇pkg (2024-01-21)Sonoma59.645db9d15059eec40a32a6570aae79200
Intel29.2⬇pkg (2024-01-21)Sonoma59.78b7bbe04fe87b586bc6848eb588bb005
Apple29.1⬇pkg (2023-08-05)Ventura59.5d90aef769e18390247aa715bef781677
Intel29.1⬇pkg (2023-08-05)Ventura59.6c47cf4e373d97e6ccbbe0775aa007a2c

Note - Not tested in previous versions, but it probably be installed.

Emacs 28 (with inline patch)

Note: Before installing the pre-built package, please remove previous Emacs.app from the installed directory if you have installed Emacs 28x. If the previously installed Emacs.app is not removed, the installation may fail.

ChipVersionDownloadmacOS[MB]md5
Apple28.2⬇pkg (2022-09-13)Big Sur[*1]55.1ea4f7556fbbd971af50b1671e1daf586
Intel28.2⬇pkg (2022-09-13)Monterey55.58e7ed5945fcdb2c8cad2e663e96c569b
Apple28.1⬇pkg (2022-05-09)Big Sur[*1]55.029589057e1911dfec50b7a6c8fae890f
Intel28.1⬇pkg (2022-05-09)Big Sur, Monterey55.4a2823a3e929bcf90e67b144dd1db220d

[*1] Not tested in Monterey but it probably be installed.

Emacs 27 (with inline patch)

ChipVersionDownloadmacOS[MB]md5
Apple27.2⬇pkg (2022-05-09)Big Sur[*1]51.452fda7e597430ae86997555317ff11b2
Intel27.2⬇pkg (2022-05-09)Big Sur, Monterey51.858f315e392a9fa893d3260eaf7424fe1
Intel27.1⬇pkgCatalina51.30c7048d147dea6fcdda638a25b161af8

[*1] Not tested in Monterey but it probably be installed.

(previous built)

ChipVersionDownloadmacOS[MB]md5
Apple27.2⬇pkg (old)Big Sur51.22cc963b00c0d41c038941ebb35e18446
Intel27.2⬇pkg (old)[*2]51.874e06cb24c8898a261d5778892355d3a

[*2] Mojave / Catalina / Big Sur

Emacs 26 (with inline patch)

ChipVersionDownloadmacOS[MB]md5
Intel26.3⬇pkgCatalina52.91868c787177f515f18f500ce6b898b05

without inline (pure)

Additionally, the following package is “WITHOUT” inline-patch NS build. In this case, Emacs.app will be installed under /Applications/Emacs-takaxp/pure.

ChipVersionDownloadmacOS[MB]md5
Apple29.4⬇pure.pkg (2024-08-13)Sonoma[*1]59.2a85a6bd9a2d7e39b546d264dce08368a
Intel29.4⬇pure.pkg (2024-08-13)Ventura[*1]59.5cb8a0c621c293c11aa1a273eb85dbe88
Apple29.3⬇pure.pkg (2024-03-26)Sonoma[*1]59.2f526b3d89d192e3ecfb927deb3fd057a
Intel29.3⬇pure.pkg (2024-03-26)Ventura[*1]59.7af8d8ef6881ff7f548afd7caa1e266bf
Apple29.2⬇pure.pkg (2024-01-21)Sonoma[*1]59.57eaeabb13aaf141203929fd9641c4189
Intel29.2⬇pure.pkg (2024-01-21)Sonoma[*1]59.7709c2b95efe9a8fd5e45f916eaf54b00
Apple29.1⬇pure.pkg (2023-08-05)Ventura[*1]59.565ce179a76b34f529db93885b053c823
Intel29.1⬇pure.pkg (2023-08-05)Ventura[*1]59.67a6ee9639c673be6292d65dcdc681b27
Apple28.2⬇pure.pkg (2022-09-13)Big Sur[*1]55.1de3d302f63bbc0d03a5b9c5b64d9f916
Intel28.2⬇pure.pkg (2022-09-13)Big Sur, Monterey55.5b4475438d04c7b7601e61d18104bb0aa
Apple28.1⬇pure.pkg (2022-05-09)Big Sur[*1]55.0e7fa6185f55d0578a236e35ee1dd0f12
Intel28.1⬇pure.pkg (2022-05-09)Big Sur, Monterey55.41f20caee450e46fb1afca50ffc6dfb22
Apple27.2⬇pure.pkgBig Sur51.264583b05ebf4d9aa89e8812af980b06f
Intel27.2⬇pure.pkg[*2]51.7165fed95067d5b4b6d885bfacd1ff9fa
Intel27.1⬇pure.pkgCatalina51.3fdd14baf87ed4f903b5b02c4e1dd022c

[*1] Not tested in previous versions, but it probably be installed. [*2] Mojave / Catalina / Big Sur

Integrated dynamic libraries:

  • libffi.7.dylib (or libffi.8.dylib), libffi is NOT contained in HEAD pkg.
  • libgmp.10.dylib
  • libgnutls.30.dylib
  • libhogweed.6.dylib
  • libidn2.0.dylib
  • libintl.8.dylib
  • libjansson.4.dylib
  • libnettle.8.dylib
  • libp11-kit.0.dylib
  • libtasn1.6.dylib
  • libunistring.5.dylib

The system-configuration-features is:

NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS JSON PDUMPER

Enjoy!