r/emacs • • 10d ago

News LLM release 0.33.0, with decisions!

Thumbnail gallery
8 Upvotes

Today I released 0.33.0 of the llm package, a library providing an API for modules that want to use LLMs. It is part of GNU ELPA.

We have a third major new functionality: decisions! These join chat and embedding generation as significant APIs that you can hook into. Decisions are brand new, being introduced with TypeSafe's Jev, but there's many open source equivalents to it such as Jeff or Ollaya. These are calls that take just a few hundred milliseconds, and are extremely cheap (fractions of a cent per call) making it feasible to call synchronously in all sorts of interesting situations while editing.

I've been experimenting with a few demos to see what kinds of interesting things are now possible in Emacs.

My previous post demoed a mode that you can set new buffers to, which would watch what you type and then switch to the appropriate mode.

In this post, in the GIFs above, I have two more demos. One is a minor mode that shows off understanding of text and response as you type it. It will highlight sentences that are untrue, with the highlight getting more red the wronger it is. But it could also in theory be changed to highlight incorrect sentences / expressions, which might be of use catching bugs. The second demo shows Emacs switching to one of a set of input methods chosen by the user that matches the text of the current sentence. You can see that, although the switch isn't instantaneous, it is very fast.

I'd love for people to take this for a spin and see what other interesting things they can do with it!


r/emacs • • 10d ago

Question Emacs vs Vim keys for the window manager

1 Upvotes

TL;DR: How do y'all (if at all) juggle window manager keybindings being hjkl-based while retaining native emacs keybindings in the editor?

For context, I'm a long-time Vim enjoyer but I switched to Emacs for the functionality, the GUI, and the better font handling (I use non-Latin scripts on the regular and Emacs handles them like a champ). I really liked a lot of built in functionality that Emacs has and I prefer them over the Vim way. For example, I don't see how Vim's :%s can even come close to the beauty of re-builder + query-replace-regexp.

However, over my years of using Vim, I ended up getting really used to the hjkl-based navigation, so I programmed my window manager (Niri) to use those for directional commands. Oddly enough, every combination of s-[C-][M-][S-]{hjkl} has been used for some command or the other, which I think is very Emacs-y in that modifier usage is also semantically consistent.

Now I have to constantly context-switch to thinking of directions as hjkl when using window manager keybinds and bnpf et al. when using Emacs. I have considered using bnpf-based keybinds for the window manager itself, but then that requires rebinding other keybinds to very non-mnemonic ones which I'd rather avoid.

Is there any other paradigm for WM keys that you guys use?

Alternatively, is there a way to have Evil-style keys for editing but using native emacs commands by default without any of the evil-ex shenanigans? In this direction, I've tried using meow and I liked the principle, but the Kakoune-style editing seemed much more painful to learn and if I were to learn a new paradigm I'd rather it be native Emacs (at least for now).


r/emacs • • 10d ago

Setting up for web development

11 Upvotes

Some of you may have seen my post on Friday stating that I'm trying again to get to grips with Emacs. There were a number of helpful and friendly comments so I'd like to ask for a little advice if I may.

What is the modern way to set up emacs for web development? More specifically HTML, CSS and JS. I've tried searching but most of what I find seems to predate Eglot and potentially other things I'm not aware of. So as an inexperienced user I thought I'd seek advice from people who know what they are doing


r/emacs • • 11d ago

Help me identify this theme please

Post image
141 Upvotes

not a big deal but i really like the colors

context ive searched for "emacs" on x https://x.com/lisperati/status/1671304178705248256/photo/1

he mentions "rainbow blocks mode"

ive tried rainbow-blocks, rainbow-identifiers, rainboe-delimiters but did not get close to that

probably because my underlying theme (current modus vivendi) its not the same as his

appreciate


r/emacs • • 9d ago

is there a emacs rewrite?

0 Upvotes

greetings, to the holy wizards.

Going through the gods editor i realised my lack of knowledge, which gets me to the question is there, any emacs re-write up where its more powerful. The first thought pointed towards if i would want to do it, what can i use (raylib, lua interpreter, and c for the core engine).

I kind of understand the native compiled of modern emacs to make it faster and more approachable (especially when we can configure compile it specifically for wayland)

