← Back to news

Even more batteries included with Emacs

karthinks.com|54 points|11 comments|by signa11|Jun 15, 2026

Even More Batteries Included with Emacs

Emacs suffers from a significant discoverability problem. To combat this, we are attempting to uncover its hidden gems, one demonstration at a time.

Since my previous update, I have stumbled upon several more surprising and productive utilities. It is time, therefore, for another "batteries included" report.

Note: This is the third installment in a series dedicated to highlighting the useful, yet obscure, features built directly into Emacs. (See Parts 1 & 2 for more).

Defining "Lesser-Known"

The term "lesser-known" is inherently subjective. For the purpose of this article, I define it using a rough mathematical threshold:

Mentions in discourse<5 times over 20 years\text{Mentions in discourse} < 5 \text{ times over } 20 \text{ years}

While some features from previous posts have since entered the mainstream, my goal remains to find the outliers.


A Word of Advice for Beginners

If you are new to the ecosystem, you will find more value in mastering the core concepts and using widely supported packages first. Once you hit that "aha!" moment—similar to wondering why suitcases didn't have wheels until 1990—you'll be ready for this list.

Rule of Thumb: If you haven't yet discovered undo-in-region, there is still plenty of "low-hanging fruit" for you to find. Please return to this guide once you've exhausted those basics!

Even for veterans, Emacs is so vast that everyone tends to use a different niche subset of features. There is likely something here that will surprise even the most seasoned user.

The Ground Rules

To keep this list focused, I've applied the following constraints:

  • Stock Emacs only: No external packages.
  • Low barrier to entry: No steep learning curves.
  • No "Easter Eggs": No M-x doctor, tetris, snake, dunnet, zone, butterfly, or dissociated-press.
  • No common utilities: No Flymake, doc-view, outline-minor-mode, gnus, or eww.
  • Non-obvious: Nothing that a generic Google search or an automatic Emacs prompt reveals immediately.

Translation Guide: Emacs Jargon

For those still learning the language, here is a quick reference table:

Emacs TermModern EquivalentDescription
M-xAlt + xExecute a command
C-xCtrl + xPrefix key
FrameWindowThe actual OS window
WindowSplit/PaneA division within a frame
BufferText ChunkThe data being edited
PointCursorThe current position in a buffer
Active RegionSelectionHighlighted text
RegionSelectionText range (not necessarily highlighted)
FaceStylingFont, color, and display attributes

1. Instant Dictionary Lookups

By enabling M-x dictionary-tooltip-mode, you can view the definition of a word simply by hovering your cursor over it.

  • Requirement: tooltip-mode must be active (which is the default).
  • Priority: Emacs checks local dictionaries first.
  • Scope: It can handle modern slang and jargon, typically by querying Wiktionary.

Dictionary Tooltip Demo


2. Wildcards in find-file and dired

Two of the most common commands—find-file (C-x C-f) and dired—possess a hidden superpower: wildcard support.

  • find-file: Use a pattern like *foo*.txt to open multiple matching files simultaneously.
  • dired: Use a wildcard in the directory path to filter the resulting file list.

Workflow Example: Cleaning TeX Artifacts

Step-by-Step Execution:

  • Run Dired with */*_region_* to find temporary AucTeX files in sub-directories.
  • Mark all matches using dired-toggle-marks (bound to t) and delete them.
  • Use find-file with a wildcard to open all .tex files across sub-directories.
  • Verify the open buffers (using consult-buffer and corfu for completion).

While modern setups might use consult-find exported via embark-export, the built-in wildcard method works immediately without any configuration.


3. Listing URIs with ffap-menu

You likely know M-x ffap (find-file-at-point), which opens a file if the cursor is on a path. However, ffap-menu is a more powerful sibling. It scans the entire buffer for any string resembling a URL or file path and presents them in a list.

Because it uses a completing-read interface, you can:

  1. Filter the list.
  2. Export the results to a buffer.
  3. Use Embark to perform bulk actions on the discovered links.

Addendum: Handling Propertized Links

Standard ffap-menu fails to see "propertized" links (links embedded as metadata, common in EWW). To solve this, I developed a custom function to capture both plain-text and propertized URLs.

The Process:

  • Open a Wikipedia page in EWW.
  • Execute my/search-occur-browse-url.
  • Synchronously scroll through the link list and the page content.

The Implementation:

(defun my/search-occur-browse-url (optional use-generic-p)
  "Point browser at a URL in the buffer using completion.
The web browser used depends on `browse-url-browser-function`.
Also see `my/search-occur-url`."
  (interactive "P")
  (let ((match nil)
        (match-data nil)
        (context (lambda (beg optional shrp)
                   (let* ((before (string-replace "\n" "" 
                                                 (buffer-substring-no-properties 
                                                  beg (max (1- beg) (point-min)))))))