惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
F
Fortinet All Blogs
D
Docker
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
罗磊的独立博客
Y
Y Combinator Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
J
Java Code Geeks
T
The Blog of Author Tim Ferriss
U
Unit 42
N
Netflix TechBlog - Medium
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
云风的 BLOG
云风的 BLOG
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
Stack Overflow Blog
Stack Overflow Blog
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
P
Proofpoint News Feed
G
Google Developers Blog
H
Help Net Security

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Switching from the Mac port Build of Emacs to the Standar...
Takashi Masuda · 2026-06-21 · via DEV Community

For a long time I'd been using railwaycat/homebrew-emacsmacport, a build of Emacs with the Mac port patches applied.

Why I Switched to the NS Build

Over the past few years, though, I'd been feeling the following pain points.

  • The Mac port hasn't kept up with the latest Emacs
    • The current latest Emacs is 30.2, but the Mac port only supports 29.4
  • With the latest railwaycat/homebrew-emacsmacport release, emacs-29.4-mac-10.1, I ran into the problem in issue #389 on my setup, so I'd been sticking with the previous emacs-29.1-mac-10.0
  • Ideally, I'd like to use the latest Emacs

The only reason I used the Mac port build in the first place was to automatically turn off Japanese input when I hit M-x and the like, then restore it to its original state afterward. Here's the configuration.

As long as I could reproduce this behavior, I'd be able to switch to the standard NS build. This time, that finally happened.

By the way, NS stands for NeXTSTEP, which on macOS refers to the GUI build that uses Cocoa (AppKit).

I Found That sis Could Solve It

After looking into it, I found that emacs-smart-input-source (hereafter "sis") could reproduce what I'd been doing with the Mac port build.

On macOS, sis uses a CLI called macism as the backend for switching input sources. It's by @laishulu, the same author as sis.

GitHub logo laishulu / macism

Reliable CLI MacOS Input Source Manager [MacOS上可靠切换输入法的命令行工具]

Installing the NS Build of Emacs

First, I installed the build from emacsformacosx.com via Homebrew.

$ brew install --cask emacs-app

Configuring sis Solved It

Installing macism

I installed macism via Homebrew.

$ brew install laishulu/homebrew/macism

macism can switch input sources from the command line on its own, like this.

# Set the input source to "ABC"
$ macism com.apple.keylayout.ABC

# Set the input source to Google Japanese Input's "あ"
$ macism com.google.inputmethod.Japanese.base

Configuring sis

This is all I configured.

;; When moving the cursor to the minibuffer, automatically switch to English mode,
;; and restore the Japanese input state after returning to the original buffer.
(sis-ism-lazyman-config
 "com.apple.keylayout.ABC"               ;; ABC
 "com.google.inputmethod.Japanese.base") ;; Google Japanese Input
(sis-global-respect-mode 1)

;; Switch the cursor color to match the input mode.
(sis-global-cursor-color-mode 1)

sis-global-respect-mode switches to English input when you move to the minibuffer with M-x and the like, and restores the Japanese input state when you return to the original buffer. This is exactly what I'd been doing with the Mac port build.

With that, sis solved it without any issues, and I successfully switched to the standard NS build.

Conclusion

I was able to switch from the Mac port build I'd used for years to the standard NS build. I'm glad I could solve the input source switching on M-x, which was my one and biggest pain point.

Compared to the Mac port build, there's nothing in particular that feels inconvenient.

I can now keep up with the latest Emacs. Emacs 30 feels faster when it comes to networking. You can really tell when using navi2ch(!).

I hope this helps someone.

Related

Appendix

Switching Input Sources by Context with sis-global-context-mode

sis also has sis-global-context-mode, which looks at the characters around the cursor (the context) and switches the input source automatically.

(sis-global-context-mode 1)

For example, when you "write Japanese → edit somewhere else → return to the original spot and keep writing," it switches to Japanese input if you land mid-Japanese, or to English if you land mid-English. It determines whether the characters before and after the cursor are Japanese or English, and only switches when it can make that determination, so there are few false triggers.

That said, the default for sis-context-hooks, which decides when it fires, is '(evil-insert-state-entry-hook), which assumes evil. If you don't use evil, this hook never gets called and it won't work, so you'll need to add hooks that match your own workflow.

If sis-global-respect-mode (switching to English on M-x and back) is enough for you, I don't think you need to force this one on.

Mixing English Words into Japanese with sis-global-inline-mode

sis also has sis-global-inline-mode, which is handy when you want to mix English words into the middle of Japanese text.

(sis-global-inline-mode 1)

For example, when you want to write 日本語 some english text 日本語, you just type 日本語<space>some english text<space><RET>日本語. The moment you put a space right after the Japanese, it automatically switches to English input just for that spot (highlighted with an overlay), and a trailing space, RET, or moving the cursor outside the region returns you to Japanese input. There's no need to switch the IME manually.

By default, only "English within Japanese" is handled (sis-inline-with-english). If you also want "Japanese within English," add (setq sis-inline-with-other t).

Whereas sis-global-respect-mode / sis-global-context-mode handle "switching" the input source, this one creates a temporary English region on the spot — that's the difference.

I tried it for a day, but of course this behavior only applies inside Emacs, so character input behaves differently between Emacs and everything else. That subtle inconsistency was disorienting, so I stopped using it. Another reason is that even within Emacs, it didn't turn out to be all that intuitive.