r/emacs

▲ 36 r/emacs

I decided to give eglot a try after using lsp-mode for a while. (Java focused)

It turns out the process was more involved than I expected so I wrote up how it went in the linked markdown doc for anyone else trying to get this working.

During the process I ended up tuning and extending a decent amount of stuff which I discuss above:

  • general eglot settings
  • jdtls specific settings
  • jsonrpc formatting
  • flymake diagnostics buffer configuration
  • treesit-fold integration for java specifically aimed at imports
  • improved imenu indexing for java-ts-mode and imenu.

I also added a short video - walking through what the UI experience looks like:

https://youtu.be/fUnq9nMAEv0

github.com
u/Signal_Pattern_2063 — 1 day ago
▲ 20 r/emacs+1 crossposts

Need advice on cross-platform Emacs config - need my GNU/Linux setup running macOS + Windows

I've been building my Emacs configuration for quite a while now, and it has grown into something I jokingly describe as my “temple to computing”, I wanted to keep the experience feeling like Emacs, while building a modern, fast, modular environment on top of it and I've been using it as my daily environment for development, writing, work, Org, shells, Git, music, mail, etc.

Codeberg Repo: https://codeberg.org/jjba23/heks-emacs

The dream I have now (and need for work) is basically:

>One Emacs configuration, same muscle memory, same workflow, same packages, regardless of which machine/OS I'm currently sitting in front of.

If you're an experienced macOS or Windows Emacs user, I'd genuinely appreciate pointers to things I should fix or rethink.

A few things I'm particularly happy with this setup:

  • Elpaca for package management
  • Vertico / Corfu / Cape / Orderless for a really fast completion and minibuffer experience
  • Consult for navigation, searching, buffers, projects, registers, xrefs, etc.
  • Eglot and Language Server Support
  • Tree-sitter where appropriate
  • Magit for Git
  • Eshell with a bunch of custom workflow improvements
  • Org + Org Roam as a serious knowledge-management environment
  • Tempel for snippets
  • Jinx for proofreading
  • Helpful for inspecting Emacs
  • A fairly extensive collection of development tooling for Rust, Scala, Haskell, Scheme/Guile, Lisp, Kotlin, Python, Go, Nix, JavaScript/TypeScript, etc.
  • A modular theme system supporting things like Modus/EF, Everforest, Gruvbox, Catppuccin, Dracula, Kanagawa, Rose Pine, Doom, etc.

The configuration is deliberately split into modules so that the individual pieces remain understandable and replaceable rather than becoming one enormous init.el.

The current README has a breakdown of the modules if anyone is curious about the architecture.

And there is a lot more in there than just UI polish, there are modules for development, Org/knowledge management, shells/system interaction, mail, music, maps, AI assistance, etc.

----------------------

I've mostly developed and used this on GNU/Linux, but that is about to change.

I'm going to need soon to use a multi-OS setup, including macOS and Windows, and I really want to be able to take the same Emacs environment with me instead of maintaining completely different configurations for different operating systems.

I've tried to keep the config portable from the beginning, but I know there are probably a lot of assumptions buried in the configuration that are very Linux-centric.

So I'm looking for advice from people who actually use Emacs on: macOS and/or Windows.

Some initial questions I have already:

  • What are the common portability traps you've encountered?
  • Which packages behave differently across macOS/Windows?
  • What should I avoid assuming about paths, processes, shells, fonts, clipboard integration, notifications, etc.?
  • How do you handle external dependencies cleanly? (rg, git, or others)
  • Are there good patterns for making OS-specific configuration disappear behind small compatibility layers?
  • Anything particularly problematic with Eglot, Corfu, Vertico, Tree-sitter, Magit, Eshell, Org, etc.?
  • what are the things you wish Linux-oriented Emacs configurations understood about Windows or macOS?
  • are there particular GUI/keybinding/font/process quirks worth designing around?

And if you're interested in the project itself, feel free to poke around the source. I'm hoping HEKS-EMACS can be useful not only as a configuration people install, but also as a collection of ideas/patterns that people can steal for their own configs.

Repository: HEKS-EMACS

