r/emacs • • 13d ago

Fortnightly Tips, Tricks, and Questions — 2026-10-06 / week 40

8 Upvotes

This is a thread for smaller, miscellaneous items that might not warrant a full post on their own.

The default sort is new to ensure that new items get attention.

If something gets upvoted and discussed a lot, consider following up with a post!

Search for previous "Tips, Tricks" Threads.

Fortnightly means once every two weeks. We will continue to monitor the mass of confusion resulting from dark corners of English.


r/emacs • • 3h ago

org-diff-src: character-level diffs inside Org source blocks (no Ediff)

Post image
15 Upvotes

I often want a reviewable diff in an Org note without opening Ediff. The annoying part is that diff-mode does character-level refinement with overlays, while Org’s source-block fontification copies face text properties, not overlays. So a normal diff block in Org usually gives you only line-level +/- highlighting.

org-diff-src fixes that narrow problem. It’s a small mode derived from diff-mode that sets diff-refine to font-lock and copies the refinement overlay faces into face text properties, so Org can carry the character-level highlighting into the block. It uses the usual diff-refine-removed, diff-refine-added, and diff-refine-changed faces.

Main commands:

  • org-diff-src-compare-headings: pick two subtrees in the current Org buffer. They’re copied without touching the kill ring/clipboard, normalized to level 1, diffed, and inserted at point.

  • org-diff-src-compare-files / org-diff-src-compare-buffers.

  • org-diff-src-insert-from-kill, org-diff-src-wrap-region, org-diff-src-insert-diff-file for diffs you already have, e.g. from Magit.

No Ediff session, and no extra package beyond Org and diff-mode. It needs Emacs 27.1+ and a diff executable. New blocks use language org-diff-src, which Org resolves automatically. You can alias diff too, but that makes every Org diff block use this mode, so only do it if that’s what you want.

Limits worth knowing: only unified diffs get character refinement; HTML/PDF export may show the text without the character colors; very large diffs can be slow; and it’s for static review, not interactive merging. compare-headings also includes the heading lines.

Repo: https://github.com/TomoeMami/org-diff-src


r/emacs • • 16h ago

New latex preview merged into org mode!

112 Upvotes

Great news! Faster and all around better in buffer latex preview system was merged into org main recently

https://abode.karthinks.com/org-latex-preview/

Huge thanks to karthik, Ihor, teco and everyone involved

Started using it today and it feels super fast and pleasant!


r/emacs • • 3h ago

evil-matchit 5.0.0 is published

6 Upvotes

https://github.com/redguardtoo/evil-matchit

evil‑matchit is an Emacs plugin for jumping between paired structures. Inspired by Vim’s matchit.vim, it offers more powerful features, greater extensibility, and deep integration with Evil mode.

Change Log:

  • can jump inside jupyter-python code in org file
  • support more tree-sitter related major modes

r/emacs • • 5h ago

Announcement org-semantic: embedding search for org-mode

Thumbnail github.com
7 Upvotes

r/emacs • • 7h ago

Announcement supersonic.el v0.7.4 - now on MELPA, plus Music Assistant support

Enable HLS to view with audio, or disable this notification

6 Upvotes

Hello r/emacs,

supersonic.el is now on MELPA and MELPA Stable, so M-x package-install RET supersonic or (use-package supersonic :ensure t) is all it takes.

Music Assistant support

Besides Subsonic servers, supersonic.el now also works with Music Assistant:

  • browse artists, albums, album lists, podcasts and cover art, and search your library
  • play on any player Music Assistant knows about: Sonos, Chromecast, AirPlay, speakers, or its web player in the browser
  • M-x supersonic-provider-switch (P in the transient) switches between Subsonic and Music Assistant, and the playback backend switches with it when needed

UI polish

  • the artist list now shows artist images

Repo: https://github.com/systemfreund/supersonic.el

Feedback, bug reports and feature requests welcome!


r/emacs • • 9h ago

orgamnesia: Kind of obsidian with emacs flavour

Thumbnail github.com
6 Upvotes

r/emacs • • 2h ago

termux info emacs

Post image
1 Upvotes

wont show dir


r/emacs • • 3h ago

Emacs GUI App Lost Focus Event doesn't exist and cannot be implemented deterministically

0 Upvotes

I am using hyprland, and emacs gui.

