70
This channel is a feed for r/emacs. @r_channels @reddit2telegram
Consult breaking change
Just FYI, a breaking change from 4 days ago changes the way you specify options for the underlying async tools like rg, fd, etc.
Old format:
expression -- -u -L
expression -u -L
-u -L -- expression
--newer 1h
- just escape it \-.
Bending Emacs - Episode 10
https://www.youtube.com/watch?v=R2Ucr3amgGg
https://redd.it/1qei50o
@r_emacs
PSA pdf-tools now supports continuous scrolling (experimental)
I'm not involved in this project, but seeing how continuous scrolling is sometimes discussed in this subreddit, I thought it might be worthwhile to announce the new feature.
Credit goes to the authors of this commit:
https://github.com/vedang/pdf-tools/commit/2603233d2b3814c75c762783327f1fd633f82549
How to enable continuous scrolling:
https://github.com/vedang/pdf-tools?tab=readme-ov-file#continuous-scroll-mode-experimental
It should work out-of-the-box with pdf-tools installed via M-x package-install.
https://redd.it/1qe99jm
@r_emacs
What value is there in having the Point centered while scrolling?
When I'm scrolling, it's hard to keep track when it jumps by N number of lines when the Point reaches the bottom of the window and it brings it back to Center.
Today I found a variable called scroll-conservatively which was set to 0 by default, and this stackexchange answer suggested it be set to 10000, which solved my problem.
My question is, why is the default to have the Point centered in the first place? I mean, what is the advantage in having that?
https://redd.it/1qe2yi6
@r_emacs
What's the difference beetween tree-sitter and lsp-mode added modes?
I've been trying to migrate my typescript workflow to emacs (from vscode) and I'm kinda stuck at making the lsp-mode syntax highlighting work. Since I'm using doom emacs, I've enabled the (javascript +lsp) on my init.el, and that worked fine for auto-complete, but for that I need to activate the javascript-mode instead of the typescript-ts-mode (which doesn't work for autocomplete). Which of these I should use? I'm completely lost on this even after reading the documentation...
https://redd.it/1qdt02n
@r_emacs
How are you liking vulpea ecosystem?
I've been thinking about ways to extend some of the knowledge management I do in Emacs (currently Org Roam) to be more visualized -- I think I just invented a word -- and to tooling outside of Emacs itself. For instance, visualization of knowledge graphs similar to what org-roam-ui does and then some. And extending outside of Emacs, ability to trigger and monitor external tooling like n8n, various CI/CD systems, etc.
It seems like the vulpea ecosystem might have a lot of tooling that could help with the ideas above.
Anyone using vulpea care to comment on your experience with it? Any chance you chose it because you were thinking along the same lines as what I describe above re extending outside of just Emacs?
ty!
https://redd.it/1qdn7zc
@r_emacs
emacsclient without emacs
I want to have emacsclient in a container without installing emacs inside it, and use a mounted volume for the emacs server socket for editing files. Running emacsclient inside the container would then open emacs running outside the container, and once done, execution continues inside the container. Using a TCP port is also an option.
Is it possible to install emacsclient without the emacs package? Copying the file into the container seems obvious, not sure if there would be side effects.
https://redd.it/1qde34w
@r_emacs
Eglot's LSP semantic highlighting is amazing
I recently noticed a significant improvement in Python syntax highlighting. I had previously attempted to customize the tree-sitter grammar without success, so I appreciate that this update was applied automatically. It is a major improvement to the user experience. Thank you to the Eglot developers.
https://redd.it/1qdbkiu
@r_emacs
A way to hide Emacs pgtk title bar (Ubuntu Snap package)?
Hi all,
I'm using the GNU Emacs pgtk Snap package from https://github.com/alexmurray/emacs-snap in Ubuntu. Is there a way to make its title bar disappear?
https://redd.it/1qcylm3
@r_emacs
What ai service are you using with emacs and how?
Hello!
With claude removing support for 3rd party integrations I am looking for ways to use ai subscription services without leaving emacs.
I have been using opencode with agent-shell as it's model agnostic and I could connect to claude or antigravity. However, both subscriptions have heavily limited or even excluded 3rd party integrations.
API is simply too expensive and switching between antigravity and claude code annoys the hell out of me.
https://redd.it/1qcximz
@r_emacs
The Emacs Widget Library: A Critique and Case Study
https://www.d12frosted.io/posts/2025-11-26-emacs-widget-library
https://redd.it/1qcgg1x
@r_emacs
Ediffing a GitHub pull request in Emacs
Yesterday I found out two things:
1. The GH CLI lets you get a patch file of a PR: gh pr diff {pr-number} --patch
2. Ediff has a command ediff-patch-file that opens a "session" so you can ediff multiple files while applying a patch.
It is 90% of what I wanted for a while now.
For small PRs, just a diff can be enough. But for medium to large ones, this is much better (IMO).
I suspect a lot of people use forge for this, I don't use Magit because I am stuck on Windows at work.
I did write a small wrapper that prompts for open PRs in the current repo, in a proto-package that uses the GH CLI:
https://git.sr.ht/~sebasmonia/emacs-utils/tree/main/item/ghcli.el#L324
I added a subdir with clones of the "base" branches for each repository I work with, to run these. (you could use workstrees instead, I guess)
https://redd.it/1qbu4ga
@r_emacs
What is your insanely hidden official shortcut that people can never find out?
I've been working on my own tweak to kill all magit associated buffers when I close magit status for a few hours, only to find out that I can do it by C-u C-u q.
https://redd.it/1qajehz
@r_emacs
Avoiding text overflow in org-mode
I’ve been using basic emacs for a decade with tramp and org-mode.
My programming is mainly in R.
When I’m being lazy sometimes I’ll accidentally print a 100k+ row/column dataframe/list. The problem is this causes wild lag and buffering time to my emacs client and sometimes sends it to an unresponsive mode.
Is there some kind of trick I can use so this doesn’t happen? Maybe some kind of limiter?
The main issue is if I haven’t saved for a few hours I lose all my code if I force it to shutdown. Usually I’ll just suffer the 10+ minutes of parsing… to save my code. That being said that’s on me for not implementing an auto-save. But on the flip side, I also lose all the objects in my R environment too. Which also isn’t ideal..
Any thoughts or simple solutions ?
Thanks !
https://redd.it/1qeprkb
@r_emacs
Experimenting with a faster TRAMP backend using Rust and JSON-RPC
Hi
So tramp uses a shell on the ssh remote connection to do what it does. I thought performance might be improved using an actual RPC implementation, with a server binary running. I chose jsonrpc as emacs has fast native json parsing. The server is written in rust and needs to be copied over on the initial connection. Benchmarks are promising.
https://blog.aheymans.xyz/post/emacs-tramp-rpc/ is my blog post about it.
https://github.com/ArthurHeymans/emacs-tramp-rpc/ is the code.
Let me know what you think!
https://redd.it/1qecqbs
@r_emacs
Why are the nerd icons not showing up in the Completions buffer when I execute the command "completion-at-point"?
So I was for a fair bit of time using Vertico and Corfu for minibuffer completion and in-buffer completion respectively but after watching one of SystemCrafters' live streams on the default completions in Emacs recently I decided to try out the default completions for myself and see how it goes. I am not talking about icomplete or ido modes, to be clear. After some minor configurations I am pleasantly surprised at how usable it is for my needs.
However I have noticed something rather unusual about the way nerd icons is interacting with the completions buffer. When I perform regular minibuffer completion, such executing a command, finding a file, switching to a different buffer, using the built in Emacs help system, etc. the nerd icons are rendered next to the entry. This makes sense, since I have nerd icons as well as nerd icons completion installed. However if I hit "C-M-i" inside a buffer and subsequently pop up the Completions buffer, I have noticed that the nerd icons are not rendered properly.
This does not make any sense to me since in other contexts the very same Completions buffer renders the icons perfectly. Not to mention that I have other packages like nerd icons dired, nerd icons ibuffer, etc. enabled and the nerd icons are certainly showing up there just fine. What is unique about the in-buffer completion that is causing this discrepancy? What would I need to do to make the behavior of nerd icons in the Completions buffer more consistent?
https://redd.it/1qe758t
@r_emacs
Eglot with multiple LSP servers per buffer using rassumfrassum
https://www.rahuljuliato.com/posts/eglot-rassumfrassum
https://redd.it/1qe074f
@r_emacs
[ANN] Emacs Docs: An Emacs documentation website with more colors (and shortdoc cheat sheets, and also docstrings, and elisp-demos examples...)
https://doc.emacsen.de/
https://redd.it/1qds62d
@r_emacs
Best LLM for building Emacs
I have been using ChatGPT to help customize and build my emacs. Not going to lie it sucks. Its right about half the time the other half its trying to gaslight me into believing I keep pressing the wrong commands or giving me lisp that isn't correct. If there a better one?
https://redd.it/1qdn6p6
@r_emacs
Old New Stock: Grouping and navigating buffers using Torus
https://github.com/chimay/torus
I've tried many ways to arrange my buffers, and they're alternately too complex and not advanced enough. I tried to use emacs' built-in tab functionality for a long time. I used Bufler for a while, and it's legitimately great, but I never came up with a work scheme that was easy to use. (I may yet go back to it, this exercise with Torus has made me realize that I have some keys on my keyboard that I never use inside emacs. But I digress.)
I've also tried some of the other packages out there that want to handle not just my buffers but also my window layouts. I tried perspective years ago but wasn't happy with it, even though it sounds like it should be exactly what I'm looking for.
Torus does (most? All?) of what I want. I can add buffers to a group. I can cycle through that group (circle), search just that group, or search all the groups. I can create super-groups (toruses) but so far I really just need one. I can search within the circle, or search all the circles in the torus. I can add buffers to multiple circles.
That sounds complicated but it's really just three hierarchies: torus->circle->location
There can be multiple toruses, multiple circles inside a torus, multiple locations inside a circle. A location (file . position) is not exclusive to any hierarchy; you can include it as many places as you need.
So what's the practical upside of this? How is it any better than any other way of organizing files? Why am I on about this?
I'm a game dev and I work in Unreal, and I end up opening about a zillion files even when my core work is in just 5 or 6. No matter how many buffers I have open, I currently only want to focus on those 5 or 6 files, but they get lost in the noise of all the other buffers. Even Bufler can't really save me from that, because all the Unreal buffers are in the same project. (This is not quite true--Bufler is more than flexible enough to let me do this, but the auto-grouping it does collects too many files. I may be drowning only in Unreal files instead of Unreal + Everything Else, but I'm still drowning.)
The other thing I'm doing throughout the day is modifying my configs because I'm an emacs user and I'm never happy. :)
I just have a couple circles at the moment, so I only need one torus, but I could conceive of myself needing multiple of each at some point as my work requires me to juggle more components.
Anyway, this package is about 7 years old, it's on MELPA, it works great. Like I said, I'm never happy, so who knows how long this honeymoon will last. But it's neat to try out new-old stuff sometimes.
https://redd.it/1qdawyx
@r_emacs
Opencode UI in emacs
OpenCode is a open source AI coding agent, that makes it easy to use models from any provider through the same agent harness and UI. They implemented an API to drive it, and then the official TUI and web UI are just frontends on top of that API, and I've now implemented an emacs UI on top of the same API. OpenCode also supports ACP, but their own API has a handful of features and extra information not in ACP. There's a couple advantages over just using the official TUI:
1) A better TUI and GUI
Emacs is a mature TUI and GUI framework, that while janky in its own way, is far less janky than the TUIs the new agentic coding tools have written from scratch. This package builds on a solid foundation of comint, vtable, diff-mode, markdown-mode, emacs' completion system, and more, to offer a (IMO) nicer UI. Also if you're an emacs user, the UI is more consistent: goto next or previous prompt, comint-kill-output-to-kill-ring, and everything else works the same as in any other repl or shell based on comint mode, completion and filtering works the same as everywhere else in emacs, and everything is just a text buffer where all your usual editing and other commands work as expected.
2) Emacs integration
- add any emacs buffer to chat context with opencode-add-buffer
- integration with magit is possible, opencode-new-worktree will create a new git branch and worktree for the current project, and start an opencode session in it
- use dabbrev-expand in the chat window to complete long variable or function names from your code buffers
Not much so far, but my initial focus has just been to make a usable UI, while deeper emacs integration will come over time.
https://codeberg.org/sczi/opencode.el
https://redd.it/1qd52mj
@r_emacs
hl-line change color background only for the focus buffer, help!
https://redd.it/1qcyqgp
@r_emacs
HELP setting up Evil + evil-collection in minibuffer
I am trying to enable Evil inside the minibuffer using evil-collection.
## Goal
I want the documented evil-collection minibuffer behavior:
- minibuffer starts in evil-insert-state
- ESC switches to evil-normal-state
- ESC again exits the minibuffer (ESC ESC to quit)
## Problem
Evil does not appear to be enabled in the minibuffer at all.
Normal Evil motions and operators do not work:
- w b e
- dd cc r
Pressing ESC immediately exits the minibuffer.
Running `C-h k ESC` inside the minibuffer shows:
```
<escape> runs the command keyboard-escape-quit (found in global-map)
```
This happens both with and without `evil-collection-setup-minibuffer` enabled.
## Configuration used
```elisp
(use-package evil-collection
:after evil
:demand t
:ensure t
:init
(setq evil-collection-setup-minibuffer t)
:custom
(evil-collection-mode-list '(dashboard dired ibuffer info woman help gnus))
(evil-collection-key-blacklist '("SPC"))
:config
(evil-collection-init)
(evil-collection-define-key 'normal 'dired-mode-map
"h" #'dired-up-directory
"l" #'dired-find-file)
(evil-collection-define-key 'normal 'Info-mode-map
"h" #'Info-history-back
"l" #'Info-history-forward
"o" #'Info-menu))
https://redd.it/1qcn1vm
@r_emacs
Setting up LSPs and Completions: Eglot with Cape and Corfu
Hello everyone, I've been, for several hours, trying to get a grip on how to enable eglot.
My goal is to use Eglot + Cape (because it seems to be necessary) + Corfu. I know that we use Cape to "tell" Corfu which capfs it can show.
So, pretty much the question is, how to add the eglot backend into cape so I can enable corfu completion with Emacs LSPs and Yasnippet.
Bonus question: I know that Emacs ships treesitter natively from versions 29+. Do I need to setup each ts-mode manually or can I make it automatically identify the mode I am and configure a treesitter for me?
For reference in which configuration I'm using, one can see the emacs bedrock since I'm using pretty much the same configuration and haven't touched cape or eglot configuation.
https://redd.it/1qc7f35
@r_emacs
ADHD Dashboard
Ever start to ask a question and realize its way to long :)
Summary
1. have build a large org system
2. Looking to flatting my files.
3. Things are super scattered and not organized the best.
4. Dashboard that is a middle group of low friction but functional
I have been using emacs for probably 6 months now. I love it and might even be a little obsessed with it. one thing that I feel keeps holding me back is my lack of organization.
a huge part of that is having a sold dashboard. Right now I am kinda just using my inbox but that doesn't help with thinks like later projects, links, or even keeping things that have deadlines. I have found this.
https://preview.redd.it/zdfd5phje5dg1.png?width=1594&format=png&auto=webp&s=517918a6224b94c772c4e1b09a565d9c32be6e2a
https://redd.it/1qbwmvl
@r_emacs
Normal to be unable to follow links / display inline images in a read only org buffer?
I have a temporary org mode buffer which is a datetree view on my roam dailies. I want to be able to display images, but I cannot because the buffer is read only. So I was thinking it would be fine to even just be able to follow the links, but C-c C-o does not work (complains about being read only). I can't even do things like C-h k. Is this normal behavior? It doesn't seem right to me.
Any thoughts? My real goal here is to be able to display images. I've even thought about temporarily disabling the read only mode when hitting C-c C-x C-v but it didn't really work. I got it to sort of work by calling my custom function directly using M-x, but it wouldn't work when I assigned it to C-c C-x C-v.
https://redd.it/1qbsegy
@r_emacs
Help a noob out
Hi everyone, happy new year!
I’m a complete Emacs beginner and I’m trying to challenge myself by writing a fresh config from scratch.
Right now I’m stuck on **Corfu + corfu-popupinfo**. My goal is:
* scroll the **popupinfo** window with **C-j / C-k**
* and, if possible, **focus/select** the popupinfo buffer/window with something like **C-h**
Here’s what I’ve tried so far, but it doesn’t work yet:
(use-package corfu
:ensure t
:custom
(corfu-cycle t)
:init
(global-corfu-mode)
:bind
(:map corfu-map
("C-j" . nil)
("C-k" . nil))
(:map corfu-popupinfo-map
("C-j" . corfu-popupinfo-scroll-up)
("C-k" . corfu-popupinfo-scroll-down))
:config
(require 'corfu-popupinfo)
(corfu-popupinfo-mode)
;; Free the RET key for less intrusive behavior.
;; Option 2: Use RET only in shell modes
(keymap-set corfu-map "RET" `( menu-item "" nil :filter
,(lambda (&optional _)
(and (derived-mode-p 'eshell-mode 'comint-mode)
#'corfu-send)))))
What am I doing wrong (and why)?
Thanks a lot for helping me!
https://redd.it/1qbpesr
@r_emacs
Who are some truly proficient Emacs users?
Who are some Emacs wizards who use the program at a very high level? Seeing people like tsoding use Emacs in such an alternate and optimized way really helps me learn new features! Xah Lee (of course a wizard in his own right) has compiled a list of famous Emacs users here.
https://redd.it/1qal1pj
@r_emacs