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

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

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 = MetaL
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!

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

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

/r/emacs

Org files on a OneDrive cloud drive


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"



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

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

/r/emacs

[Patch] Implement preedit text rendering for Windows
/r/emacs/comments/1vblcgr/patch_implement_preedit_text_rendering_for_windows/

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

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

/r/emacs

grid-table 0.3.0: editable tables with horizontal and vertical merged cells for Emacs and Org
https://redd.it/1vbkk1h
@r_emacs

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

/r/emacs

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

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:

https://preview.redd.it/4zlpcmp1wggh1.png?width=522&amp;format=png&amp;auto=webp&amp;s=c7a46a2ab5dcf9b3044faac328d39d64cf9920f0

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!

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

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

/r/emacs

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

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.

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

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

/r/emacs

Vim/Emacs: skills you've carried over from the latter to the former
/r/vim/comments/1vafucx/vimemacs_skills_youve_carried_over_from_the/

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

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

/r/emacs

Flycheck 38 is out with built-in Eglot support, inline diagnostics, and a native LSP client

Flycheck is back! I just released Flycheck 38, and it's easily the biggest release since I took over the project. The short version:

\- Eglot support, finally built in. global-flycheck-eglot-mode routes an LSP server's diagnostics through Flycheck - the error list, navigation, the fringe, all of it - so you no longer need the third-party flycheck-eglot package.

\- Inline diagnostics out of the box (flycheck-annotate-mode) - error messages shown right next to the code they refer to, VS Code Error Lens style, with a few layouts to pick from.

\- A (minimalistic) native LSP client. Flycheck can now talk to a language server directly, over Emacs' built-in jsonrpc, with no Eglot or lsp-mode involved - great for the growing pile of linters that ship their own LSP server (RuboCop, Ruff, Biome, Harper...).

On top of that: fixes you can apply with a keystroke (C-c ! f), project-wide diagnostics in the error list, syntax checking over TRAMP, and a fair bit more.

I wrote the whole thing up, with screenshots, here.

It's on MELPA and NonGNU ELPA now. Would love to hear what you think - especially from folks who'd quietly written Flycheck off as "done". ;-)



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

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

/r/emacs

Kakoune recipe using hel-mode https://github.com/helheim-emacs/hel/