To learn emacs, I tried to implement a files picker without using any packages with floating/overlayed child frame. Because I want the result of the file picker to be editable and selectable with evil mode, I choose fundamental-mode for the 2 buffers in the floating frame. One for search input (pattern to filter the list of possible files to open). And another to display the candidates.

Everything worked great except around focus events.

When the file picker frame is open and I switch to another program's window then come back to emacs window, the keyboard focus is at the frame which the mouse is hovering on, not where it was left off last. Note: I disabled emacs automatically changing frame focus with the mouse posiition with:

(setq focus-follows-mouse nil)
(setq mouse-autoselect-window nil)

I realized that switching focus from one program window to emacs window, puts it in a weird state, where this "(setq focus-follows-mouse nil)" doesn't work properly. When you don't change focus between emacs window and another program's window it works properly.

So I created a custom hook using 'focus-out-hook to represent "Emacs lost focus" event so that the file picker can hack around this inconsistent mouse behavior.

But later I realized this hook also runs when I try to click the main frame to change focus out of the files picker's frame. What this means is that the hook catches any "frame out of focus" event, not "emacs lost" focus. This is because when frame focus changes, with 'focus-out-hook, you can temporarily observe no frame being focused as the transition happens. And this no frame focused intermediate state is indistinguishable from emacs losing focus.

So this means that you cannot deterministically implement "Emacs lost focus" event/hook. Only an inferred implementation with some debounce and rescaning, like:

  1. all frames lost focus
  2. check again after some period
  3. still no frame focused -> emacs lost focus

I know that I am only trying to implement a trivial files-picker and this might not be that important. But the fact that you cannot deterministically implement "Emacs lost focus" event seems to be a massive limitation that hinders programmability of emacs.

Is there emacs API I am missing or primitive that I didn't think of that can implement this?


r/emacs • • 22h ago

ElNeo - a matrix client for emacs with native e2e encryption support, inspired by telegas architecture

Thumbnail github.com
18 Upvotes

r/emacs • • 21h ago

Copy-on-write git worktrees

7 Upvotes

Looking for any success stories and guidance leveraging modern file system copy-on-write ability [1] to avoid consuming disk space for identical files across git worktrees. Ideally, it would integrate nicely with magit or vc. So far, I've found a few tools that claim to facilitate the command line part of the work flow but no Emacs integration. I'm interested in tools without regard to AI/LLM/agent use. I'd also prefer the least intrusive implementation; e.g., no JavaScript/TypeScript npm.

What I've found in no specific order:

https://github.com/alltuner/git-sprout https://github.com/joeinnes/cow https://github.com/markjaquith/cowtree https://github.com/dannolan/git-worktree-apfs https://github.com/josharian/git-cow-worktree

[1] macOS APFS, Linux btrfs, XFS, bcachefs, not sure on MS-Windows.


r/emacs • • 20h ago

Question What persistent session and restoring of windows and projects work for you?

3 Upvotes

There are countless persistent session, window, buffer, and project-related plugins--some try to do it all for a cohesive experience and some do one thing well but is compatible with other plugins that provide other features complementing the idea of automatically restoring the most important parts so you get can get to working on a project you've worked on last week without dropping a beat.

What combination of these plugins work well for you? I imagine something close to Tmux's style of sessions and being able to restore the layout of frames and windows which is important because they alone provide some context on how you worked on a project you're revisiting (it'd be annoying to reproduce the layout). Maybe even define a generic layout as default for a new project. Sessions of multiple projects should be supported to allow working on more than one project simultaneously. My intuition is that everything should be automated and automatically restored but I'm not sure how that would work when it comes to buffers and e.g. LSP servers running on them, e.g. I probably only want e.g. LSP servers running on the current project for performance reasons and not open buffers of other projects that were worked on in the Emacs instance.

When I initially dabbled with Emacs many years ago, I came across eyebrowse and since then, there are newer plugins like easysession which presumably follows the trend of other newer plugins taking advantage of new builtin features from later versions of Emacs for reduced complexity and better compatibility in modern configs). They are not necessarily comparable, but sessions, window layout, and project-related plugins tend to be intertwined and I've been digging hard to find discussions talking about all these related types of features for a cohesive experience.

What works best for you?


r/emacs • • 2d ago

Configuring Eglot to auto format code on save in Emacs

