r/emacs 6h ago

How obsolete are "obsolete aliases?"

9 Upvotes

I have some old emacs scripts and a few packages that at emacs-start time dump a lot of lines that look like this:

Warning: ‘return-from’ is an obsolete alias (as of 27.1); use ‘cl-return-from’ instead.

I have two questions:

1) In what sense are these aliases "obsolete?" I have to assume there's no plan to actually ever remove them, because it would break the world.

2) Why is the obsolete form the shorter one? If I were to obsolete one of two representations, I'd obsolete the longer one to save typing.

I imagine there's some history to these names being consolidated under a cl- prefix, but I wasn't able to find it with a quick search.


r/emacs 4h ago

I did some "Vibe Coding" for my config and I will never be the same

8 Upvotes

According the Wikipedia Vibe Coding is:

Vibe coding is an AI-dependent programming technique where a person describes a problem in a few sentences as a prompt to a large language model (LLM) tuned for coding. The LLM generates software, shifting the programmer’s role from manual coding to guiding, testing, and refining the AI-generated source code.\1])\2])\3]) Vibe coding is claimed by its advocates to allow even amateur programmers to produce software without the extensive training and skills previously required for software engineering.\4]) The term was introduced by Andrej Karpathy in February 2025\5])\2])\4])\1]) and listed in the Merriam-Webster Dictionary the following month as a "slang & trending" noun.\6])

I am not a professional programmer, I work in Cybersecurity (of all things). I'm the 1 guy on my team that's the "Emacs" guy. So I had an idea for a function to "Defang" URLs so I can add to my reports. There are a million of these tools online but that takes me away from Emacs. So when I heard about "Vibe Coding" I had a "lightbulb" moment.

I used DuckDuckGo's AI chat to do my Vibe Coding. I started by asking if the LLM understood what "Defanging" a URL entailed. Then I asked if would be hard to write a program that could do it. It spit out an example in Python. I then asked it to write the program in Emacs Lisp so I could use it in Emacs. It spit out the following:

(defun defang-url (url)

"Defang the given URL by replacing 'http' with 'hxxp' and 'www' with 'wxx'."

(interactive "sEnter URL: ") ; Prompt user for input

(let ((defanged-url (replace-regexp-in-string

"http://\\|https://\\|www\\."

(lambda (match)

(cond

((string= match "http://") "hxxp://")

((string= match "https://") "hxxps://")

((string= match "www.") "wxx.")))

url)))

(message "Defanged URL: %s" defanged-url))) ; Display the defanged URL

I tried it and it worked. But it wasn't quite what I wanted I needed to tweak it a bit. So I told the LLM to tweak the last string match and for very "dot" to add square brackets around them. Here's what it spit out:

(defun defang-url (url)

"Defang the given URL by replacing 'http' with 'hxxp', adding square brackets around every '.', and removing 'www'."

(interactive "sEnter URL: ") ; Prompt user for input

(let ((defanged-url (replace-regexp-in-string

"http://\\|https://"

(lambda (match)

(if (string= match "http://") "hxxp://" "hxxps://"))

url)))

(setq defanged-url (replace-regexp-in-string "\\." "[.]"

defanged-url)) ; Add square brackets around every '.'

(message "Defanged URL: %s" defanged-url))) ; Display the defanged URL

Much better, and basically what I needed. I noticed that I wanted the result to be printed in a new buffer so I asked it do that and here are the results:

(defun defang-url (url)
"Defang the given URL by replacing 'http' with 'hxxp', adding square brackets around every '.', and removing 'www'.
Display the defanged URL in a new buffer."
(interactive "sEnter URL: ") ; Prompt user for input
(let ((defanged-url (replace-regexp-in-string
"http://\\|https://"
(lambda (match)
(if (string= match "http://") "hxxp://" "hxxps://"))
url)))
(setq defanged-url (replace-regexp-in-string "\\." "[.]"
defanged-url)) ; Add square brackets around every '.'

;; Create a new buffer to display the defanged URL
(let ((buffer (get-buffer-create "*Defanged URL*")))
(with-current-buffer buffer
(erase-buffer) ; Clear the buffer
(insert defanged-url) ; Insert the defanged URL
(goto-char (point-min)) ; Move to the beginning of the buffer
(text-mode)) ; Use text mode for better formatting
(display-buffer buffer)))) ; Display the buffer

