emacsclient

Route Emacs operations through emacsclient with --eval and --no-wait flags.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/benonions/dotfiles --skill emacsclient
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: emacsclient
Source: https://github.com/benonions/dotfiles/tree/main/codex/.codex/skills/community/emacs-skills/emacsclient
Command: npx skills add https://github.com/benonions/dotfiles --skill emacsclient

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures all Emacs operations, whether initiated by the user or the agent, are routed through emacsclient, preventing the creation of multiple Emacs instances and ensuring consistent behavior.

Core Features & Use Cases

  • Unified Emacs Interaction: Guarantees all Emacs commands (editing, compilation, testing) use the existing Emacs server.
  • Efficient Elisp Evaluation: Allows for quick execution of Emacs Lisp code for various tasks.
  • Use Case: When asked to byte-compile a file, the agent will use emacsclient --eval to perform the compilation on the running Emacs instance.

Quick Start

Use emacsclient to open the file '/path/to/your/file.el' without waiting for the command to return.

Frequently Asked Questions about emacsclient

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Emacs commands without opening a new editor instance?

You can run Emacs commands without opening a new instance by routing operations through emacsclient, which connects to a running Emacs server. This ensures all editing, compilation, and testing tasks reuse the existing session for consistent behavior.

What is the best way to execute Emacs Lisp code on a running Emacs server?

The best way to execute Emacs Lisp code on a running server is using the emacsclient --eval flag. This allows quick elisp evaluation directly on the active Emacs instance without launching a separate process or waiting for a return.

How do I open a file in Emacs from the command line without blocking the terminal?

To open a file in Emacs without blocking the terminal, use emacsclient with the --no-wait flag. This sends the file operation to the running Emacs server and immediately returns control to your terminal session.

Can I use emacsclient for automated batch elisp evaluation and code compilation?

Yes, you can use emacsclient for batch elisp evaluation and code compilation. The Skill routes automated testing routines and byte-compilation tasks through emacsclient --eval to execute them directly on the running Emacs server.

Do I need a running Emacs server to use emacsclient for remote editing?

Yes, emacsclient requires a running Emacs server to function. It acts as a client that forwards file operations, elisp evaluations, and compilation tasks to the active server instance instead of creating new editor processes.