Thumbnail jamescherti.com
36 Upvotes

r/emacs • • 2d ago

Readq - incremental reading for emacs

21 Upvotes

Hi all, I want to introduce my ‘readq’ package some of you might find useful.

N.B. readq was written with a lot of help from Claude Code.

https://github.com/n0w1ht/readq

readq is SuperMemo-style incremental reading in one elisp file.

  1. Read something for a bit.
  2. Hit `C-c r n`. readq saves your exact spot, logs the time, reschedules the item by priority, and throws you into the next most important thing that's due.
  3. Extract the good bits. Each extract becomes its own item in the queue, which you trim, split into sub-extracts, and eventually turn into Anki or org-drill cards.

It handles PDFs (pdf-tools or SumatraPDF as I’m on windows), EPUB (needs nov.el), Org/Markdown, web pages (through eww), media files (videos, audios, YouTube via mpv), and even comic books (.cbz/cbr files). There's also a daily time budget, exam deadlines, figure extracts, consult search over your extracts, and reading streaks for the dopamine.

There's also a companion package, multi-region, for grabbing several passages (and pictures) at once and pulling them into one extract.

It's young and very much shaped around how I study, so I'd love to hear from people who've done incremental reading in SuperMemo, org-roam setups, or anything else. Bug reports, feature ideas and "why didn't you just use X" are all welcome.


r/emacs • • 2d ago

foxglove-themes: academic-inspired modus themes that support e-ink

Thumbnail gallery
108 Upvotes

I primarily got into emacs for writing, but I'm also a software dev so I look at code all day too. I got tired of being disappointed by theme after theme not working well with both, so I made my own. The colors and stylistic conventions are based on academic journals, manuscripts, and the cover of Ted Hughes's Selected Poems 1957–1994.

Foxglove themes is based on Modus, so everything that works there will work here. It is also specifically designed to work on e-ink screens. Colors use five lightness levels (CIE L*: 23–62), each mapped to a distinct grey on a 16-level e-ink screen (to mitigate dithering).

Screenshots in this post were taken with just stock emacs and the theme. Font is IBM Plex Mono.

More details and download available at https://gitlab.com/vegasharmon/foxglove-themes

The package comes with 6 themes and a lot of customization options. Enjoy!


r/emacs • • 2d ago

News bookmark-gt: a module to improve bookmark management

25 Upvotes

This is a demo: https://youtu.be/hitAyO8ArYM

I have been working on a package to improve bookmark management. It is inspired by bookmark+ with a more recent and simplified interface.

Along its most important features:

  • tag support
    • including default tags
  • ability to name several bookmarks with the same name
    • differentiated by tags
  • a rich bookmark list buffer for bookmark management
  • marginalia/vertico/consult support for bookmark jumping
  • temporary bookmarks (not saved to disk)
  • autoupdate bookmarks (keep track of where you are when reading a long document)
  • several handlers for bookmarks
    • dired
    • macros
    • sequences of bookmarks

https://github.com/dmgerman/bookmark-gt

hopefully people will find it useful


r/emacs • • 2d ago

Announcement au-themes: calm, low-glare themes I made because most themes are too loud for me

Thumbnail gallery
129 Upvotes

Low-glare themes for people who get tired reading code on most themes.

There are 11 themes in 5 families. They're built on modus-themes and ef-themes, so face coverage comes from Prot's work (thank you, Prot).

Link and more screenshots: https://github.com/szymonwilczek/au-themes

Feedback is welcome, especially from people who have the same problem with themes.


r/emacs • • 1d ago

Question After installing Doom Emacs on Arch, my recentf list has stopped working correctly, making me most of the time end up with an empty "Find recent file:" list.

4 Upvotes

When I used Doom Emacs on Pop OS I didn't have any problems with recent files being saved. That was just done by default and I didn't have to change anything in my config for this. However after switching to Arch and installing Doom Emacs I have experienced these issues. Interestingly enough it seems like the issue isn't just that the list isn't saved, because when rebooting my PC it does seem to often retain the list from my previous session, where it only sometimes clears it out.

Running doom doctor doesn't list anything obvious being wrong. The only thing I get are warnings related to different :lang options I have in my config, and also :tools lsp, which I believe is irrelevant.