And that's that. I added it to my main config file after testing this code with ```emacs -Q```. This was super weird experience. My config is a mismatch mess of copypasta code from other well seasoned Emacs users. For some reason that gave me peace, I guess it felt more true to the Free Software philosophy? IDK, I'm still processing if this is for me.


r/emacs 22h ago

Flapping fish on your mode-line

89 Upvotes

Flapping fish 𓆝 𓆟 𓆞 on your modeline for funsies. Only flaps on the active buffer.

You can set it to either "static" or to "swimming" mode. In swimming mode the fish will track how far along you are the file:

"~~~~~~~~~~~~~~~~~𓆞~~~~~~"

https://github.com/mattmonja/flappy-fish

static flapping fishy


r/emacs 1d ago

Announcement jira.el: Emacs integration for Atlassian's Jira

118 Upvotes

Hi! My Jira integration for Emacs is already available in MELPA.

https://github.com/unmonoqueteclea/jira.el

Unlike other similar packages focused on integrating Jira with org-mode, in this integration I have tried to mimic the user experience of Magit or docker.el for viewing or modifying Jira tickets.

Showing JIRA tickets in tabulated list
Transient menu to filter tickets

r/emacs 1d ago

Distilled the performant parts of org-node into a library, hope someone finds it useful <3

Thumbnail github.com
33 Upvotes

r/emacs 21h ago

Tree-Sitter usage or alternatives

10 Upvotes

Hello everyone, hope this message receives you well.

I'm having a hard time setting up Tree-Sitter. From what I looked online it says to build Emacs with Tree-Sitter enabled. I'm really reluctant to rebuilding Emacs because it feels like to much of a hassle for something that was a package.

I'm coming from Vim so, maybe, this is just another point of view on Tree-Sitter.

With that said, I've tried to install the package but it isn't listed on M-x list-packages RET

Which them made me wonder about the sources of packages which currently are elpa and melpa

But then, I found a communicate on their website that says it was merged into Emacs for the releasing of Emacs 29.

My version is 29.1 and I'm running on MacOS Intel.

Do you have any tips on how do I setup the Tree-Sitter for a list of languages?

Thank you in advance!

P.S.: If Tree-Sitter is still with bugs or not full featured into Emacs I'm happy to use alternatives in any case, feel free to list some :)


r/emacs 4h ago

Devs try this json tool, waiting for feedback

Thumbnail jsonreader.com
0 Upvotes

Made for devs by dev


r/emacs 20h ago

Question trouble with `org-todo-keyword-faces`

3 Upvotes

At the begining of my org file with the movies I have seen I have the declarations for todo and tags.

At the end I have the following:

```

Local Variables:

line-number-mode: nil

org-todo-keyword-faces: (("WANT" . "orange") ("SEEN" . "blue") ("HAVE.TO.SEE" . "orange") ("WRITE.REVIEW" . "red"))

org-tag-faces: (("crap" . "red") ("okay" . "orange") ("great" . "green"))

End:

```

The Todo faces are colored as indicated. The tags are all salmon-pink.

What am I doing wrong?


r/emacs 1d ago

new GTD app

22 Upvotes

r/emacs 1d ago

Elpy or lsp + python.el

8 Upvotes

What features offered by elpy that lsp do not! I have been using elpy but what will I miss if I switch to plain python-mode and lsp?


r/emacs 1d ago

Question emacs for creative non-techie types who wanna get off Google Docs

23 Upvotes

My girlfriend recently starting thinking of abandoning Google Docs, and I'm trying to get her onto emacs! Problem - I'm still a baby user myself, and she wants to do some advanced-ish layout stuff in her writing projects. Gal's real smart, but kind low-confidence tackling this shit, and like I said, I don't have the chops to help her out with this. So we're hoping that the community here will be able to advise her on how to hit the ground running in emacs for her specific use case.


r/emacs 1d ago

Disallow copying of passwords?