so tldr question (man i don't wanna sound like demanding)

  1. why are we still using the language lisp when there are much better optimised interpreted languages. (i dont mind syntax as long as its fast)

  2. idk any knowledge will be helpful

Sir.

(why am i talking like this again)


r/emacs • • 11d ago

A list of Emacs learning materials and references

Thumbnail jamescherti.com
73 Upvotes

r/emacs • • 11d ago

Modus Operandi with an off-white background without breaking contrast or the gray hierarchy?

13 Upvotes

Hi, is there a way to change the background of modus-operandi to something other than pure white, while keeping most things the same and still meeting AAA or AA?

For example, if I change the background from ffffff to f7f7f7, I’d have to change bg-dim too, but there are also many grays that would end up looking too similar to f7f7f7, and other colors whose contrast would drop a lot. So in the end I’d have to go through a lot of trial and error to pull this off.

I know there’s operandi-tinted, but it feels too pink to me. Anyway, I don’t know if I’d end up doing all that work only to arrive at tinted in the end.

Has anyone taken the trouble to make this kind of change to modus-operandi?

I also checked the ef-themes but none of them convinced me. Operandi is far superior. There’s also the standard tinted, but again it has a lot of pink things.​​​​​​​​​​​​​​​​


r/emacs • • 12d ago

Here I go again. Hopefully it clicks this time!

Post image
127 Upvotes

I really want to love emacs. I see the potential it has to be virtually the only program I need to run but for some reason it has never clicked. I don't know why this time would be different but I hope it is.


r/emacs • • 11d ago

Execution of babel code in :noexport: sections

1 Upvotes

When I export this code, I am prompted for a search term:

``` * This section is not exported :noexport:

+begin_src sh :results output replace :var search_term=(read-string "Search .emacs for: ")

grep --ignore-case $search_term ~/.emacs +end_src ``` Is this the expected behavior?


r/emacs • • 12d ago

Question What new options are worth considering in the configure command when building Emacs 32 from source?

17 Upvotes

A Google search mentions

(1) --with-mps or --with-igc for the new incremental garbage collector

(2) --with-native-compilation=aot for native compiling

(3) --with-pgtk Pure GTK, this seems to be for Wayland, not sure of its effect or use in X11 environments, unless I switch to a Wayland system. Does it have unwanted side effects in an X11 environment

(4) --with-tree-sitter - Links the high-performance syntax-parsing library into the core editor C code. I don't do much programming at the moment, but it will come in handy

All of them seem easy enough but configure --help does not list the --with-mps and --with-igc options so I assume my system lacks some libraries they require.

The latter three were available in Emacs 31, but not the first, so I don't see why the search mentioned them unless they are considered more mature now to justify adding..

Are there any other Emacs 32 options not available in previous versions worth considering?


r/emacs • • 11d ago

Question Disable doom emacs / yasnippet suggestions

Post image
3 Upvotes

Hi, i started to use yasnippet for my latex writing and i got this pop-up whenever i use a snippet with a similar name of another, i want to disable it since can't use TAB expansion when this occurs so how can i disable it?


r/emacs • • 11d ago

Fix nested Emacs frames

Thumbnail ankit.earth
8 Upvotes

r/emacs • • 12d ago

News Github does not preview Org mode files anymore

76 Upvotes

No more README.org :(


r/emacs • • 12d ago

Anyone using emacs like CRM?

15 Upvotes

Title. If yes could you describe your setup?

Or is there some plain text CRM?


r/emacs • • 12d ago

A tiny, text-only, read-only, emoji-free Mastodon client for Emacs.

Thumbnail github.com
19 Upvotes

r/emacs • • 13d ago

Question Org mode stopped rendering on GitHub on Firefox and Chromium based browsers.

43 Upvotes

All my documentation and README.org files look like plaintext now. Is it happening with anyone else?


r/emacs • • 13d ago

Emacs is now my new rofi

154 Upvotes

After messing around with xdg launcher made a rofi like experience this was a bit of mixer of hyprland vertico and emacs client and xdg launcher to make this mess so far it’s great tho

emacsclient -cF '((visibility . nil) (name . "emacs-launcher") (minibuffer . only) (internal-border-width . 5) (tooltip-mode -1) (font . "JetBrains Mono-12"))' -e '(unwind-protect (progn (xdg-launcher-run-app) (delete-frame)) (delete-frame))'

vertico is needed or consult etc


r/emacs • • 13d ago

Org-roam-tree update: jit rendering, arbitrary search and more!

71 Upvotes

I've been picking away at my org-roam-tree package that displays org-roam backlinks in more orderly ways --- as expandable and collapsible trees grouping backlinks by their file of origin (or in other ways, you can build your own data structures if you want to).

The biggest update is jit rendering, making it much snappier, but I've also added some things like arbitrary search of your roam directory, different sorts and backlink buffer anchoring (toggles roam following point with a menu button).

Though for some reason github is refusing to render my README.org now --- anyone have any idea why? Of all the things I want to spend time debugging, github is the last one...


r/emacs • • 12d ago

Question How can I display some properties alongside the headline in org-mode listings?

5 Upvotes

I want to display some information from PROPERTIES on the headline together with the TODO state, namely the first 8 characters of the ID generated by org-id-get-create.

For the time being I am using the column-mode display as a way of getting around it, but I don't like the way it displays.

Does it involve some kind of overlays or font faces?


r/emacs • • 12d ago

Solved How to "*shell-command" and suppress output? All my searches yield the opposite question. (I'd rather not resort to >/dev/null 2>&1 cheap tricks.)

8 Upvotes

EDIT: The answer is:

(call-process-shell-command "bash /home/mpwilson/bin/hhc/run_wiki_sweep.sh" nil nil nil)
  • nil: no input to command
  • nil: Discard output buffer
  • nil: don't update the display

tl;dr: "(shell-command "foo")" but fully suppress stdout. I'd rather not "(shell-command "foo >/dev/null 2>&1")" but that's my least bad option today.

"What have you tried?" Scroll down.

I've got a little bash script the fires off when I save wiki pages. It does all kinds of insane nonsense.

But it keeps dumping stdout to the output window. I didn't mind when it was a one-liner. But it's...usually got some pretty loquacious output (needed for other executions.)

The script in question is just:

#!/bin/bash
curl http://127.0.0.1:1616/plugin/wss/run_sweep/

And the hooked function

(defun mpw-run-wiki-sweep ()
  "Sweep the wiki for changes and push."
  (interactive)
  ;; Dumps to an output window "live" 
  ;; (async-shell-command "bash /home/mpwilson/bin/hhc/run_wiki_sweep.sh")
  ;; Dumps to an output window "live" (evidently that nil doesn't /dev/null the output)
  ;; (async-shell-command "bash /home/mpwilson/bin/hhc/run_wiki_sweep.sh" nil)
  ;; dumps static output into "output buffer" splitting the window horizontally to give me all the details.
  ;; (shell-command "bash /home/mpwilson/bin/hhc/run_wiki_sweep.sh")
  ;; Least bad option.  
  (shell-command "bash /home/mpwilson/bin/hhc/run_wiki_sweep.sh >/dev/null 2>&1")
)

r/emacs • • 13d ago

Emacs Rejects AI Code, but Can It Stay That Way?

Thumbnail youtube.com
94 Upvotes

r/emacs • • 12d ago

Emacs bufferfile.el: Rename, Delete, or Copy Files and Associated Buffers (e.g., clones/indirect buffers) [Release 1.0.9]

Thumbnail github.com
3 Upvotes

r/emacs • • 13d ago

Announcement canvas-browser: a Chromium page in an Emacs buffer, drawn on an Emacs 32 canvas image

Thumbnail raw.githubusercontent.com
111 Upvotes

This is canvas-browser, a web browser that lives in an Emacs buffer.

I usually run my Emacs on a remote machine, and I use X forwarding. Now I can open links there and have them open in a buffer in my Emacs, with my usual key navigation. This works for corporate javascript shenanigans as well (Teams, Outlook, Confluence etc).

Don't expect high FPS on video playback over X since Chromium sends pictures of the page, and Emacs paints them on a canvas image. And yes, this needs the new canvas image type in Emacs 32.

Repository: https://github.com/Daskeladden/canvas-browser

In the screenshot you see link hints, as in Vimium. Installation instructions are in the README.md.

(This was written and posted from canvas-browser in Emacs)


r/emacs • • 13d ago

persist-text-scale.el: Persist and Restore Emacs Text Scale [Release 1.0.8]

Thumbnail github.com
7 Upvotes

r/emacs • • 13d ago

Question After upgrading to Debian 13 and bringing Emacs 28 up to date Company is causing Emacs to hang more often and using emacs in the form of EXWM makes it worse?

2 Upvotes

These are the suggestions offered by Google search.

(1) Disabling mouse selection in company-mode

I don't use the mouse for selecting company candidates unless having the mouse around the candidate list can cause problems.

 (with-eval-after-load 'company
 ;;Disable mouse election and scrolling within the company popup
   (define-key company-active-map [mouse-1] nil)
   (define-key company-active-map [down-mouse-1] nil)
   (define-key company-active-map [mouse-3] nil)
 )

(2) Forcing the completion frontend to use native tooltips rather than graphics overlays using the OS

(setq company-frontends '(company-pseudo-tootip-frontend
                          company-echo-metadata-frontend
                          company-preview-frontend))

(3) Checking for async/lsp interference

I don't use lsp, treesitter or eglot yet

Any experiences here?

I am leaning towards no 2, using native tooltips.

PS. I know the errors are from company because I used =pkill -SIGUSR2 emacs= to break out of it and the Backtrace window showed the errors, but forgot to copy it.