Home Projects Blog Movies Photos Miscellaneous About

EMACS
Rhyloo's Configuration

Emacs-30.2.5-purple.svg license-%20%20GNU%20GPLv3%20-blue.svg

About

This is my personal Emacs configuration, maintained since 2021 (though my journey with Emacs started back in 2013). I treat Emacs as a "Swiss Army knife"—I use it for blogging, programming, and productivity.

Specifications

This configuration is tailored for and tested on:

  • Build: Emacs 30.2.5 (compiled with tree-sitter).
  • OS: Ubuntu 20.04.6 LTS & 24.04 LTS.
  • LSP: Integrated with clangd (C/C++) and pyls (Python).
  • Package Management: Uses elpaca.el and use-package for a modern, non-blocking startup.
  • Structure: Employs no-littering to separate configuration from persistent data.

Installation

To install, clone the repository into your user-emacs-directory.

# 1. Backup your existing configuration
mv ~/.emacs.d ~/.emacs.d.bak

# 2. Clone this repository
git clone https://github.com/rhyloo/Emacs-Config.git ~/.emacs.d

# 3. Launch Emacs
emacs

Keybindings

Key Function Description
C-c <arrows> windmove Navigate between split windows
<f1> my/find-emacs-configuration Open the main configuration file
<f5> my/reload-emacs-configuration Reload the Emacs configuration
<f6> recompile Re-run the last compilation command
<f9> my/get-pwd Copy current file/dir path to clipboard
C-c M-+ my/create-temp Create temp file/dir in /tmp with completion
C-c l counsel-locate Find files using the locate database
C-x q project-compile Compile the current project
C-x k kill-current-buffer Close the current buffer
C-c k kill-buffer-and-window Close both buffer and its window
C-c a org-agenda Open the Org-mode agenda
M-+ dired-create-empty-file Create a new empty file in Dired
C-x C-f find-file Open or create a file
C-c p f projectile-find-file Find file in project

Custom Functions

A brief overview of the custom logic included in this configuration:

  • my/find-emacs-configuration: Quickly opens the main configuration file.
  • my/reload-emacs-configuration: Reloads init.el to apply changes without restarting.
  • my/get-pwd: Copies the path of the current buffer or Dired directory to the system clipboard.
  • my/create-temp: Interactive helper to create temporary files or directories in /tmp with path completion.
  • my/find-file: Opens a file in the background without switching focus.
  • my/enable-line-numbers: Activates line numbers specifically for GUI sessions and programming modes.
  • my/update-last-modified: Automatically updates the #+last_modified: keyword in Org headers upon saving.
  • my/enable-undo-tree-once: Delayed activation of undo-tree-mode to optimize startup speed.
  • y-or-n-p-with-return: Allows using the RET key as a "Yes" response in confirmation prompts.
  • ar/compile-autoclose: Intelligent compilation handler: auto-closes the window on success, but scrolls to errors on failure.
  • ar/colorize-compilation-buffer: Applies ANSI color codes to the compilation output for better readability.
  • ct/create-proper-compilation-window: Sets up a dedicated, fixed-height window for compilation at the bottom.
  • dired-get-size: Calculates disk usage of marked files in Dired, supporting both local and remote (SSH) hosts.
  • my-shell-mode-setup-function: Disables heavy completion on remote TRAMP connections to prevent lag.
  • efs/org-babel-tangle-config: Automatically "tangles" code blocks from blog.org to blog.el whenever the file is saved.

Repository structure

  • init.el: Main entry point.
  • early-init.el: Performance tweaks and Elpaca bootstrap.
  • blog.org: The configuration itself (literate style).
  • lisp/: Custom functions and additional scripts.
  • LICENSE: The GNU General Public License v3 (GPLv3).
  • .gnus: Configuration for Gnus, the Emacs newsreader and email client.
  • .signature: My personal signature appended to emails and news posts.

License

This project is licensed under The GNU General Public License v3 (GPLv3).

Credits & Resources

  • System Crafters - High-quality Emacs tutorials.
  • Comacero - Elpaca setup notes.
  • Various community solutions from StackOverflow, Reddit r/emacs, and specialized technical blogs.

About this Document

This file was automatically synchronized from the source at: https://www.github.com/rhyloo/Emacs-Config

Feel free to explore the code, open an issue, or submit a pull request if you find ways to improve the project. Happy hacking!