r_emacs | Unsorted

Telegram-канал r_emacs - /r/emacs

70

This channel is a feed for r/emacs. @r_channels @reddit2telegram

Subscribe to a channel

/r/emacs

Will using Emacs give you an edge in the AI-era?
https://www.youtube.com/watch?v=ePH3u7lmFWU

https://redd.it/1s8m35w
@r_emacs

Читать полностью…

/r/emacs

Non‑Emacs person accidentally built a GTD thing in org‑mode 😅
https://redd.it/1s86q3t
@r_emacs

Читать полностью…

/r/emacs

use-package extension does not respect :if

Anyone here with some expertise on extending use-package? I have this :select keyword that makes use-package forms in my init file add the packages to the package-selected-packages variable. However, some packages should only load on eg. Linux and hence do something like:

(use-package vterm
:if (eq system-type 'gnu/linux)
:select)

The issue is that executing the above on a Windows system, which obviously makes the :if predicate nil, still the :select keyword is handled.

The :select keyword is added to use-package-keywords *after* the :unless keyword, so should be processed after those.

Here is the code for the handling of the :select keyword itself:

(defalias 'use-package-normalize/:select 'use-package-normalize-predicate)

(defun use-package-handler/:select (name keyword arg rest state)
(let ((body (use-package-process-keywords name rest state)))
(if after-init-time
(add-to-list 'package-selected-packages name)
(add-to-list 'package-ext--init-selected-packages name)
(add-hook 'after-init-hook #'package-ext--save-init-selected-packages))
body))

Any ideas?

https://redd.it/1s812qm
@r_emacs

Читать полностью…

/r/emacs

Announcing Anju
http://yummymelon.com/devnull/announcing-anju.html

https://redd.it/1s7un9y
@r_emacs

Читать полностью…

/r/emacs

tree-sitter based syntax highlighting doesn't work with pgtk?

Hi guys,

I have some issue with tree-sitter and syntax highlighting. On one of my emacs setup, syntax highlighting for 'csharp-ts-mode' works. It doesn't have pgtk.

But on the other emacs, which is on another machine and has pgtk, syntax highlight works for 'csharp-mode', but is mostly broken. By mostly broken, I mean some of the tokens seem to be highlighted correctly, but most of them don't seem to have any highlight effects.

Both emacs are v30.1, have the same init.el files. I also tried with 'emacs -q' and only test csharp-ts-mode, and I got the same result.

Any idea why it tree-sitter based syntax highlighting could fail?


Thanks.

https://redd.it/1s7la8z
@r_emacs

Читать полностью…

/r/emacs

Is there a reliable signal anywhere in Emacs where I can execute some code when any part of a frame changes?

I'm working on an experimental package. I'm using the x-export-frames function to save the current frame as a png file, and I need a sequence of images. I want to be able to trigger this as soon as something in a frame changes. I could do it as a hack, by using after-change-functions, first-change-hook, post-command-hook, activate-mark-hook, minibuffer-setup-hook, etc. but that is not a very reliable approach because I may end up with duplicate images. A changed frame could be anything - character added/deleted, icon change, modeline change, mini buffer, fringe, image display - literally anything that might change like even a single pixel.

I thought the best way would be to modify something in Emacs core itself. Looking at xdisp.c has been overwhelming, and although I see many functions that get called before display, I am not seeing any function that is guaranteed to run only once per change at the frame level.

Anyone have any tricks to suggest?

https://redd.it/1s7l2q3
@r_emacs

Читать полностью…

/r/emacs

SVG library for the creation of tags, progress bars and icons
https://redd.it/1s7jzop
@r_emacs

Читать полностью…

/r/emacs

Anyone considering the Unihertz Titan / Titan 2 for using Emacs on your phones?

I've always had a hard time using Emacs on a touchscreen keyboard on my phone. Since Unihertz has been working for the past year or two in Blackberry-like phones, have any of you been considering it?

https://redd.it/1s7dk9z
@r_emacs

Читать полностью…

/r/emacs

Google Sheets anyone?

https://redd.it/1s6x9gk
@r_emacs

Читать полностью…

/r/emacs

Two fixes for git-gutter and one for Emacs xdisp.c left-margin rendering

I spent some time tracking down why git-gutter's gutter column looked visually inconsistent when using themes like modus-operandi or modus-vivendi and factually wrong when enabling visual lines (a.k.a. soft wrap). It ended up going deeper than expected.

* [https://github.com/emacsorphanage/git-gutter/pull/247](https://github.com/emacsorphanage/git-gutter/pull/247): Documentation explaining how to theme the gutter column background, including a non-obvious gotcha (the face background has no effect unless a sign character is configured).
* [https://github.com/emacsorphanage/git-gutter/pull/248](https://github.com/emacsorphanage/git-gutter/pull/248): Correctness fix for visual-line-mode: git-gutter indicators were appearing on the wrong lines — continuation rows of a wrapped changed line showed the change indicator, making unchanged lines look changed while the actual changed line's continuations were unmarked. This fix was inspired by reading src/xdisp.c source code and replicating the same pattern in git-gutter for visual lines.
* A patch to Emacs itself (src/xdisp.c) fixing a related issue: empty left-margin characters were filled with the frame default background instead of the line-number face, breaking the uniform column appearance in both TTY and GUI frames. The patch can be sourced from this [link](https://github.com/alberti42/fork-emacs/commit/452a08650adcdfe79cccc0f1560770beb2599d9d.patch) (related branch: [https://github.com/alberti42/fork-emacs/tree/fix/gutter-background](https://github.com/alberti42/fork-emacs/tree/fix/gutter-background)).

The last one is my first contribution to GNU Emacs. Fingers crossed.

Before the fixes:

[git-gutter before the fixes](https://preview.redd.it/5opk3lof5zrg1.jpg?width=1778&format=pjpg&auto=webp&s=a0942d173dea651f7c99ae07c71c138d462d3a30)

After the fixes:

https://preview.redd.it/ft6s5ncb7zrg1.jpg?width=1770&format=pjpg&auto=webp&s=8b4b8e2b7ce1fd49040c55ac9e917b8973c7b6ad

Additional note for Emacs Plus users:

If you want to try it, you can apply the xdisp.c patch by configuring your `build.yml`:

patches:
- left-margin-background-fix:
url: https://github.com/alberti42/fork-emacs/commit/452a08650adcdfe79cccc0f1560770beb2599d9d.patch
sha256: a5a5bc186c5138b846ee97d77d4729513eff4d8326450019096fcf2fd9875347

PS: I realized too late some typos in the first screenshot. Here is the erratum:

* "WE MISS GIT-GUTTER SIGNS ON VISUAL LINES AND THEY ARE WRONGLY PLACED ON THE BOTTOM LINE WHICH IS UNCHANGED" → "WE MISS GIT-GUTTER SIGNS ON VISUAL LINES AND THE APPLIED SIGNS ARE WRONGLY PLACED ON THE LINE BELOW WHICH IS ACTUALLY UNCHANGED"
* "THE REMOVE THE WHITE STRIPE IN THE LEFT-MARGIN BELOW REQUIRED PATCHING xdisp.c" → "TO REMOVE THE WHITE STRIPE IN THE LEFT-MARGIN BELOW REQUIRED PATCHING xdisp.c"

https://redd.it/1s6tf2m
@r_emacs

Читать полностью…

/r/emacs

If you don't use a computer for 3 months, what percentage of your keybindings will you forget?

Just curious if you have a system for deciding what keybindings to set and then form a habit around it or if you will forget them if not used for a long time.

https://redd.it/1s6iklk
@r_emacs

Читать полностью…

/r/emacs

Major refactor to subtree-package: transient support added, execution engine rewritten and diff feature added (version 0.11.8)
https://redd.it/1s6d79r
@r_emacs

Читать полностью…

/r/emacs

Emacs as a programmable workbench
https://www.birkey.co/2026-03-28-emacs-as-a-programmable-workbench.html

https://redd.it/1s6j2ac
@r_emacs

Читать полностью…

/r/emacs

org-transclusion of outline-mode sections

https://redd.it/1s00gv6
@r_emacs

Читать полностью…

/r/emacs

Is there something like vertico's minibuffer completion/suggestion list, but built-in in Emacs?

I have tried fido-mode, but it shows everything on the same line and is unreadable, unlike how vertico shows it in separate lines. It does not show associated keybinds either.

https://redd.it/1rztoil
@r_emacs

Читать полностью…

/r/emacs

Any thought for reka ? An Emacs-based window manager for river / Wayland.

Some years ago I heard about an attempt to make a wayland compositor like exwm (eww), but the progress seems unclear. I just read about reka and it seems interesting. Link : https://code.tvl.fyi/about/tools/emacs-pkgs/reka

https://redd.it/1s8gdwi
@r_emacs

Читать полностью…

/r/emacs

Make the left margin shine!
https://redd.it/1s83i2i
@r_emacs

Читать полностью…

/r/emacs

Tiny package, may come handy
https://github.com/agzam/occult.el

https://redd.it/1s7xiti
@r_emacs

Читать полностью…

/r/emacs

Emacs Daemon-Client setup not working

I have setup Doom Emacs on my Debian 13 install with Niri Window manager. I had emacs --daemon setup to launch when I logged in and I was connecting to it with `Emacs (Client)` launcher desktop file or by running emacsclient -c in the terminal. This was working at first and then suddenly stopped working.

I have looked into it and apparently it has something to do with a Gtk bug that hasn't been fixed since 2012?

Is my thinking correct on this? How do you guys use emacs daemon + client? Do you guys just use emacs-nox and use terminal emacs?

https://redd.it/1s7sq4c
@r_emacs

Читать полностью…

/r/emacs

Seeking distro recommendations for Emacs/Org-mode on a budget Chromebook (Dell 3180)

i everyone,

I'm fairly new to the Emacs world, but I've already started using Org-mode and it has been a perfect fit for my workflow so far.

I currently own a Dell Chromebook 3180 (Intel Celeron Dual Core, 4GB RAM). I am considering replacing ChromeOS with a Linux distribution to use it as a dedicated Emacs machine. Since the hardware is a bit limited, I’m even thinking about a headless setup (no GUI) or a very minimal CLI-only environment to keep it snappy.

Does anyone have a specific recommendation for a lightweight distro that plays well with this hardware? My main goal is a stable and distraction-free environment for Org-mode.

Thanks in advance for your help!

https://redd.it/1s7la6h
@r_emacs

Читать полностью…

/r/emacs

startup-redirect-eln-cache is not always consistent and I'm not able to debug it

I want to have my eln cache files in ~/.config/emacs/.local/eln-cache.

Originally I tried this in early-init.el:


(startup-redirect-eln-cache "/home/user/.config/.local/eln-cache")


That works but sometimes it still randomly goes go the default location, so I tried overriding the startup-redirect-eln-cache function itself, like this:


(defun startup-redirect-eln-cache (&optional )
"Redirect the user's eln-cache directory."
(when (featurep 'native-compile)
(setq native-comp-eln-load-path (cdr native-comp-eln-load-path))
(push "/home/user/.config/.local/eln-cache" native-comp-eln-load-path)))


This works as well but I still have problem getting it to use that directory consistently. I have not found a way to reproduce this consistently, and I'm not sure what in Emacs is actually causing it to go to the wrong location. If I describe the `native-comp-eln-load-path` variable, I see the correct path, so I have no idea why it is going to default path sometimes.

Most of the time, it's these files:


eln-cache/30.2-d3a47193/subr--trampoline-657865637574652d6b62642d6d6163726f
executekbdmacro0.eln
eln-cache/30.2-d3a47193/subr--trampoline-726561642d63686172
readchar0.eln



https://redd.it/1s7k1s2
@r_emacs

Читать полностью…

/r/emacs

Dumb question about adding a elisp script from a repo to my own repo
https://redd.it/1s7fl3m
@r_emacs

Читать полностью…

/r/emacs

Is emacs docs gone for good?

I liked emacs docs (emacsdocs.org), which made the docs easier to read and had a dark mode. I've been checking it all day and it has been down. I'm not sure when this started, I definitely was looking at it last week though.

https://redd.it/1s7cupy
@r_emacs

Читать полностью…

/r/emacs

Beginner here

So intimidating.

I don't want to use Doom. I tried it, uninstalled it.


Did Bedrock.

But, I want an "assisstant" or something inside it. (Not an LLM, just some GUI that displays shortcuts, and perhaps a proper GUI??)


I want to use it for coding, unifying my stuff...
Anything suitable for beginners, to reap some benefits without the blank wall?

https://redd.it/1s673o6
@r_emacs

Читать полностью…

/r/emacs

The new TRAMP alternatives are probably not worth it

Hey everyone, I spent an afternoon benchmarking tramp-rpc and flit.el against stock TRAMP and wrote up the results.

TL;DR: with SSH ControlMaster (which TRAMP already uses), the gap is way smaller than I expected. Cached operations are very fast on all three so the backend basically doesn't matter there. The one thing that surprised me is that flit actually makes magit slower than stock TRAMP.

I genuinely think both projects are cool. I just wanted honest numbers before committing to deploying another binary on all my remote hosts. If you're on high-latency connections the story is probably very different.

Article: https://polyedre.github.io/posts/benchmarking-tramp-backends/

https://redd.it/1s6t15d
@r_emacs

Читать полностью…

/r/emacs

Simply Annotate 0.9.8: Threaded Conversations on Your Code
https://redd.it/1s6qnxk
@r_emacs

Читать полностью…

/r/emacs

Can that yellow vertical rectangle from C-x SPC C-n be made thinner so the letters don't shift too much?
https://redd.it/1s6grma
@r_emacs

Читать полностью…

/r/emacs

Fortnightly Tips, Tricks, and Questions — 2026-03-24 / week 12

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.

https://redd.it/1s229ve
@r_emacs

Читать полностью…

/r/emacs

temme-mode — a clean rewrite of emmet-mode (WIP, feedback welcome)

I've been working on [https://github.com/Lycomedes1814/temme-mode](https://github.com/Lycomedes1814/temme-mode), a from-scratch rewrite of emmet-mode. The goal is to keep the same Emmet abbreviation syntax people know but with a clean, modern codebase — single file, lexical binding, recursive descent parser, \~900 lines total.

What works today:

* Tags with #id, .class, \[attr\] shorthands
* Child (>), sibling (+), climb-up (\^), grouping ((...))
* Multipliers (\*3) with $ item numbering and zero-padding ($$)
* Text nodes ({Hello World})
* lorem / lorem10 placeholder text
* Built-in snippets — ! (HTML5 boilerplate), btn, a:link, link:css, input:text, form:post, script:src, ul+, and more
* Snippets are composable: btn.primary{Submit} → <button class="primary">Submit</button>
* Field navigation after expansion (TAB/S-TAB to cycle through fillable attributes and content)
* Self-closing void elements

What's still TODO:

* Implicit tag resolution (ul>.item → li)
* Wrap with abbreviation
* CSS abbreviations
* Filters (|e, |c, |s, |t)
* Custom user-defined snippets

Why rewrite instead of fork? emmet-mode works, but the codebase is hard to extend — it predates lexical binding, has a complex multi-pass architecture, and is currently unmaintained. I wanted something I could understand end-to-end and hack on easily. The whole thing is one file with a straightforward parse → render → insert pipeline.

Requires Emacs 27.1+. Not on MELPA yet — install from the repo for now.

Would love feedback on what's there so far, what features you'd prioritize, or if you hit any bugs. Issues and PRs welcome: [https://github.com/Lycomedes1814/temme-mode](https://github.com/Lycomedes1814/temme-mode)

https://redd.it/1rzuguk
@r_emacs

Читать полностью…

/r/emacs

agent-shell-notifications released!
https://github.com/zackattackz/agent-shell-notifications/

https://redd.it/1rzpwmr
@r_emacs

Читать полностью…
Subscribe to a channel