emacs-freeze

Diagnose frozen Emacs processes by sampling stacks and analyzing root causes.

9|1|Updated Jul 19, 2022
One-click install
npx skills add https://github.com/benthamite/dotfiles --skill emacs-freeze
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: emacs-freeze
Source: https://github.com/benthamite/dotfiles/tree/main/claude/skills/emacs-freeze
Command: npx skills add https://github.com/benthamite/dotfiles --skill emacs-freeze

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps diagnose and resolve situations where Emacs becomes unresponsive or frozen, preventing data loss and restoring productivity.

Core Features & Use Cases

  • Process Identification: Pinpoints the frozen Emacs process and gathers essential system information.
  • Diagnostic Data Collection: Collects stack samples, process statistics, open files, and thread counts for in-depth analysis.
  • Root Cause Analysis: Analyzes collected data to identify the underlying cause of the freeze, such as infinite recursion, I/O waits, or garbage collection pressure.
  • Recovery & Prevention: Provides actionable steps for immediate recovery and suggests measures to prevent future occurrences.
  • Use Case: When Emacs hangs and C-g does not respond, use this Skill to understand why and how to safely exit or fix the issue.

Quick Start

Diagnose why Emacs is frozen by running the emacs-freeze skill.

Frequently Asked Questions about emacs-freeze

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

FAQPage Schema
How do I diagnose an unresponsive Emacs instance when C-g does not work?

To diagnose an unresponsive Emacs instance, you can sample the process to analyze stack traces, process statistics, and open files to identify the root cause of the freeze. This approach pinpoints issues like infinite recursion, I/O blocking, or garbage collection pressure.

What causes Emacs to freeze and become unresponsive?

Emacs freezes are typically caused by infinite recursion, I/O blocking, or excessive garbage collection pressure. Analyzing stack samples and process statistics helps identify these underlying issues when the editor becomes unresponsive and standard cancellation fails.

How to troubleshoot a frozen Emacs process using system utilities?

Troubleshoot a frozen Emacs process by using system utilities like pgrep, ps, sample, lsof, and wc to collect diagnostic data. These tools gather stack samples, process statistics, open files, and thread counts for root cause analysis.

Do I need specific system utilities to analyze Emacs stack traces?

Yes, analyzing Emacs stack traces requires system utilities like pgrep, ps, sample, lsof, and wc for diagnostics. These tools are necessary to pinpoint the frozen process and collect essential system information for root cause analysis.

What is the best way to recover from an Emacs hang and prevent future freezes?

The best way to recover from an Emacs hang is to analyze collected diagnostic data to identify the root cause, then apply actionable steps for immediate recovery. This process also suggests measures to prevent future occurrences of unresponsiveness.

Can I identify the root cause of an Emacs freeze without terminating the process?

Yes, you can identify the root cause of an Emacs freeze without terminating by sampling the process and analyzing stack traces. This diagnostic data collection identifies issues like infinite recursion or I/O waits while preserving the session.