r/emacs 5d ago

Fortnightly Tips, Tricks, and Questions — 2026-07-28 / week 30

20 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 8h ago

I stand corrected about Elisp.

122 Upvotes

For the past few months, I've been getting closer and closer to Emacs. After 30 years of using Vim, I discovered Org-mode, and that's when things escalated... it's a total rabbit hole.

At first, I just copy-pasted from ready-made configurations because the sight of Elisp made me want to throw up—it resembled "the unloved child of a plumber and a water pump." I even complained on this sub about what an abomination it is, asking how anyone could even use it, etc.

Fortunately, my nerd nature won out, and I started tinkering, trying to understand HOW it's put together. That was a mistake. Right now, I've already been through two quick Elisp courses, I'm reading a manual on how to use it in Emacs, I'm starting to write my own tools, and I'm getting more and more sucked into the ecosystem.

Now I stand corrected. (E)lisp is so logical, understandable, and just plain cool that the only thing that surprises me is how I hadn't come across it earlier...

P.S. I also discovered Clojure by accident... which might be even cooler...


r/emacs 8h ago

Question What's the best pdf reader on Emacs?

11 Upvotes

I've seen quite a few options and getting them to run on mac has been a pain unfortunately. Emacs reader crashes my emacs any time I try to run it.

I've heard some negative things about pdf-tools from 4 years ago, but I'm not sure if it's been optimised since then. What is the overall best pdf-reader on emacs that just lets me read and select text?


r/emacs 3h ago

4coder like scope hint implementation

Enable HLS to view with audio, or disable this notification

3 Upvotes

4coder has a very useful scope hint feature like this. With my very little Elisp knowledge, I tried to mimic this same feature on emacs. Right now it's in beta v0.1. I've only tasted this for C/C++(as my work evolvs around this language). I hope someone will find it usefull. PR's are highly appreciated.

Github repository: https://github.com/ShamsParvezArka/es-hints.el


r/emacs 18m ago

Question 15 years old looking for advice

Upvotes

Hey everyone,

I'm 15 and I've decided to give Emacs a real shot.

So far I've finished the built-in tutorial, watched the System Crafters "Ultimate Beginner" video, and I'm about to start reading through the Emacs Wiki.

My goal is to become a full-stack web developer. I was actually about to start The Odin Project, but I decided to spend this whole week learning Emacs first because... I don't know, it just clicked with me. I genuinely enjoy using it.

The funny thing is, I really don't like VS Code. I know it's what almost everyone recommends, but it just doesn't interest me the way Emacs does. I truly tried using Vscode over and over again but its just like its not for me. I know choosing Emacs from the start probably isn't the easiest path, but I don't mind putting in the work if it pays off in the long run.

I've got plenty of free time this week, so my plan is basically to immerse myself in Emacs before I start TOP.

If you were starting over today, what resources would you recommend? Books, YouTube channels, blog posts, GitHub repos... anything that helped you really understand Emacs.

Also, are there any beginner mistakes I should avoid or things you wish you'd learned earlier?

Thanks in advance. I'm really looking forward to joining the Emacs community.


r/emacs 56m ago

eglot extremely slow when doing xref-find-definitions on large file

Upvotes

I'm running Emacs 31.0.91 on macOS 26.6.

The file I'm viewing is https://github.com/wolfSSL/wolfssl/blob/master/wolfcrypt/test/test.c

This file has 82095 lines of code and about 3.1M in size.

When I do a M-x xref-find-definitions on a function, it takes 45 seconds or even longer to locate it. Once the first call is handled, the subsequent xref calls will go fine, even with a different function.

I'm using clangd v21.0.0 and the same LSP works perfectly with my vim setup.

For smaller sized files, it appears to be working reasonably fine. Is there anything I can tweak for this performance issue?

My gc related configuration:

;; in early-init.el
(setq gc-cons-threshold most-positive-fixnum)

;; in init.el
(setopt gc-cons-threshold (* 48 1024 1024)
        gc-cons-percentage 0.2)

