# emacs-cpupower

> Emacs interface to cpupower

**Wikidata**: [Q111939024](https://www.wikidata.org/wiki/Q111939024)  
**Source**: https://4ort.xyz/entity/emacs-cpupower

## Summary
emacs-cpupower is a GNU Emacs extension that provides a specialized interface to the Linux `cpupower` tools for CPU frequency and voltage scaling. Written in Emacs Lisp, it allows users to manage system-level power settings directly within the Emacs environment. It is officially distributed through the GNU ELPA package repository.

## Key Facts
- **Classification:** Emacs extension, software library, and free software.
- **Primary Function:** Serves as an interface for `cpupower` tools on Linux operating systems.
- **Programming Language:** Written in Emacs Lisp, a dialect of Lisp used in GNU Emacs since 1985.
- **Repository:** Part of the GNU ELPA (Emacs Lisp Package Archive) since May 6, 2022.
- **Stable Versions:** Version 1.0.4 (released May 6, 2022) and version 1.0.5 (released May 14, 2022).
- **Source Code:** Hosted on GitLab under the project name `cpupower-el`.
- **License:** Distributed as free software under a specific free license (Q27016754).
- **Package ID:** Identified in GNU ELPA as `cpupower`.

## FAQs
### Q: What does emacs-cpupower allow a user to do?
A: It provides a bridge between GNU Emacs and the Linux `cpupower` utility, enabling users to monitor and adjust CPU frequency and voltage scaling settings without leaving the editor.

### Q: Which operating systems are compatible with emacs-cpupower?
A: The extension is designed for Linux-based operating systems, as it specifically interfaces with the Linux-native `cpupower` toolset.

### Q: How is the emacs-cpupower package distributed?
A: It is distributed through GNU ELPA, the default package repository for GNU Emacs, ensuring it meets the standards for inclusion in the official Emacs ecosystem.

### Q: Where can the source code for this extension be found?
A: The source code is maintained in a GitLab repository at `https://gitlab.com/steve-emacs-stuff/cpupower-el.git`.

## Why It Matters
emacs-cpupower is significant because it integrates hardware-level system management into the GNU Emacs workflow. For power users and developers who spend the majority of their time within Emacs, the ability to toggle CPU profiles—such as switching between "performance" for heavy compilation and "powersave" for battery longevity—directly from the editor is a major productivity gain. 

This extension exemplifies the "extensibility" of Emacs, utilizing Emacs Lisp to bridge the gap between a text editor and system-level Linux utilities. By being part of the GNU ELPA repository, it adheres to the free software movement's principles, ensuring that the code remains open for users to study, change, and distribute. It also highlights the continued relevance of the Emacs Lisp ecosystem, which has supported such integrations since its inception in 1985. For the Linux community, emacs-cpupower provides a specialized tool that simplifies the interaction with complex CPU scaling drivers, making system optimization more accessible to those using the Emacs platform.

## Notable For
- **GNU ELPA Integration:** Its status as an official GNU ELPA package ensures high visibility and ease of installation for the global Emacs user base.
- **Hardware Interface:** One of the specific extensions that allows Emacs to interact directly with Linux kernel-level power management tools.
- **Rapid Versioning:** The project saw quick iterative updates in May 2022, moving from version 1.0.4 to 1.0.5 within eight days to reach its preferred stable state.
- **Free Software Alignment:** Strictly associated with the free software movement and distributed under terms that allow for total user freedom.

## Body

### Technical Architecture
emacs-cpupower is built using Emacs Lisp and functions as a wrapper for the `cpupower` command-line tools. It translates system-level CPU frequency and voltage scaling data into a format that can be manipulated or viewed within Emacs buffers. The extension is designed to run on the GNU Emacs platform specifically on Linux operating systems.

### Distribution and Release History
The package was officially introduced to the GNU Emacs Lisp Package Archive (ELPA) on May 6, 2022. 
- **Version 1.0.4:** Released on May 6, 2022, marking its initial stable entry into the GNU ELPA repository.
- **Version 1.0.5:** Released on May 14, 2022, this version is currently recognized as the preferred stable release.
The package is identified in repositories under the aliases `cpupower` and `cpupower-el`.

### Development and Documentation
The development of emacs-cpupower is hosted on GitLab under the user `steve-emacs-stuff`. Official announcements and version descriptions have been documented through the GNU mailing lists, specifically `info-gnu-emacs` and `gnu-emacs-sources`. These archives provide the primary record for the software's release cycle and technical specifications. The project maintains two primary web presences: a GitLab page for programmers and source code access, and a GNU ELPA page for end-user documentation and package installation.

## References

1. [Cpupower version 1.0.4. 2022](https://lists.gnu.org/archive/html/gnu-emacs-sources/2022-05/msg00017.html)
2. [Cpupower version 1.0.5. 2022](https://lists.gnu.org/archive/html/gnu-emacs-sources/2022-05/msg00041.html)