I'm particularly interested in hearing from people who have already solved the “I want my Emacs environment to follow me across operating systems” problem.

u/SandPrestigious2317 — 1 day ago
▲ 28 r/emacs

Something is wrong with my Emacs.

Applied Symbol Nerd Font Mono to see what happened. Could this be fixed without leaving Emacs?

u/gonstrider — 1 day ago
▲ 38 r/emacs

denote-grid

Made a lightweight visual grid view for Denote in Emacs that works with denote-dired. Every denote file has a thumbnail including videos and pdfs.

It has a neat cluster mode to group linked notes sidee by side. You can easily query with tags or strings inside grid view.

I tried to keep it as minimal as possible. For scalability we can rely on denote-dired mechanism to filter what we need and jump to grid from there. Arrow keys are snappy, mouse scrolling is not great. Hope someone finds it useful !

https://github.com/SenkiReign/denote-grid

u/SenkiReign — 1 day ago
▲ 5 r/emacs

What are the specific steps of Emacs downloading a package?

Sorry for the simple question but I've had a few conflicting answers & it's not entirely clear to me.

I've seen package.el is used but elsewhere I've heard that Emacs checks the local database instead of this.

I know it will be slightly different dependent on if it's an internal or external package.

reddit.com
u/John_Doe_1984_ — 1 day ago
▲ 6 r/emacs

Display comments of a reddit post inside elfeed

I spent a few minutes this morning looking for a way to read comments on a Reddit post within elfeed. After several attempts, I finally got it working. As I mentioned, this function only allows you to read the comments; you can't write comments, and upvoting and downvoting aren't possible. I'm posting this function here anyway, in case someone finds it useful.

I should preface this by saying that this function was created by AI; I didn't write it myself.

Pressing q inside the comment buffer instantly destroys the buffer and closes the split window, returning your screen back to the full Elfeed layout automatically.

I've updated the function and added this (setq body (replace-regexp-in-string "'" "'" body)) to replace ' with ' . As my first language is german, and my second language is french, I might have overlooked a few special characters.