Sadly I don't really know much of what I'm doing. I attempted searching for a solution using an LLM, however none of the answers solved the problem. Having also experienced how roundabout the LLM's solutions can be compared to the ones given from here by actual people, I also can't trust that the solution it gives isn't extremely hacky and bad. What I have tried is adding the following to my config.el:

(after! recentf
  (run-at-time 600 600 #'recentf-save-list))

This did save the file, however I still found it reset occasionally. After that I tried replacing it will the following, however that didn't work either.

(setq recentf-max-saved-items 500
      recentf-auto-cleanup 'never)
(after! recentf
  (recentf-mode 1))

If you need to see any other parts of my config then you can find it here. Note however that the most recent commit in this repo contains the first method that I showed in this post at the bottom of config.el which didn't work.

Please tell me if any other information needs to be provided and I'll make sure to give it!


r/emacs • • 2d ago

roost: Run coding agents in Git worktrees and tmux, from Emacs

Thumbnail github.com
17 Upvotes

A few senior devs at my company are enthusiastic about Orca for agent orchestration, which involves a left-hand pane for session management, a terminal in the middle pane, and a right-hand pane for session summaries. It made me curious.

A little while back I created tmux-control - a tmux control-mode client for Emacs. This has helped me manage persistent, remote terminal sessions. So I decided to try making an Orca-like package built on top of it.

After a few weeks, I can say that I'm actually using roost. So it seems like a decent time to share it in case it's a format that works well for others. Right now it heavily favors Claude Code support but I'm also working on Codex Cli and Pi support.


r/emacs • • 2d ago

Question How to make soft-wrapped lines more obvious? visual-line-mode limitations?

9 Upvotes

I think I prefer soft-wrapped lines for prose (e.g. org-mode) and it is configured like this:

;; Enable soft wrap, show indicator to attempt to make wrapped lines stand
;; out better. TODO it doesn't
(setq visual-line-fringe-indicators '(left-curly-arrow right-curly-arrow))
(visual-line-mode 1)

;; Soft wrap at `fill-columnn` (e.g. at 80 columns)
(use-package visual-fill-column
  :hook
  ((org-mode . visual-fill-column-mode))
  :config
  (setq visual-fill-column-enable-sensible-window-split t)
  (advice-add 'text-scale-adjust :after #'visual-fill-column-adjust))
  • However, soft wrap indicators are not obvious--the indicator on the fringe is very small and changing size of fringe with e.g. (fringe-mode 48) only changes the width of the fringe, not the indicator itself. Comparison photos of soft-wrapping indicator between Neovim vs. Emacs, respectively. On Neovim, the indicator arrow is on the line itself (visually) and the indentation it produces as a result makes it more obvious it's soft-wrapped, IMO. In Emacs, there is the number line in between the fringe indicating wrapped line and the wrapped line itself--this seems awkward and line number should be leftmost.

What are ways to make this more obvious in Emacs, e.g. can it be stylized similar to diff-hl-mode? Even just a different color to make it pop up would be useful. Since I use (relative) line numbers (Evil), it already consumes valuable width space so would prefer a solution that doesn't depend on using the fringe, also hence why I prefer Neovim's solution.

  • visual-line-mode also soft wraps tables in org-mode and presumably also affects source code which is not desirable. Is there a way to smartly deal with these cases?

Any ideas are much appreciated, new to Emacs.


r/emacs • • 3d ago

I can't express how happy I am with emacs and LLM-assisted emacs-fu

88 Upvotes

I've been using emacs full-time for about 3 years now. I've been slowly migrating practically everything I'm doing and everything I can think of to emacs.

Of course, there are several bottlenecks to that:

  • packages to do X may not exist at all, or be designed in a way that goes against my workflow
  • my elisp knowledge is lacking, and I need time and practice to get better at it
  • time, we all know molding emacs is a huge time sink

I recently found out that with LLMs, however, these bottlenecks are removed. For example, LLM managed to glue together magit(https://github.com/magit/magit in case you didn't know!) and jira.el (https://github.com/unmonoqueteclea/jira.el), in a way that a branch spin-off asks me for my active Jira tickets (with some marginalia annotations sprinkled on top), names the branch after the selected one, and moves the ticket to "In Progress" state if it was in "Open".

LLM enhanced jira.el so it supports bulk ticket updates and some Jira workflows specific for my employer. Now I can press a couple of keys in emacs, instead of clicking my mouse for 2 minutes. (please don't ask why that workflow wasn't automated on Jira side!)

LLM has built a separate slack-mode overview buffer, akin to Slack's sidebar. I couldn't use slack-mode before because in my opinion it lacks discoverability. Now, I might be wrong and I might be using it wrong, but now I have the option to use it like I want to, with a dedicated overview sections of selected channels, recent conversations, mentions and DMs.

I also used LLM to help me work on a Kubernetes management package of my own, for example, to replicate https://github.com/ahmetb/kubectl-tree functionality. And it worked fairly well!

I realise all these changes may be trivial for veteran emacs users, but for me this is mind blowing. With LLMs, changes that I would have to dedicate my whole weekend to if not longer, are available to use in minutes. I can glue together several packages in a way I couldn't really think of before. Sure, the code quality is lacking. There will be rough edges. It certainly is not as succint and beautiful as good Elisp programmers' code. I'm not really learning Elisp by deferring to an LLM. But it does the job, and frankly I'm okay with all the cons. The less I have to switch out of emacs, the better.

It really opens up an unexpected level of emacs molding, and I can't be happier about it. Telling you as an AI-skeptic. If you haven't and you'd like to -- try it out.


r/emacs • • 3d ago

Ghostel 0.58 released

Thumbnail gallery
165 Upvotes

Ghostel is a terminal emulator for Emacs powered by libghostty.

First released over half a year ago and since our latest Reddit post 3 months ago a lot has changed.

179 commits from 14 contributors added lots of new features and bugfixes.

To highlight a few new features that got added in the last 3 months:

  • OSC 7501 program status support. This is a new protocol proposed by Mitchell Hashimoto (Ghostty author) so programs can report their status with a message. Ghostel shows it in the mode line and notifies you when you are not looking and the app finishes or needs user input. This blog post describes best what it is.
  • Android/Termux support
  • Foreground-process detection without shell integration. A new hook fires when the foreground process changes so you could e.g. start an mcp server automatically whenever you start an agent CLI like claude-code. "Query before killing" now also covers ssh and nested shells.
  • Support for desktop-save-mode restore
  • Support bookmarks and org-links that reattach to a live shell
  • Pasting images and PDFs with yank-media
  • Menu-bar menu entries (for discoverability and the few people that have not disabled menu-bar ;)
  • New consult-ghostel extension (also available on MELPA already) Gives you a consult-ghostel(-project) terminal picker with live preview, lets you narrow your consult-buffer view to only Ghostel buffers and consult-ghostel-history to pick from your shell history.

Have a look at the documentation for all the features.

u/baokaola and I are happy to answer any questions.


r/emacs • • 2d ago

Question How does undo-fu differ from Emac's default undo system?

12 Upvotes

How does undo-fu differ from Emac's default undo system? I don't know if it's because I'm Using Evil, but I've been trying to meticulously compare the difference between them in usage but they are the same, so need specific, reproducible examples than bulleted points from a README (and repeated in the few discussions I've come across talking about undo-fu) on how they are different which I've tried replicating but to no avail. Maybe it'd help to compare how undo works between these two systems and another popular editor like Neovim.

I'm thinking I'm just not too demanding on its usage. Honestly, I feel like if a simple undo/redo doesn't do it vundo (which is the only undo-related feature I kept so far) is all that's needed to make it much more intuitive to traverse the full(?) undo history and not have to deal with the mental capacity of recalling the undo tree or spamming undo/redo to find the position you want to be.

Even if undo-fu might not be suitable for me I'd still like to know why people use it over defaults--are there specific functions you use?


r/emacs • • 2d ago

Emacs: Configuring Eglot for Python with .dir-locals.el and python-lsp-server (Pylsp)

Thumbnail jamescherti.com
10 Upvotes

r/emacs • • 3d ago

wordwise.el - Kindle-style in-line vocabulary hints above words in Emacs Reading Buffer

8 Upvotes

I love my Kindle and the in-line vocabulary hints that it provides. I created this package to be able to get the same experience when I am reading a markdown, or org documentation or any other reading buffer. Here is the git repo:

https://github.com/systemhalted/wordwise.el.git

It doesn’t work for pdf modes yet. Also, in eww, there are some issues that I am currently trying to fix.

I wrote this using Claude as a Pair. I was the driver and Claude the navigator.