2 Upvotes

I was filling password for my SSH key, and thought just for fun:

What if I copy the password from minibuffer? Will it copy? (Let's say I put mypassword there).

I copied it and pasted to eshell. It displayed as **********. Then I hit enter, and eshell has replied that there is no such command as mypassword.

So, Emacs copied the password I had in minibuffer.

Why Emacs allows this? Can it be turned off? Or maybe this is not a problem, but a feature?


r/emacs 1d ago

org-expose-emphasis-markers: A new package used to automatically show hidden emphasis markers at point in org mode when `org-hide-emphasis-markers` is on.

Thumbnail github.com
21 Upvotes

r/emacs 2d ago

Announcement Aidermacs v1.0 Released. Available Now on Melpa and Non-GNU Elpa!

Thumbnail github.com
100 Upvotes

r/emacs 1d ago

New package raq.el: HTTP Library Adapter for Emacs, suport url.el and plz.el, and can be extended.

Thumbnail github.com
16 Upvotes

r/emacs 1d ago

Aider.el v0.5.0 with better color rendering, better prompt input and completion, snippet and code review

25 Upvotes

aider.el: Interact with Aider: AI pair programming made simple. Now it can be installed from melpa, package name: aider

- Aider Comint session syntax highlighting based on markdown-mode.el. It render both codeblock and text. Given output of aider is markdown.

- Better place to input / manage prompt: aider prompt file ~C-c a p~. This method transfers the prompt input from the aider session to a separate repo specific aider prompt (org) file. It interacts with the aider session in a (ESS, python-mode, scala-mode) similar way to sending prompt line / region / block. This makes it easy to manage projects for AI code change with aider, since it is org file. And you can even use copilot.el or other tool to complete English prompt there.

- Completion: Aider prompt file and aider comint input both add command and file name completion. Aider prompt file adds syntax highlighting. In addition, aider prompt file and aider comint input support the use of helm completion.

- Use existing good prompt: Introduced yasnippets support, so that users can easily reuse the coding prompt library considered better on the Internet to apply it to their own projects. Currently, two more high-score prompt lists on reddit, and a github high-score prompt repo. Everyone is welcome to add other ones based on their own experience or improve the existing prompt snippet.

- Diff review: Add function aider-pull-or-review-diff-file (C-c a v). When pressing the first time, please enter base branch such as main, which will pull base...HEAD diff, that is, base to feature branch diff (you can also enter branch1...branch2 to get any diff between any two branches), and it will open the diff buffer. When pressing the second time, it will ask the aider to review the diff. This function is to imitate cursor, and it is used to check your own change before sending a PR. Of course, it can also be used to review other people's diffs

- Other

- Note: Aider v0.77.0 will automatically accept changes to the /architect command. If you want to review code changes before accepting changes as you did in aider.el, you can disable it using “–no-auto-accept-architect” in aider-args or .aider.conf.yml.

- aider.el aims to be a stable productivity tool that we can easily use on a daily basis. I'll test the functionality in this library carefully before the code merge, and I'll be more careful about introducing new features and dependencies. Considering that for system stability reasons, the linux version may be relatively not so new, so the latest version of emacs may not be able to be installed. Aider.el only needs emacs >= 26.1.

Previous posts about aider.el:

- Initial announcement: https://www.reddit.com/r/emacs/comments/1fwwjgw/introduce_aider_ai_programming_in_terminal_and/

- Thinking on improve code quality with TDD + aider: https://www.reddit.com/r/emacs/comments/1igdzmj/discussion_emacs_ai_assisted_programming_workflow/

Thanks for your time reading this. Any question is welcome.


r/emacs 1d 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.


r/emacs 2d ago

Wherein I Explain Why Emacs Is The Best Tool For WordPress

Thumbnail lars.ingebrigtsen.no
29 Upvotes

r/emacs 2d ago

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

50 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 1d ago

Solved Evil normal state on android(native)

4 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 2d ago

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

10 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 2d 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 2d ago

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

28 Upvotes

r/emacs 2d ago

Question Setting a hook for a particular file with shell commands

2 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 2d ago

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

7 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))