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

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

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

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

/r/emacs

Yet Another Emacs Theme Gallery
https://redd.it/1r096eb
@r_emacs

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

/r/emacs

how do YOU do fonts?

a little introduction: I'm a guix and exwm "live in Emacs" guy. I'm trying to find the best way to find and select a new font. Somehow I've settled on changing the (default face to a new font, but I see some people editing a frame font variable, and others changing a system variable via .xprofile. How and why do you apply a new font?

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

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

/r/emacs

emacs4Life
https://redd.it/1qzfl05
@r_emacs

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

/r/emacs

Help Auctex preview-latex not working.

I recently switched over to openSUSE and my Auctex preview-latex function stopped working.

It would complain abut missing pdf3dsc package.

I found this mailing list discussing the removal of pdf2dsc from gs.
It mentions it should have been added back , marked as "unsupported" in version 10.6.0. I do have this version but still no pdf2dsc package.

Auctex manual mentions about configuring dvipng as the backend for making inline previews.


What I Tried:

I have the following in my config.el



>(setq preview-image-type 'dvipng)

>(setq preview-scale-function nil) ;; This was suggested by AI, previews wont work otherwise.
(setq TeX-PDF-mode nil)



This allows me to generate inline previews.
However I can no longer generate/view the pdf file (C-c C-c or C-c C-v)
Turning of TeX-PDF-mode (C-c C-t C-p) then allows pdf to be generated but this again breaks inline preview functions.

Is there a way to configure both to work in tandem.
I want to generate inline previews using dvipng
I want the master command to compile a pdf file that I can view.

How do I achieve this?

Details:

OS - openSUSE Tumbleweed

Emacs : 30.2
Auctex: 14.1.2
gs: 10.06.0



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

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

/r/emacs

Old Style John Blow Emacs Theme

https://github.com/Prikaz98/jblow-nostalgia

I used an already existing project as a template. Please, do not blame me :D

I have only one reason to post this repository in an Emacs channel. I wonder if someone has looked for this color scheme before and I'll be happy if this project covers their wishes.

Thank you!

https://preview.redd.it/c1cp16f4b2ig1.png?width=1920&format=png&auto=webp&s=58f165f50790303ba2fba0608789f8b1a666c94e

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

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

/r/emacs

TILES: yet another note-taking app package

I’ve used a few note-taking apps over the years, and while I can appreciate their individual features (all of them pack some really interesting concepts), none of them suited what I needed. Some came really close: Denote (with Denote Org) and Howm, but I wanted something else, something made for me that doesn’t have features that get in my way.

What do I need? A system where notes have no titles, just a single paragraph. I also wanted my notes to have a hierarchy based on tags and to be able to stitch them together. Being able to use them from Org Mode’s Dynamic Blocks is also a nice feature, especially since I use my notes in other documents. And I wanted to have the fewest dependencies possible. For portability and for being future-proof, the notes should be plain text, with some markup (and Org Mode format is the best, IMHO), but honestly this is a feature most apps and packages already have.

TILES doesn’t have a specific link system (beyond Org Mode), no backlinks, no encryption, no database, no graphs, or no sync (unless you’re using a separate tool for that, since notes are simple text files).

Since now we have tools like Claude, I decided to give it a go, describe what I needed, and see what it could come up with. I’m really satisfied with the results so far. I’m using this package for myself, and I’ve put it on GitHub if others want to take a look, but because I don’t want to pollute MELPA with AI-generated code, I won’t release it there.

Here’s a list with TILES main features:

* focus on one paragraph (like Logseq): one paragraph = one note;
* offers a bird's-eye view (quick preview) of recent notes (similar to Howm);
* quick note preview, quick note edit;
* color coding depending on the note's age (sort of like Howm, but not really);
* title-less, to reduce friction (why have to stop the thought process to create a title that’s never used afterward?);
* can use the Dynamic Block features in Org Mode (like Denote and Denote Org), ideal if you want to use your notes to create other documents;
* can stitch notes together after applying a search filter (like Howm, ideal if you would like to use your notes to create other documents);
* uses tags for hierarchy but also uses bold keywords (extracted automatically from words that are marked as bold in the note’s content);
* search after tags and/or keywords only (who really wants to search for anything else?);
* no external dependencies are needed, except at least version 27.1 of Emacs and Org Mode (built-in);
* uses Org Mode format for bold, italic, links, in-line footnotes.

[GitHub link](https://github.com/ctanas/tiles/). Thank you for reading this, and thank you in advance for any feedback!

https://preview.redd.it/2sqh931xe2ig1.png?width=2916&format=png&auto=webp&s=f2f8070ff8d97a658d8f9c7719f6055ab5b935c8

https://preview.redd.it/yelic41xe2ig1.png?width=2912&format=png&auto=webp&s=dfc2eb13f5d0ad68fcb60ac06218e518feb483f8

https://preview.redd.it/wrkfn31xe2ig1.png?width=2906&format=png&auto=webp&s=54cce25278299d144240cb9a725142595bcde0d9



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

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

/r/emacs

How to jump to the next elif/else at the same indentation level in python-mode?

if a > 10:▇
# lengthy code omitted...
pass
elif a > 5:
# lengthy code omitted...
pass
else:
pass

In Emacs python-mode, if my cursor is on the first if line, I want a command to move to the next sibling block (e.g. jump to elif, then else), staying at the same indentation level.

M-e tends to move into the inner statement/block in ways I don’t want.

What commands do you use for this kind of navigation?

Any recommended “nice” key bindings for it?

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

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

/r/emacs

(ANN) NEOMACS: Use Rust to rewrite the Emacs display engine in modern way, so that Emacs can render 4K images in Buffer and play 4K videos

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

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

/r/emacs

Which minibuffer completion package actually supports tab only or tab-and-go style completion?

By 'tab only' I mean vscode or company-tng like behavior, where

* Candidates are always visible
* Pressing tab once inserts the first candidate to the minibuffer, but keeps the list intact
* Pressing tab again cycles through the list, changing the inserted candidate
* Pressing shift+tab cycles backwards and inserts the candidate
* Pressing any other character effectively decides the selection and moves on with the next set of candidates

So far, I've been trying vertico which didn't have proper support for this (see: https://github.com/minad/vertico/issues/143) and the built-in icomplete which works like this but lacks shift+tab support (I think) and cannot be integrated into evil.

Any suggestions?

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

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

/r/emacs

Eglot Faster after Refreshing Buffer

Hi everyone, I recently started working with a Typescript project and found that Eglot was causing my buffers to be very slow and laggy. I looked into ways of solving it and found emacs-lsp-booster and eglot-booster, and I also tried the changes described in this post on reddit, but in the end I found out that the best improvement to typing speed came from simply refreshing the buffer I'm in, and this happens even when I have just started working in a file in a newly created Eglot session. Has anything seen this type of behavior? I basically start emacs, open a typescript file and see Eglot load, and then notice that typing is laggy. If I then refresh the buffer, typing becomes snappy. Curious to know if anyone else is seeing this.

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

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

/r/emacs

How I kickstart a new sprint in emacs (using org capture template)

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

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

/r/emacs

Nvim user migrating/trying out Emacs

What are some tips for me, I have been using Doom Emacs so far for about 3 months I don't know where to start to remember the keybinds and the environment is so much different. Evil mode is very useful for vim motions

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

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

/r/emacs

How to disable treesitter

I have a bunch of warnings whenever I open files about the treesitter gramma for them not being installed however I am blind and have no use for treesitter as from what I can tell, it is just used for syntax highlighting which is rather pointless for me.
I can't find a simple way to disable it however, there doesn't seem to just be a single treesitter-mode or something though I'm most likely just missing something obvious and Most of what I can find online is about how to activate it.
I assume lsp or some related package is activating it, though I also read that it's now built into eMacs.
Does anyone have any advice? I'd rather not have to dig into package internals to reverse how they're activating it.

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

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

/r/emacs

why does GTK emacs use these gnome icons in the toolbar instead of the normal ones and how can i make it not do that?

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

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

/r/emacs

outline-indent.el - A modern indentation-based folding mode for Emacs (Release: 1.1.7)
https://github.com/jamescherti/outline-indent.el

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

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

/r/emacs

What is there to like?

I really like (not to say love) emacs.

But since a while I'm wondering why?

Why is emacs so appealing (at least to me :-))

I could only come up with:

1. Simplicity: Without a lot of study you can quite easily work with emacs
2. The nerdiness: I work in a Microsoft Office oriented world. To me it feels quite good to be a little different. Emacs fits that picture in my workplace.
3. The endless possibilitys/add-ons
1. org-mode
2. org-roam
3. ellisp itself

I wonder...what do you people really love in emacs which you can not find somewhere else?



Regards,

mostly_text

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

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

/r/emacs

A little library: system-idle

README: https://github.com/meedstrom/system-idle

Now on MELPA

If anyone knows some trick by which a library like this isn't actually necessary, let me know! Share your dark secrets!

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

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

/r/emacs

Emacs and VScode

Has anyone tried combining Emacs and VScode. I love using emacs for my notes and working in files, but I feel like VScode might be better for my testing and prototyping.

Yes I know I can do everything in Emacs but I would have to config for each language and types of test I do. Seems like it would be smoother to just use VScode for Testing and everything else in Emacs.

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

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

/r/emacs

Weird, unresponsive scrolling

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

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

/r/emacs

What is the latest version of tree-sitter known to work with Emacs 30? The current version is 0.26.5

I tried compiling the emacs-30 git branch and emacs-30.2 tag with tree-sitter support and both compilations failed with the error message at the linking stage.

treesit.c:749: undefined reference to 'ts_language_version'

treesit.c:820: undefined reference to 'ts_language_version'

The Emacs master branch compiled OK, though I haven't run it in anger and tested tree-sitter.

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

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

/r/emacs

Resnippets.el - snippets with regex

Hello, folks! After spending more time than I should on the legendary post of Gilles on taking notes with Vim and Karthink answer, showing as much speed as Gilles, I've noticed that emacs doesn't have a snippet package that defaults by expanding on regex. Being necessary or not is a valid question, but now at least we have the option.

Introducing resnippets.el, the engine that expands based on suffix. You can replace fhat to \hat{f} automatically, fix typos like \\([a-zA-Z]+\\)cao to \1ção (matching cases and priority for cao -> cão, for example).

I'm aware that we have tempel, yasnippets, auto-expanding-snippets, abbrev and surely something else, but I did not find anything regexp-like.

It was entirely done with an LLM agent, which I suppose it's a big no-no to some, but in my testing, it does not slow down emacs at all.

It is auto-expanding only yet. I have not implemented a TAB completion. But it was made so I did not have to press a million tabs while writing math.

I'm accepting changes and critics! Check it out, test it out and give me your opinions! If you need a default set of some snippets to start it out, check here

GitHub: https://github.com/morazotti/resnippets.el

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

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

/r/emacs

Toggle between let and let

You know the drill. You start writing a `let` form and, after writing a variable or two, you realize that one of them depends on another and you actually need `let
. Or, probably less often, you're writing a let` and realize that none of the variables depend on each other, and you can just use a regular `let`. Here's a handy helper command for those scenarios:

(defun toggle-let
()
"Make the closest enclosing let or let form a let or let form, respectively,
then reindent that form's bindings. "
(interactive)
(save-excursion
(while (progn
(condition-case nil (backward-up-list nil t) (scan-error (error "Not within a let form")))
(not (search-forward-regexp (rx point "(" ( space) "let" (? "") symbol-end) nil t))))
(if (= ? (char-before)) (backward-delete-char 1) (insert ""))
(indent-region (point) (progn (forward-sexp) (point)))))

It took me way too long to scratch this itch!

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

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

/r/emacs

C++ dev navigating code issues

I started working on a huge c++ project. And the approach that I always take is to do

bear -- make

And generate a compile_commands.json and use lsp with clangd.

Now I face weird issues where I can't go to definition for many things including almost all the function calls of an object. I have to go to definition of the object first and search the method myself, which is frustrating.

The code base uses qmake and it heavily uses qt framework. Idk if that could be the reason for those issues.

What other approaches to have a better experience navigating the code without any issues ?

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

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

/r/emacs

Executive Function as Code: using (Doom) Emacs to script my brain
https://milly.kittycloud.eu/posts/executive-function-as-code-doom-emacs-adhd/

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

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

/r/emacs

NEWBIE NEEDS BASIC HELP

https://preview.redd.it/tqj80026huhg1.png?width=1141&format=png&auto=webp&s=203eb8035a2c6889d8f8aafbe2fa7cbb6d750f59

How can I scroll through the doc from completion?
in neovim nvim-cmp or blink.cmp I just use Ctrl+D and Ctrl+U for scroll down/up

I use these config in doom:

:completion
(corfu +orderless) ; complete with cap(f), cape and a flying feather!
vertico ; the search engine of the future

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

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

/r/emacs

Declarative, reproducible Emacs – video/blog
https://www.youtube.com/watch?v=DnCkMpBkDp4

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

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

/r/emacs

Does anyone here use org modern or other packages to improve emacs aesthetic?

https://preview.redd.it/3oq3shh33shg1.png?width=1350&format=png&auto=webp&s=114306e382d923a84896bc9252547453886f5b89

I'm using org modern, and it looks clean except for the *** header. No clue why it's like that.

What do you guys use, and what kind of problems have y'all encountered?

I want to know if there are alternative packages or solutions to my problem but also a convo on the look of emacs.

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

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

/r/emacs

Leader-key layout without vim motions (non-modal)

Hello, emacs beginner here.

TLDR: I want to have Spacemacs-style categorized keybindings, but without vim-style modal editing. Is there some package or a config I can borrow that can do that?

Full version: I like the idea of having keys neatly organized into categories with a popup, like Spacemacs does it. And I mostly figured out how to do it (set up leader key; group keybindings into categories like "f for file", "b for buffer" and such; use which-key for info popup), but I don't want to do it all by myself because it will take forever, and I'm not even that familiar with all the functions to begin with.

So I thought I could use Spacemacs or Doom, but the problem is I don't want to use vim motions and modal editing, and more than that I want to use more conventional keybindings like C-c for copying, C-f for searching, C-s for saving and such. Reasons being:

\- I'm on Windows now, and I'd rather keep things consistent (also installing Spacemacs or Doom seems like quite a pain in the bun on Windows).

\- I use other software for work, and it will be really confusing with different keybindings for these functions.

\- I want to use Emacs as a substitute for Obsidian (note keeping) and Sublime (general text editing and light code editing).

\- I won't use Emacs for serious coding anytime soon and will stick to my IDE for now. So I don't really need to zap around my text with a speed of light.

\- I will use mouse quite a bit for copying and pasting text to and from other software, so two hand on the keyboard at all time is not possible


Any advice pointing me in the right direction is appreciated.

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

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

/r/emacs

Problem with batch mode

I want to run an elisp function as part of a shell script. It opens a file, makes a change, and writes it as a new file. Here is my CLI invocation:

/usr/bin/emacs INPUTFILE --batch -l MYLIB.el

Everything runs but it never output my new file. The lisp file has a few defuns but at the end there is a form to evaluate one of the functions. MYLIB.el looks something like this:

(defun myprocess ()
(interactive)
(do-some-stuff)
(save-buffer))

(myprocess)

It works fine if I open the file in emacs and run the lisp interactively.

Also, is there a way for (message "foo") to send foo to stdout?

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

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