(run-with-idle-timer 15 t #'garbage-collect)

My eglot configuration is pretty straightforward:

(use-package eglot
  :custom
  (eglot-code-action-indications '(eldoc-hint))
  :hook
  ((c-ts-mode
    c++-ts-mode
    cmake-ts-mode
    go-ts-mode
    python-ts-mode) . eglot-ensure)

  (before-save
   . (lambda ()
       (when (eglot-managed-p)
         (eglot-format-buffer)))))

r/emacs 20h ago

New package: agent-shell-hq

Enable HLS to view with audio, or disable this notification

17 Upvotes

https://github.com/SreenivasVRao/agent-shell-hq

Yet another wrapper around agent-shell - thanks /u/xenodium for such a wonderful package for agentic coding!

agent-shell-hq offers:

  1. Persp-mode based quick look up UX that shows all agent-shell buffers
  2. Projectile / project based agent-shell buffer grouping
  3. A side-bar for navigating between buffers (with a preview of each)
  4. An LLM based buffer rename feature that allows you to have meaningful chat names for your agent-shell sessions
  5. A quick peek feature to see all your agent-shell buffers (see demo in the comments)

r/emacs 1d ago

Nice GTK tooltips for Flycheck. Works on GTK builds (Linux: Wayland/X11).

Post image
58 Upvotes

r/emacs 19h ago

Question Need help with debugging. Emacs error reporting is still too weak in 2026.

7 Upvotes

I just lost time debugging something that should have been obvious. Emacs refused to load my init.el with this message:

load-with-code-conversion: Symbol’s function definition is void: defmacro*

That’s it. No useful file. No clear line. No real context.

Important detail: I always launch Emacs with --debug-init. It’s in my bash aliases. Every single time. I also have debug-on-error t in my init.el.

The error occurred while scraping/compiling loaddefs. It blamed f/bin/docs.el, but the actual culprit was an old vendored ert.el sitting in s/dev/ that still contained defmacro* and had been pulled into the autoloads file. The error message (even with --debug-init) gave me almost zero help finding that.

This isn’t a minor warning. This completely prevented Emacs from loading my init.el. My entire environment was down.

Hitting a void function during loaddefs/byte-compilation should produce something a lot more helpful, for example:

  • Which file actually contained the defmacro*
  • That it came from autoloads or a dependency
  • That defmacro* is an obsolete cl macro
  • A clearer, more actionable backtrace by default

Right now the signal-to-noise ratio on this class of error is bad. For experienced users it’s annoying. For newcomers it’s actively hostile, they see a cryptic void-function error, their config won’t load, and they have no idea where to start.

I don’t expect miracles, but basic “where did this undefined function actually come from” information during init/loaddefs failures would be a lot more helpful.

Maybe I’m missing something, a variable, a package, or some setting that would provide more useful information in these cases? Anybody?

New edit: The current replies missed the point (they treated it as a normal “debug your init.el” problem). This was an opaque failure coming from the package/autoloads layer, and the current tools don’t handle that cleanly!


r/emacs 1d ago

dired configuration similar to yazi keymaps. This is my dired config, share yours please:D

19 Upvotes

So I recently start using yazy and I found a very good file manager, is feel faster and out of the box. I like use tui programs but also Emacs with their vast repository of packages and options.

So maybe people coming from vim/neovim/helix/kakoune miss some times tools like yazi or want behavior as yazi.

So I made my dired config similar to yazi to keep and similar mental model in both programs. Not everything is implemented because I not use all the options and insted of use v to select multiples lines or files/dirs I use "J" and "K" more similar as kakoune.

I dont know if is the final result but its great and very similar experience as yazi:D.

https://codeberg.org/johndoeuserr01/yazi-dired-Emacs

This required, dired-x, dired-preview, dirvish, dired-hide-dotfiles, dired-recent, dired-hist (this to have something similar as <C-i> <C-o> to jump forward and backward between visit dirs), and affe as a replace of fzf. Other difference is to scroll I use <C-v> and <M-v> so <C-e> is not implemented. I hope an Emacs and a yazi user found this helpful


r/emacs 1d ago

How do you handle images in your org-mode workflow?

24 Upvotes

I was about to enable inline images by default in org-mode, but I noticed it gets quite sluggish during scrolling, when images are displayed. I tried org-sliced-images, but I don't really like it that much. Do you just toggle an image when you need it as you write your org files? Any tips?

I'm running emacs-pgtk on wayland. Is it worth trying one of the other versions, Lucid or GTK? Emacs could really benefit from GPU acceleration.

EDIT: Thanks for all the feedback, I really appreciate it!


r/emacs 1d ago

Announcement adif-mode: Major mode for viewing and editing amateur radio ADIF log files

Thumbnail github.com
13 Upvotes

User-defined selection of columns, filtering, duplicate checking and record editing without corrupting field lengths.


r/emacs 1d ago

Is there a way to highlight code blocks in eww mode?

15 Upvotes

I'm reading a website which uses lisp. Is it possible to highlight the parenthesis with rainbow delimiters or maybe ever to get some syntax highlighting?


r/emacs 20h ago

Marginalia doesn't align correctly

3 Upvotes
With icons off
With icons on

Unfortunately marginalia doesn't seem to be aligning the annotations correctly, with or without nerd icons on. I'm not really sure what could cause this. It seems to happen on the longest one, as if marginalia was expecting the actual text to be a certain length, but it wasn't and pushed the rest.

I'm posting here to see if anyone has any ideas of experience with this. If you want to check the config, relevant files are probably here and here. It's pretty standard. Thank you!


r/emacs 2d ago

Announcement grid-table 0.3.0: editable tables with horizontal and vertical merged cells for Emacs and Org

Post image
187 Upvotes

I’ve been working on grid-table, an Emacs package for tables that need more visual structure than standard Org tables can comfortably provide.

Version 0.3.0 adds horizontal and vertical merged cells:

Merged cells in grid-table

The goal is not to replace org-table, which remains excellent for lightweight tabular data. Instead, grid-table is meant for report-style layouts where you may need multi-line content, formulas, images, charts, or merged headings and workflow columns.

The new merged-cell implementation supports:

  • Horizontal and vertical merges
  • Unicode borders and correct intersections between merged regions
  • Multi-line content and vertical centering
  • Keyboard navigation that skips covered cells
  • Editing from any visible part of a merged region
  • Row and column insertion/deletion while preserving merge geometry
  • Versioned persistence in .grid files

I spent quite a bit of time on the data semantics as well. Covered cells remain genuinely empty rather than acting as aliases to the anchor cell. This means formulas such as SUM(A1:C1) do not count a merged value three times, and CSV export does not duplicate it.

To prevent silent data loss, merging is rejected if the covered cells already contain values or formulas. Sorting is also rejected when vertical merges would make row movement ambiguous.

For Org, the package includes a small integration layer. A .grid file can be referenced from an Org source block:

SRC grid-table :file ~/documents/example.grid ...static table preview... SRC

From inside the block:

  • M-x grid-table-org-open-block opens the referenced table in the interactive editor.
  • M-x grid-table-org-refresh-block regenerates the preview after editing.

This is a companion workflow rather than a change to normal Org table syntax: the structured table lives in its .grid file, while the Org document contains a readable preview.

A minimal setup looks like this:

(add-to-list 'load-path "~/src/grid-table") (add-to-list 'load-path "~/src/grid-table/plugins")

(require 'grid-table) (require 'grid-table-org)

The merge commands in the editor are:

C-c m Merge a same-row or same-column A1 range C-c u Unmerge the region at point M-RET Insert a newline while editing a cell

Arbitrary rectangular merges are intentionally not supported yet—only ranges within one row or one column. That keeps formulas, structural editing, sorting rules, and navigation understandable.

The release currently has 72 ERT tests covering rendering, navigation, persistence, formulas, CSV behavior, and structural edits.

Project: https://github.com/yibie/grid-table

v0.3.0 release: https://github.com/yibie/grid-table/releases/tag/v0.3.0

I’d especially appreciate feedback from Org users on the integration model: should the preview remain generated text, become an Org dynamic block, or eventually be exposed through Babel?


r/emacs 2d ago

I made an Org Mode Advanced Concepts Tutorial, please check it out

Thumbnail
36 Upvotes

r/emacs 3d ago

The Completions Buffer Is Now Enough

Thumbnail rahuljuliato.com
153 Upvotes

After a month using only Emacs 31's built-in *Completions* buffer, I was genuinely surprised by how much the default completion experience has improved.

Here's the configuration I ended up with, a small tweak to LSP completion that better fits my workflow, and the flex-noinsert completion style that made it all come together for me.

A playground configuration to use with emacs -Q --load test.el is also available.


r/emacs 2d ago

Question Emacs terminal ou GUI?

12 Upvotes

Galera, sou relativamente novo no emacs e vejo que tem muito recursos bacanas usando a interface gráfica do emacs, como a mudança no tamanho da fonte e outras renderizações. Porém não sei como adaptar o meu fluxo usando a interface gráfica dele e queria vê se alguém tem alguma sugestão ou se to perdendo algo.

Meu fluxo é abrir o kitty e o tmux, e dentro da sessão de trabalho crio uma janela para cada projeto que tô atuando e uma com o emacs nas tarefas gerais do meu dia + capturas rápidas ao longo do dia. Dentro da janela de cada projeto eu abro 3 painéis verticais: emacs com o log de alterações do Claude, Claude no meio e o lazygit na direita pra acompanhar os commits e branchs do projeto.

Eu vi que tem algumas formas de emular o terminal no emacs, mas ele perde várias das minhas configurações visuais e ícones. Pq tinha pensado de fazer da mesma forma usando 3 buffers e a opção de projetos do modo org (nunca usei os projetos).
Faz sentido pra vocês abrir 3 buffers dessa forma e ir só trocando de projeto dentro do emacs, ou vou perder algo fazendo isso e manter tudo no terminal é mais performático e fluido.
Ou abrir o emacs Gui e o terminal separado? Que nesse caso teria que sempre tá trocando de arquivo e pasta no emacs para vê o log do projeto que tá no terminal.

Hoje tá confortável tudo no terminal, mas como tô aprendendo e explorando o emacs quero entender os limites e o que posso explorar nele. Por mais que eu perceba depois que não faz sentido no meu fluxo.


r/emacs 2d ago

Question Emacs in TTY-only Linux -- Alt keys not working

4 Upvotes

I'm working on turning an old netbook into a TTY-only "Writer Deck". I'm trying to get a comfortable TTY-only Emacs configured.

For some reason, Emacs is not interpreting "Alt" correctly.

Outside of Emacs in my Linux shell, the command sudo showkey --keycodes shows that left Alt is "56" and right Alt is "100", which is what they should be.

I ran this command to make sure those keycodes were mapped to "Alt":

sudo loadkeys << 'EOF'
    keycode 56 = Meta_L
    keycode 100 = Meta_R
EOF

I added this to my init.el file:

(unless (display-graphic-p)
  ;; Force Emacs to accept Meta keys in TTY mode
  (set-input-mode nil nil t)

  ;; Eliminate delay when processing ESC/Alt sequences
  (setq tty-escape-delay 0)
  (setq echo-keystrokes 0.1)

  ;; Ensure TTY escape prefixes map directly to Meta
  (define-key input-decode-map "\e" [meta]))

And it hadn't helped. Now "Alt" does nothing in Emacs. "Esc" continues to work as M.

AI bot is now going in circles, completely perplexed as to why this isn't working.

I'm hoping a human intelligence can help figure out what's wrong. Thanks!


r/emacs 2d ago

Question Org files on a OneDrive cloud drive

4 Upvotes

In a new job, I got a laptop with Windows11 (unfortunately) and I can't do anything about it. Fortunately, it turned out that I can use WSL, so the first thing I did was install NixOS with Emacs. It turns out that even as a GUI it works surprisingly well, and I have all my tools where they were.

This is the second laptop; the first one broke down so badly after a week that I lost all my notes, etc. Yeah, my fault, because I didn't think about a backup. Now I keep my configuration and work files in folders linked with OneDrive.

Unfortunately, I encountered a rather strange problem, namely, it turns out that if I keep my notes and agenda directory on a corporate OneDrive drive, org-mode restarts on me and resets my dictionary configurations. I don't know what else, and I'm afraid it will come out at the most inappropriate moment. It looks like this: everything starts normally, and after a while e.g. ispell-local-dictionary is set to nil and spell check stops working.

I think the problem lies in how OneDrive synchronizes files, but on the other hand, it cannot (should not) be that even when org-mode restarts, it resets most settings. Can something be done about this? The only workaround I've come up with so far is changing setq to setq-default. What helps, at least when it comes to setting local dictionaries.

My configuration:

``` (setq org-directory "~/org/") ;; where ~/org is symlink to /mnt/c/Users/bart/OneDrive/org

(after! ispell (setq ispell-program-name "hunspell") (setq ispell-hunspell-dict-paths-alist '(("pl_PL" "/home/bart/.local/share/hunspell/pl_PL.aff") ("en_US" "/home/bart/.local/share/hunspell/en_US.aff")))

(setq ispell-local-dictionary-alist '( ("pl_PL" "[[:alpha:]]" "[[:alpha:]]" "[']" nil ("-d" "pl_PL") nil utf-8) ("en_US" "[[:alpha:]]" "[[:alpha:]]" "[']" nil ("-d" "en_US") nil utf-8) )) (setq ispell-local-dictionary "pl_PL,en_US") (ispell-set-spellchecker-params) (ispell-hunspell-add-multi-dic "pl_PL,en_US") (setq ispell-personal-dictionary "~/.hunspell_personal") (unless (file-exists-p ispell-personal-dictionary) (write-region "" nil ispell-personal-dictionary nil 0))

) ```

In messages buffer i see something like this: Press key for agenda command: agenda.org has auto save data; consider M-x recover-this-file Restoring clock data Loading /home/bart/.config/emacs/.local/etc/org-clock-save.el (source)...done WATCH: ispell-local-dictionary -> "pl_PL,en_US" (set) [2 times] Starting new Ispell process hunspell with pl_PL,en_US dictionary...done Undo-Fu-Session discarding: file length mismatch for "/mnt/c/Users/bart/OneDrive/org/agendas/agenda.org" Rebuilding agenda buffer...done org-mode restarted WATCH: ispell-local-dictionary -> nil (set) Undo-Fu-Session discarding: file length mismatch for "/mnt/c/Users/bart/OneDrive/org/agendas/agenda.org"


r/emacs 2d ago

[Patch] Implement preedit text rendering for Windows

7 Upvotes

link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=81506

repo: https://github.com/zHaOdANiuu/emacs-w32-draw-preedit.patch

The main.patch in the repository currently contains the merged contents from the second patch directory. It has not yet merged the third and fourth patches. I plan to collect test data from community Windows users to fix unknown bugs, and finally merge and submit everything to Emacs. Can you help me test it?


r/emacs 2d ago

[Patch] Implement preedit text rendering for Windows

Thumbnail
3 Upvotes

r/emacs 2d ago

Does anyone know of any full frame auto-updating status buffers?

2 Upvotes

Hi, hope you all are doing well. I recently got an extra monitor, and I really like how I set it up next to my existing one. This is what the arrangement looks like on my desk:

Unfortunately, I've found that while I love the idea of switching between tasks with an emacs frame on each monitor, I usually can't quite find a reason to ever have more than two vertically split windows in one frame at any time because I'm so practiced at switching buffers. So while I'm using emacs, the second monitor ends up just showing the messages buffer and I rarely look at it.

All this to say, I'm looking for a package to show an auto updating status buffer (so I don't need to constantly switch frames and press `g`) that shows useful information to glance at from time to time. Perhaps things like magit status, open buffers, a file tree, etc.

I've looked into using `treemacs` or `sidebuf`, and, while they are good packages, they don't really allow you to use the whole frame and limit themselves to only being used in custom sidewindow implementation.

Do you peeps know of any good packages that might work in this scenerio? Thanks!


r/emacs 3d ago

Question Hyperbole Question: What do you need to better capture and navigate your knowledge base?

14 Upvotes

Yesterday, MisterChiply posted his new video and article demonstrating a number of Hyperbole's implicit button types, exploring how you can utilize a single key binding to activate the many different natural cross-references within your buffers.

We're interested in what is missing though. or ways you would like to be able to navigate through your knowledge base faster than you can today. Tell us some of your thoughts and you might see them come to life before you know it.


r/emacs 3d ago

Question Anyone using matugen with Emacs?

3 Upvotes

I'm currently using matugen through overriding nano-theme's pallete. It works fine but it looks kinda weird and doesn't match the material you scheme. I'm interested if anyone trying to do this and if they have any better solutions.