1
3

More than 1 year has passed since last update.

Macに日本語インラインパッチをあててEmacs30をインストールする

Posted at

久しぶりにMac環境にEmacsをインストールする機会があったので、備忘録になります。

brew tap

Homebrewのemacs-plusを使ってEmacsをインストールしていきます。まずはリポジトリをタップします。

$ brew tap d12frosted/emacs-plus

インラインパッチのsha256ハッシュ値取得

こちらのインラインパッチを使わせて頂きます :bow:
パッチファイルをダウンロードしたら、ファイルのsha256ハッシュを取っておきます。

$ curl https://raw.githubusercontent.com/takaxp/ns-inline-patch/master/emacs-head-inline.patch -OL
$ shasum -a 256 emacs-head-inline.patch

brew edit

brew edit コマンドでパッチをあてます。

$ brew edit emacs-plus@30

# 既にダウンロード済みのEmacsを使って編集したい場合は:
$ HOMEBREW_EDITOR=emacs brew edit emacs-plus@30

エディタが開くので、local_patch の下に下記の項目を追記します。

#
# Patches
#
local_patch "..."
local_patch "..."

# 以下を追加
patch do
url "https://raw.githubusercontent.com/takaxp/ns-inline-patch/master/emacs-head-inline.patch" # Patch URL
sha256 "..." # 先程取得したSHA256の値
end

brew install

最後に brew install でインストールします。(オプションはお好みで)

$ brew install emacs-plus@30 --with-imagemagick --with-native-comp --with-poll

ビルドが終わり、正常にEmacsが起動したら、M-x mac-ime-toggleM-x mac-ime-activateM-x mac-ime-deactivate 等のコマンドが使えるか確認します。使えていたら成功です。

おまけ

Alfred がemacs-plusでインストールしたEmacsを見つけられない場合があるようです。私の場合、こちらのコメントの手順を試したところ、無事見つかるようになりました。

1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3