The hel-mode is so good, but I prefer kakoune bindings with some things that are like from Emacs more. I made this simple config, to have more a kak behavior instead of helix. [https://codeberg.org/johndoeuserr01/kakoune-in-helix/src/branch/main/kak-rcp.el](https://codeberg.org/johndoeuserr01/kakoune-in-helix/src/branch/main/kak-rcp.el)

Also I dont like have the hel-mode always active because this mess with the minibuffer and other modes that I will prefer keep with emacs defaults.

So I have this also in my config but I would like to know how to improved it. Thanks to Yuriy Artemyev!

(setq myview 0)
(defun togggle-myhelix-mode ()
(interactive)
(if
(equal myview 0)
(progn
(hel-insert)
(hel-kakoune-mode 0)
(setq myview 1))
(if (equal myview 1)
(progn
(hel-normal-state)
(hel-kakoune-mode 1)
(setq myview 0)))))

(global-set-key (kbd "C-`") 'togggle-myhelix-mode)

(defun go-my-good-mode-update-cursor ()
(cond
(hel-normal-state
;; (setq hel-normal-state-cursor-type 'box)
(set-cursor-color "lime green"))
(t (set-cursor-color "#aaaa3a"))))

(when (display-graphic-p)
(add-hook 'post-command-hook 'go-my-good-mode-update-cursor))

(defun my-view-act ()
(hel-normal-state)
(hel-kakoune-mode 1))

(add-hook 'prog-mode-hook 'my-view-act)
(add-hook 'simpc-mode 'my-view-act)
(add-hook 'Man-mode-hook 'my-view-act)



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

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

/r/emacs

Stripe-buffer does not apply face to entire line

Hello,

I have installed the package Stripe-buffer (on nixos using nix-doom-unstraightened) but the stripe-buffer-mode doesn't apply the background face to the entire line. It is only applied to the text positions with characters. I don't know very much about faces. I wouldn't guess that this is how faces inherently work.


A screenshot of my system

Especially because the repository contains an example where the mode works as expected.

Expected behavior

Is there any fix for this?


Thank you

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

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

/r/emacs

my humble emacs setup
https://redd.it/1v8apwi
@r_emacs

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

/r/emacs

Project-x now on Melpa! (+ window layouts and tabs)
https://melpa.org/#/project-x

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

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

/r/emacs

Two way git sync

I am looking to setup two way git sync between a Mac and Github finally to be consumed on Android on Orgzly.

* Enable automatic Git syncing only for specific folders.
* Pulling changes from Github.
* Automatically pull the latest changes from the remote repository in the background whenever a file or directory is opened in Emacs or Dired.
* Should this be via some script or Emacs running some process on background or when the file is visited.
* How to resolve conflicts?
* Instantly stage, commit, and push changes whenever a file is saved in the editor.
* Automatically commit and push structural file operations performed in Dired, such as creating, renaming, moving, or deleting files.


[**git-auto-commit-mode**](https://github.com/ryuslash/git-auto-commit-mode) can handle the from the file saving side but not from Dired. Also what is the best way to pull.

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

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

/r/emacs

How to include org-mode headers in consult-rg ripgrep search

I have a collection of notes files (.org files) and I recently started retrieving information from them using consult-rg. Is there a way to have consult-rg (or something similar) "propagate" parent headings into children for matching purposes?

For example, if I have this structure:

* Emacs

** Mermaid

Some notes about using Mermaid.

** Customize variables and options

use M-x customize-variable

If I search for "emacs customize variable," consult-rg won't find it, because the header "Emacs" is many lines above the subheader "customize variable".

I considered tagging the subsection with :emacs: but that's kind of a redundant way to say "this is realated to emacs." Redundant because it's already under the overall "* Emacs" heading.

EDIT: consult-org-heading exhibits the behavior I want within headings (the overall Emacs heading gets connected to all of its children), but does not search inside the body, just the headings. So I guess I'm looking for some way to incorporate consult-org-heading behavior into consult-rg?

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

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

/r/emacs

jsonschema-treesit: JSON object key completion using JSON Schema and treesit
https://github.com/lina-bh/jsonschema-treesit/

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

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

/r/emacs

I made an Org Mode Advanced Concepts Tutorial, please check it out
/r/orgmode/comments/1v9kbm7/i_made_an_org_mode_advanced_concepts_tutorial/

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

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

/r/emacs

Emacs terminal ou GUI?

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.

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

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

/r/emacs

Patch Implement preedit text rendering for Windows

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?

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

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

/r/emacs

Anyone using matugen with Emacs?

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.

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

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

/r/emacs

The Completions Buffer Is Now Enough
https://rahuljuliato.com/posts/completions-buffer-is-now-enough

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

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

/r/emacs

md-mode 0.2 — Add LaTeX, Mermaid, PlantUML and Graphviz rendering support

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

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

/r/emacs

Hyperbole Implicit Buttons: Build your Hyperverse
https://www.chiply.dev/post-hyperbole-implicit-buttons

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

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

/r/emacs

Chaining snippets

Hello,

I have been trying to chain snippets on emacs with no success.

As an example, I have the following snippets setup for markdown for neovim:

";sum" -> "\\sum{$1}"
"\\sum{_" -> "\\sum_{$1}\^{$2}{$3" (and the same expansion with "\^" instead of "_")

These two snippets allow me to start a sum, and if I decide that I need the extra sub- and superscripts - include them into the snippet. However, I cannot figure out how to achieve this with the plugins available on emacs - tried aas with the yasnippet syntax, which seems to not be capable of it. From what I gathered, yasnippet is state of the art for emacs?

Does anyone have any solutions that I could steal?

Thanks

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

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

/r/emacs

Using nix-shell in eshell

I'm slowly trying to replace my main shell (fish) with eshell. One pain-point is nix-shell or nix develop on my nixos systems. nix-shell spawns a new shell like bash/fish with a modified env. This works fine in terminals but launching a shell in eshell defeats the purpose of eshell and is just plain broken on my system.


https://github.com/ArthurHeymans/eshell-nix-shell closes the gap a little. It runs the nix shell, captures the ENV and applies the ENV changes to eshell. It does not work in all cases like buildFHSEnv but it does work well with just a simple nix-shell -p #some_package#.

Disclosure: fully made with llm's.

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

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

/r/emacs

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

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/1v8lu7t
@r_emacs

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

/r/emacs

The Prot Effect
https://youtu.be/UiHL45zGNAs

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

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

/r/emacs

Emacs 31.0.91 pretest is available
https://lists.gnu.org/archive/html/emacs-devel/2026-07/msg00270.html

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

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

/r/emacs

New to Emacs/Org-mode: How do you guys read your notes on your phone or other PCs?

Hey everyone,
I recently got into Emacs and completely fell in love with Org-mode for my daily notes and task management on my desktop. Coming from standard note-taking apps, the plain-text system and flexibility are amazing!
However, I’m running into a bit of a wall when I'm away from my main computer. I just need a simple way to read, check my TODOs, or quickly view my Org files on my phone or a work laptop (where I can't install Emacs).
I’ve seen names like Orgzly, organice, beorg, and Logseq thrown around, but as a beginner, the choices and setup options (Git? Syncthing? WebDAV?) are getting a bit overwhelming.
Before I break my setup or sink hours into configuring something, I’d love to learn from experienced users:
1. What tool or app do you currently use when you need to view your Org files on mobile/web?
2. What’s the simplest/most reliable way to sync files back and forth without corrupting them or causing merge conflicts?
3. Are there any major limitations or gotchas with these tools that I should watch out for? (like broken rendering for custom TODOs, tables, or drawers?)
Sorry if this gets asked a lot, but any advice or simple workflow recommendations for a newcomer would be massively appreciated!

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

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

/r/emacs

How do I start using emacs to program something I have already started?

I'm completely new new to emacs and ready to learn how it works, but lack a sense of direction on how to get started, other than watching 11 hours of very long tutorials, which probably contain way more than what I want to know (for now). There's a few things I want to learn:

* How to open a terminal window.
* How to open and edit files.
* How to manange multiple windows (or whatever you call them).

Can someone give me a list with commonly used commands that help with these tasks?

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

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

/r/emacs

is vim motion the final end?

&#x200B;

I have been using emacs and neovim extensively. recently I saw a podcast where two seasoned emacs developers used evil mode. thar made me wondering if vim motions are better for text navigation than everything else?

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

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