notes from /dev/null

by Charles Choi 최민수


08 May 2025

Opening the Emacs Initialization File, or First Impressions Matter

In working on the on-boarding for Scrim, I’ve recently had to consider the scenario of setting up a fresh install of GNU Emacs on macOS (as of this writing v30.1). A number of things struck me, particularly on the user experience (or lack thereof) for new users of Emacs, nearly all of whom will be unfamiliar to Emacs commands and keybindings.

  1. There is no dedicated command to load the Emacs initialization file (in this case ~/.emacs, which has yet to be created).
  2. Using the menu bar (File › Open File…) will open a macOS File Browser dialog window, but does not show hidden files (like .emacs) by default.
  3. The customize-variable command only works on variables that have been loaded.

On point 1, it’s striking to me that this hasn’t been done already like… decades ago. New users won’t know a priori what the Emacs initialization file is (sidestepping the inside baseball of .emacs vs init.el) much less that such a file is not immediately created at the first launch of Emacs but the ~/.emacs.d/ directory is.

Further exacerbating this is point 2, where the menu bar action File › Open File… will open a native macOS file dialog instead of running find-file. However this dialog is not configured to show hidden files. When the dialog is raised, the user can use the macOS key-binding Command + Shift + . to show hidden files, but this is hardly a discoverable feature.

On point 3, while I’ve long been an advocate for using customize-variable, it fails for variables that are not autoloaded (in this case server-use-tcp). A partial work-around is to run the command describe-variable which should implicitly load the package containing a non-autoloaded variable in order to describe it (although I would not be surprised if there are cases where you really have to load the package via require). Once the variable is described, a link is provided to customize it. Arguably, such details should never be surfaced to a new user.

Going back the lack of a dedicated command to load the Emacs initialization file, here’s some Elisp that implements it. Note that the variable user-init-file is already set to ~/.emacs for a fresh install.

1
2
3
4
(defun find-user-init-file ()
  "Edit `user-init-file'."
  (interactive)
  (find-file user-init-file))

For most experienced Emacs users, this command has little value but it's not meant for them. It's meant for new users and should be built-in. First impressions matter!

emacs

Past Articles

28
APR
2025

Announcing Scrim - An Org Protocol Proxy for Emacs on macOS

Announcing Scrim, an Org Protocol proxy for Emacs on macOS.

read more
25
APR
2025

Sorting Strings in a Line in Emacs

Need to sort strings in a line? Emacs sort-regexp-fields to the rescue.

read more
14
APR
2025

Making an App, Looking for Beta Testers

Scrim is a macOS utility I've written to act as a proxy for Org Protocol requests. It is in BETA test and I’m looking for testers.

read more
23
MAR
2025

NFDN Finally Supporting OS Appearance Changes

Better late than never. This blog now supports OS appearance changes.

read more
13
MAR
2025

Announcing Casual Make

Announcing Casual Make, an interface for editing Makefiles.

read more
10
MAR
2025

Announcing Calle 24

Announcing Calle 24, an Emacs package to substitute tool bar icons with SF Symbols. Now available on MELPA.

read more
25
FEB
2025

Moment - Tuesday February 25, 2025 17:25 PST

Photo taken Tuesday February 25, 2025 17:25 PST at Fort Point.

read more
18
FEB
2025

macOS Native Emoji Picking in Emacs from the Edit Menu

Do you miss “Emoji & Symbols” at the bottom of the Edit menu for NS Emacs? This post shows how to fix that.

read more
10
FEB
2025

Moment - Thursday February 06, 2025 21:19 PST

Photo taken Thursday February 06, 2025 21:19 PST at 111 Minna.

read more

Page 1 / 15   >

 

AboutMastodonBlueskyGitHub

Feeds & Tags
Get Scrim for macOSGet Captee for macOS

Powered by Pelican