(require 'xml)

(defun my-elfeed-view-reddit-comments ()
  "Fetch and display Reddit comments using an unblocked public RSS schema in a right sidebar."
  (interactive)
  (let* ((entry (or elfeed-show-entry (elfeed-search-selected :single)))
         (link (and entry (elfeed-entry-link entry))))
    (if (not link)
        (error "Could not find a link for the current entry!")
      (if (not (string-match-p "reddit\\.com" link))
          (error "Aborting: This link does not look like a reddit.com URL."))

      (let* ((clean-url (replace-regexp-in-string "\\?.*$" "" link))
             (rss-url (concat (if (string-match-p "/$" clean-url)
                                  (substring clean-url 0 -1)
                                clean-url) ".rss")))
        (message "Fetching comment RSS tree...")

        (let* ((curl-cmd (format "curl -sL -A 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ElfeedFeedReader/1.0' '%s'" rss-url))
               (xml-str (shell-command-to-string curl-cmd)))
          (setq xml-str (string-trim xml-str))

          (cond
           ((string= xml-str "")
            (error "Error: Reddit returned an empty RSS feed string."))
           ((not (string-prefix-p "<" xml-str))
            (error "Error: Server response is not valid XML markup."))
           (t
            (condition-case err
                (with-temp-buffer
                  (insert xml-str)
                  (goto-char (point-min))
                  (let* ((xml-tree (xml-parse-region (point-min) (point-max)))
                         (feed-node (car xml-tree))
                         (entries (xml-get-children feed-node 'entry))
                         (result-buf (get-buffer-create "*Reddit Comments*")))

                    (with-current-buffer result-buf
                      (erase-buffer)
                      (insert "REDDIT COMMENTS\n")
                      (insert "=============== \n\n")

                      (if (not entries)
                          (insert "No comments found on this post yet.\n")
                        (dolist (item entries)
                          (let* ((author-node (car (xml-get-children item 'author)))
                                 (name-node (car (xml-get-children author-node 'name)))
                                 (author (and name-node (car (xml-node-children name-node))))
                                 (content-node (car (xml-get-children item 'content)))
                                 (body (and content-node (car (xml-node-children content-node)))))

                            (when (and body (not (string-match-p "submitted by" body)))
                              (setq body (replace-regexp-in-string "<[^>]*>" "" body))
                              (setq body (replace-regexp-in-string "<" "<" body))
                              (setq body (replace-regexp-in-string ">" ">" body))
                              (setq body (replace-regexp-in-string "'" "'" body))
                              (setq body (replace-regexp-in-string """ "\"" body))
                              (setq body (replace-regexp-in-string "&" "&" body))

                              (insert (format "%s\n%s\n\n%s\n\n"
                                              (propertize (or author "u/unknown") 'face 'bold)
                                              (string-trim body)
                                              (propertize "────────────────────────────────────────" 'face 'shadow)))))))
                      (goto-char (point-min))

                      ;; Layout & UX Polish:
                      (visual-line-mode 1)      ; Soft wrap lines beautifully
                      (read-only-mode 1)        ; Prevent accidental editing
                      ;; Bind 'q' to kill the window and buffer seamlessly
                      (local-set-key (kbd "q") (lambda () (interactive)
                                                 (let ((win (get-buffer-window)))
                                                   (kill-buffer)
                                                   (when win (delete-window win))))))

                    ;; Split layout: create a 100-character wide window on the right
                    (let ((sidebar-win (split-window-right -100))) ;modify the width as you like
                      (set-window-buffer sidebar-win result-buf)
                      (select-window sidebar-win))

                    (message "Success! Comments displayed in sidebar.")))
              (error (error "XML structural parsing failed: %s" (error-message-string err)))))))))))

;; Bind it in elfeed-show-mode and elfeed-search-mode
(with-eval-after-load 'elfeed
  (define-key elfeed-show-mode-map (kbd "c") #'my-elfeed-view-reddit-comments)
  (define-key elfeed-search-mode-map (kbd "c") #'my-elfeed-view-reddit-comments))
reddit.com
u/great_silence — 2 days ago
▲ 40 r/emacs

denote-spatial

It turns your denote directory into a draggable, resizable canvas of images, PDFs, videos, and notes in your browser.

Cluster view groups linked notes together, keyword view groups by tag, feed view is a chronological timeline, and grid lays everything out at once. It can also quickly filter/query by keyword.

It can be useful for moodboards, presentations, storyboards, references, a desktop for your zettelkasten or just as a personal garden.

Everything is read-only except card positions, it never touches your actual notes.

I prioritized scalability and performance mostly, but I am not sure if it's gonna scale well. If anyone's willing to stress test it over 2k notes, I'd really appreciate the feedback.

https://github.com/SenkiReign/denote-spatial

u/SenkiReign — 2 days ago
▲ 37 r/emacs

Update Reddigg is now a fullblown reddit client

Just an update for one or two users of my reddigg package (https://github.com/thanhvg/emacs-reddigg). It has become a flullblown client. Beside reading, you should be able to submit a post, make a comment, upvote, downvote, edit your post, your comment... There is a dedicated minor mode which some of the users have been asking for but I was too lazy. Key bindings are not complete yet though.

If you can see this post it means it works because I did it through reddigg.

Okay here is the fine print:

  • you must have browsel https://github.com/dmgerman/browsel, btw many thanks to the creator of this awesome package.

  • you must have a reddit account, have your browser open old reddit and allow browsel to run on that tab.

  • reddigg will use browsel to drive the interaction with reddit through your browser.

  • llm code but lgtm :P

  • Don't think so but reddit might ban me and you. they closed the free access to old reddit recenly which led me to make this change

u/Goator — 2 days ago
▲ 16 r/emacs

elpacman -- a package manager for the CLI

Hey folks,

Just wanted to share elpacman with you, which is an Emacs package manager for the CLI.

Spending the majority of my time between Emacs and the shell I always wanted to have a CLI version of the Package Menu buffer, where I can easily just install/upgrade/query packages the same way I would usually install/upgrade/query system packages, and that is the reason I've created elpacman.

You can find elpacman here:

All the best!

u/dnaeon — 2 days ago
▲ 0 r/emacs

Emacs AI assistants (results)

Disclaimer: I'm not a heavy AI user, I'm just trying to understand the differences between AI harnesses specifically for Emacs and if using the real harness claude-code would even make a difference.

I like agent-shell more than anything else I've tried in Emacs including ECA which I recently configured but never used for anything.

Today I decided to give them both a try to a relatively complicated task (reviewing code) and oh boy, ECA was not only better but thousands of times better.

They both are using the same model and configs so I feel I'm missing something here, agent-shell failed to trigger simple things as bufffer overflows while ECA correctly pointed out the issue and fix. I'm I missing something here? Anybody had experience with this kind of things?

UPDATE: Probably comparing Apples to Oranges... Turns out ECA was using opus 5 while agent-shell was on opus 4.8. I needed to pull the latest NPM package to be able to set the right model for agent-shell.

reddit.com
u/Anxious-Resist8344 — 3 days ago
▲ 51 r/emacs

What is emacs canvas and how does it work?

Emacs Canvas (patch) on reddit

From my understanding of how programs draw to screens, it seems that Emacs canvas provides a video buffer to external graphics programs or libraries so that instead of drawing to the regular screen, they draw inside a video buffer created and displayed within Emacs.

The equivalent I can think of is the case of VNC or Xpra where a program uses a $DISPLAY which is rendered remotely on the client.

Would that mean that getting a program to run in a canvas would be along the lines:

(emacs-create-canvas height width buffer-name "/usr/bin/random-gui-program -param 1 -param -2")?

I suppose there would be some additional parameters relating to passing key strokes, controlling window movement and size etc.

reddit.com
u/vfclists — 3 days ago
▲ 53 r/emacs

emado: manage 100k+ markdown entries from Emacs at native speed

Hey everyone! I wanted to share a project I've been working on that I think might interest folks here who like keeping things in plain text.

I built mado — a general-purpose entry manager that stores everything as markdown files — and emado, its Emacs interface. The key idea is that it's not just another task manager with a rigid schema. It's a flexible system for organizing entries of any kind: tasks, notes, ideas, research snippets, meeting logs, you name it.

Each entry lives in its own timestamped directory with a MAIN.md inside. Want to attach files? Just drop them in the same folder — screenshots, logs, PDFs, whatever. Everything stays organized in one place, and since it's all plain files, it's perfectly git-friendly.

For tasks, there are optional fields you can fill in or completely ignore. For notes, just write markdown and skip the fields entirely — task-specific fields like priority, deadline, and status can be omitted from the file, and you can hide them from the output when listing entries so notes don't clutter your view with irrelevant columns. That flexibility is what makes it work as both a task manager and a notes system — or anything in between.

This also means you can use it like a Denote alternative: set a global working directory once, and all your notes, ideas, and research snippets live in one place — with the same query language, attachments, and git-friendly plain files. No need for a separate notes system and task manager.

The Emacs side features transient menus, interactive statistics where you can click on a tag or status to filter, outline-mode for collapsible sections, and direct deletion from the buffer.

Performance was a big focus — it's written in C++ and handles 100k entries in about a second.

I'd love feedback, especially from heavy org-mode users about what would make this genuinely useful for your workflows.

https://github.com/laserattack/emado/

https://github.com/laserattack/mado

u/Civil-Way-1482 — 3 days ago
▲ 13 r/emacs

Tempted to try Meow over Evil, but worried about IntelliJ / cross-editor muscle memory

I'm coming back to Emacs and I'm playing with Doom and vanilla configurations. I'm really tempted to ditch Evil and give Meow a proper shot. The selection-first model and native Emacs integration make a lot of sense to me, but I have one major hesitation: portability.

At work, we use IntelliJ (I enabled IdeaVim). Sticking with Evil on Emacs means my muscle memory stays aligned between Doom/Emacs and my IDE. If I switch to Meow, I'm worried about the context-switching friction during the workday.

Has anyone managed to port Meow-style bindings/selection mechanics to IntelliJ or found a solid way to bridge that gap? Would love to hear how others handle using Meow alongside non-Emacs tools at work.

Thanks!

reddit.com
u/rt49 — 3 days ago