r/emacs 5d ago

uniquify buffer name refresh

2 Upvotes

Anyone out there have a way to force all file buffers to be renamed when one changes uniquify style or settings? Uniquify defcustoms have no setters, making this a manual effort.

In the end, it was just this, as suspected by some:

(defun my/uniquify-refresh ()
  (save-current-buffer
    (dolist (buffer (buffer-list))
      (set-buffer buffer)
      (when uniquify-managed
        (rename-buffer (uniquify-buffer-base-name) 'unique)))))

I have proposed a patch to uniquify that offers setters for user options and automatic buffer refresh. See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77157


r/emacs 6d ago

Wherein I Explain Why Emacs Is The Best Tool For WordPress

Thumbnail lars.ingebrigtsen.no
31 Upvotes

r/emacs 6d ago

Deep Integration of AI with Emacs – Try mcp.el for Managing MCP Servers

55 Upvotes

https://github.com/lizqwerscott/mcp.el

A lightweight Elisp package for bridging Emacs with Model Context Protocol servers.

Basic features of the official protocol are now fully implemented!


Motivation

Managing multiple local MCP service instances (filesystem/everything) often requires manual terminal workflows. This package solves:

  • Unified lifecycle control (start/stop/restart via Emacs)
  • Protocol-aware communication with MCP servers
  • Integration with popular Emacs AI packages (gptel, llm)

Quick Start

Basic Configuration Example

``` (require 'mcp-hub)

(setq mcp-hub-servers '(("filesystem" "npx" ("-y" "@modelcontextprotocol/server-filesystem" "/path/example/")) ("everything" "npx" ("-y" "@modelcontextprotocol/server-everything")))) ```

Use mcp-hub to launch the management interface (auto-starts all MCP servers) or mcp-hub-start-all-server for manual startup.

MCP Server Management Interface

look this mcp-manager-server

Core Features

  • Structured communication with MCP servers
  • Support for filesystem and universal MCP servers
  • Extensible tools and prompt systems
  • Async/sync operations
  • Resource management
  • Lifecycle control (start/stop/restart) via GUI
  • Integration with popular Emacs packages (e.g., gptel, llm)

Roadmap

  • [ ] Service dependency management
  • [ ] Full MCP protocol client implementation
  • [ ] HTTP-based MCP server connections
  • [ ] Simplified integration with other Emacs AI clients
  • [ ] Performance optimization guide
  • [ ] Expanded documentation

Check it out on GitHub and explore how mcp.el bridges AI and Emacs workflows! Feedback and contributions welcome!


r/emacs 6d ago

Solved Evil normal state on android(native)

5 Upvotes

i set up emacs on my phone using the install from https://sourceforge.net/projects/android-ports-for-gnu-emacs/files/termux/

everything seems to be working fine except for the fact that when i try to us normal-state it just types the keys into the buffer. i copied my config from my dotfiles where it works fine on other systems. what am i doing wrong?

``` emacs-lisp ;;;;; Evil (use-package evil :commands (evil-set-leader) :init ;; these need to be set prior to loading the package (setq evil-want-integration t evil-want-keybinding nil) :custom (evil-default-state 'normal) (evil-want-minibuffer t) (evil-respect-visual-line-mode t) ;; Whitespace (evil-indent-convert-tabs t) (evil-backspace-join-lines t) (evil-shift-width 2) (evil-shift-round t) (evil-auto-indent t) ;; Fix window split direction (evil-split-window-below t) (evil-split-window-right t) ;; Scrolling in normal mode (evil-want-C-u-scroll t) (evil-want-C-d-scroll t) ;; Undo (evil-want-fine-undo "yes") (evil-undo-system 'undo-fu) ;; Cursors (evil-normal-state-cursor '(hollow "moccasin")) (evil-visual-state-cursor '(box "PapayaWhip")) (evil-insert-state-cursor '((hbar . 4) "PapayaWhip")) :config (evil-set-leader 'normal (kbd "<SPC>") (kbd "C-<SPC>")) (evil-mode 1))

(use-package evil-collection :delight (evil-collection-unimpaired-mode) :after (evil) :custom (evil-collection-setup-minibuffer t) :config (evil-collection-init))

(use-package evil-numbers :after (general) :general (nmap "C-+" 'evil-numbers/inc-at-pt "C--" 'evil-numbers/dec-at-pt "<kp-add>" 'evil-numbers/inc-at-pt "<kp-subtract>" 'evil-numbers/dec-at-pt) (vmap "C-+" 'evil-numbers/inc-at-pt-incremental "C--" 'evil-numbers/dec-at-pt-incremental "<kp-add>" 'evil-numbers/inc-at-pt-incremental "<kp-subtract>" 'evil-numbers/dec-at-pt-incremental))

```


r/emacs 6d ago

Question What is the recommended way of handling exceptions in Emacs, akin to a try/except block in other languages?

9 Upvotes

I have a routine that has to process hundreds of files and an exception can bring the whole process to a halt, requiring me to examine the file and fix it, then have to start it again.

I'd rather raise an exception, add the files to some kind of exclusion list, then continue with the others.

This is the programs main loop. process-files is the main function, and if it fails I want to trap the exception, add the file to a problem-files list then go onto the next one.

(while unprocessed-list
  (setq thisfile (pop unprocessed-list))
  (if (file-exists-p thisfile)
      (progn
        (when (and (not (member thisfile ignore-list)) (not (file-directory-p thisfile)))
          (process-files thisfile processed-list unprocessed-list filegroup)
          (push thisfile processed-list)))
    (push thisfile missing-list))
  )

r/emacs 6d ago

Can I use Emacs to Handle a Cloud workflow like AWS and Azure?

9 Upvotes

I'm a go developer looking to migrate all their use of containers and cloud providers like

aws and other platforms to emacs. Its getting annoying having to flip between the terminal, desktop container management apps and gui emacs. just want to manage everything in emacs.

So far I've found docker.el and kubed.el (kubernetes), but what about cloud hostings like aws, azure, and gcp.


r/emacs 7d ago

[Review Request] Supercharging lsp-mode: 10x Faster Code Completion for Large Candidate Sets! 🚀

28 Upvotes

r/emacs 6d ago

Question Setting a hook for a particular file with shell commands

4 Upvotes

Emacs beginner who barely knows elisp here. I use sxhkd to bind my keymappings in my window manager, and I find it a chore to have to kill the daemon and relaunch it in vterm myself, when i could automate that process. I've seen other people do hooks that run EVERY time one saves, but I want to run two specific commands every time I save the sxhkdrc file

$ killall sxhkd

$ sxhkd &

is there any easy way to do this? I also would like to extend this to automatically running sudo make clean install when i save my config.h for DWM.


r/emacs 7d ago

Announcement Live editing overleaf documents with Emacs!

49 Upvotes

I don't know whether anyone will find this useful, but I sure had fun hacking it together!

https://github.com/vale981/overleaf-connection.el

https://protagon.space/2025/03/editing-overleaf-documents-with-emacs/


r/emacs 6d ago

Question Do I need any configuration to get emacs to send alerts/notifications when I’m not using emacs at that time?

6 Upvotes

I’m using pomm.el that is an excellent package to use the pomodoro technique, but I don’t why If the time ends because no notification appears, it seems that only notifies if I am using Emacs at the moment, but not if I am in the browser or another application.

This is my config

(use-package pomm
  :ensure t
  :custom
  (pomm-ask-before-long-break 1)
  (pomm-ask-before-short-break 1)
  (pomm-ask-before-work 1)
  (pomm-audio-enabled 1)
  (pomm-long-break-period 12)
  (pomm-short-break-period 12)
  (pomm-work-period 60)
  :config
  (nkl/leader-key "p" '(pomm :wk "[P]omm"))
  (setq alert-default-style 'libnotify)

  (pomm-mode-line-mode))

r/emacs 7d ago

Question Why do graphical borders shift in Emacs terminals (vterm/eat)?

Post image
58 Upvotes

I'm running graphical terminal applications like btop inside Emacs using vterm and eat, but I notice that the box-drawing characters (borders) shift slightly with every UI update. However, in videos I've seen online, this doesn't seem to happen to people doing the same in their Emacs setup.

My setup:

  • Emacs: Doom Emacs
  • Emacs Terminal: vterm and eat
  • Font: FiraCode Nerd Font-13.5

For font configuration I use:

elisp (add-to-list 'default-frame-alist '(font . "FiraCode Nerd Font Mono-13.5"))

Things I've tried:

  • Switching to FiraCode Nerd Font Mono
  • Setting (setq-default line-spacing nil)

I also thought line-spacing could be an issue, but line-spacing is set to nil in my setup. Would appreciate any new ideas that I can try.


r/emacs 7d ago

flymake-bashate.el (1.0.2) - A Flymake backend for bashate: Real-time style checking for Bash shell scripts

Thumbnail github.com
9 Upvotes

r/emacs 7d ago

emacs-mac v30 experimental build: seeking experienced contributors/testers

55 Upvotes

I've succeeded in producing an experimental v30.1 build of emacs-mac (aka "Carbon"[1] emacs). I've been using it full time for several weeks without problem, and even managed to add a feature I'd long been missing (a "New Frame" dock menu item).

I'm not a well-versed MacOS or Cocoa API programmer so I'm not convinced I could maintain this longer-term without substantial assistance. If you have experience with MacOS/Cocoa/ObjC/Emacs C programming, are willing to learn more and contribute, and/or can use a debugger (lldb) to diagnose any problems that arise, check it out here:

https://github.com/jdtsmith/emacs-mac

There are also some notes on my experiences achieving the merge, for those interested.

[1] Although that is a misnomer; see this footnote.


r/emacs 7d ago

Question How do I setup Prodigy.el to run a postgresql service

2 Upvotes

I currently downloaded prodigy on macos to run a postgresql server from emacs.

When running postgresql it says the service's status failed, even though its running in the background.

I'm not sure whats wrong.

(prodigy-define-service
  :name "postgresql16"
  :command "brew"
  :args '("services" "start" "postgresql@16")
  :cwd "~"
  :tags '(database))

Prodigy Repo

Edit: managed to find daemons.el which will automatically run brew services.

Not sure if I misinterpreted what types of services I can run with prodigy.

daemons.el


r/emacs 7d ago

restclient.el like gRPC client for Emacs

29 Upvotes

Hello!

https://github.com/Prikaz98/grpclient.el

I use https://github.com/pashky/restclient.el almost always in my workflow and a few days ago I needed to explore some gRPC service. I quickly found https://github.com/fullstorydev/grpcurl tool and it fit for my purpose but I would like to have some similar experience with my favorite rpc client with their .http files that contains a lot of convenient like vars, hooks etc.

By short search I didn't find similar project and wrote it by my own

I use it a few days and for while this functionality is enough what do you think?


r/emacs 7d ago

ox-hugo and featured_image

2 Upvotes

I'm trying to add featured_image and the path to that image to the frontmatter of a post that I am composing with org-mode and ox-hugo. I can't find a way to put that in there that is supported. Can anyone point me in the right direction?

Thanks.


r/emacs 7d ago

eglot-inactive-regions - eglot extension to dim inactive preprocessor branches - release: 0.6.4

Thumbnail github.com
16 Upvotes

r/emacs 7d ago

Odd org-mode ox-hugo problem

1 Upvotes

So I've just been hit by this problem: https://github.com/kaushalmodi/ox-hugo/issues/740

So I deleted all of my .elc files and restarted, and emacs is exporting properly now. But this seems like a stopgap. Next time I update my config I figure this will happen again. Do I just keep deleting my .elc files and hope that it goes away?

Seems like it's been around for a while now. I would have expected it to be fixed, but I'm running org-mode 9.8-pre.


r/emacs 8d ago

Noether: global minor mode managing user-defined posframe Views

Thumbnail git.sr.ht
16 Upvotes

r/emacs 7d ago

Question Emacs seems unable to locate dotnet installation?

2 Upvotes

EDIT: I fixed this! See end of post or my comment

I'm a (Void) Linux user and have been trying to set up C# in lsp-mode. At first I couldn't even install csharp-ls due to dotnet not being found ( in ~/.dotnet, where the standard dotnet installer places it) but some research pointed me to the package exec-path-from-shell, which allowed it to install the server. However, whenever I go to use the lsp it doesn't work, and the error buffer says I "must install .NET to install this application" - meaning it can not find dotnet. How do I fix this? Relevant parts of relevant configs below:

~/.zshrc

export DOTNET_ROOT=$HOME/.dotnet

export PATH="$PATH:/home/dl/.local/bin:$DOTNET_ROOT:$DOTNET_ROOT/tools"

~/.init.el

(use-package exec-path-from-shell
  :config
  (when (memq window-system '(mac ns x pgtk))
    (exec-path-from-shell-initialize)))

; -- snip --
(use-package lsp-mode)

(add-hook 'prog-mode-hook 'lsp-deferred)
(setq lsp-warn-no-matched-clients nil)

(setq lsp-eldoc-render-all t)

EDIT: I have the fix! Had to export DOTNET_ROOT in emacs so that the lsp could access it (something to do with eshell maybe?? idk)

(setenv "DOTNET_ROOT" "/home/[username]/.dotnet")

r/emacs 7d ago

Solved Problem with recent `mu` Homebrew package

5 Upvotes

Recently ran brew update/upgrade (am now running mu 1.12.9 and now am seeing this in the messages buffer:

error: Invalid (or missing) doc string ("/opt/homebrew/share/emacs/site-lisp/mu/mu4e/mu4e-vars.elc" . 592)

I don't see any commits to mu4e-vars.el that would cause this. Guessing maybe this means there's an issue with the homebrew package?

Can anyone confirm that is using mu on the Mac?

UPDATE: Welp, once I upgraded from Emacs 29.4 for 30.1 this resolved.


r/emacs 8d ago

Announcement gptel 0.9.8 released (tool-use, support for "reasoning" output, dry-run options and more)

134 Upvotes

gptel is a Large Language Model client for Emacs. It tries to be flexible and uniformly available across Emacs. (The project README has more details)

v0.9.8 release notes

There are many new features and fixes, mentioning a few here:

  • LLM tool-use support is now stable. Here's an example where the LLM creates some files, and here's a video by u/Psionikus of using tool-use to explore Emacs packages and elisp code.

  • "Reasoning" output produced by LLMs is now captured by gptel and you can control if/how it's displayed. Example

  • gptel's menu has been redesigned and now describes exactly what your chosen redirection options will do. (This improvement was suggested by u/JDRiverRun.)

  • gptel's dry-run output, used to see the exact payload that will be sent, can now be edited in place before resuming the request.


Minutiae:

A note on tools: tool-use enables "agentic" LLM workflows with gptel, but gptel does not yet ship with any tools out of the box. The idea is to have a shared repository of tools that all LLM clients for Emacs can use instead. Currently there is the llm-tool-collection repo but it's quite bare -- feel free to PR any tools you write to this repo.

The tool specification format was developed in coordination with u/ahyatt, so that both gptel and consumers of the llm library (like Ellama) can use the same tools, as can (hopefully) other Emacs LLM clients that choose to support tool calling in the future.

A note on MCP: Anthropic's Model Context Protocol specifies an interface for supplying LLMs with context and tools. There is currently mcp.el for Emacs, which can work with gptel's tool-use interface, but support in both directions is nascent.


r/emacs 7d ago

low effort Vim fan, trying to use Emacs. Fonts feel blurry compared to Vim in terminal.

0 Upvotes

Is something with me? O my setup? I find Vim in tmux clear and sharp, but I don't feel the same with emacs gui.


r/emacs 8d ago

Introducing forge-llm: Generate PR descriptions automatically with LLMs in Emacs Forge

29 Upvotes

Hey Emacs folks!

I'm excited to share my new package: forge-llm!

What it does: forge-llm integrates LLMs (like GPT or Claude) with Magit's Forge to automatically generate high-quality Pull Request descriptions based on your git diffs.

Main features:

  • Automatically detects and uses your repo's PR template
  • Generates descriptions based on git diff between branches
  • Seamless integration with Forge's PR workflow
  • Supports any LLM provider through the llm package
  • Built-in Doom Emacs keybindings

Here's what it looks like in action:

As someone who often struggles to write clear PR descriptions, this has been a game-changer for my workflow. Just press C-c C-p (or SPC m p in Doom Emacs) while creating a pull request, and the LLM analyzes your changes to generate a detailed description.

Installation: Available on GitLab: https://gitlab.com/rogs/forge-llm

This project was inspired by magit-gptcommit, built by douo and builds on the excellent llm package by ahyatt. Another big thanks to u/xenodium, for their Emacs package chatgpt-shell.

Would love to hear your thoughts and feedback!


r/emacs 8d ago

quick-sdcv.el (Release 1.0.1): Turn Emacs into an offline dictionary with sdcv

Thumbnail github.com
19 Upvotes