frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

The Emacs Widget Toolkit

https://appetrosyan.github.io/posts/emacs-widget.html
48•signa11•9mo ago

Comments

spit2wind•9mo ago
There's also the Emacs Widget Library[1] (which I hoped this posted would be about). It's a plain text widget library that's quite powerful. Unfortunately (and surprisingly for Emacs), the documentation for it could use some love.

My understanding of the Widget Library is that it attaches various keywords and plists to a symbol which is considered the "widget". The library otherwise consists of functions that expect certain keywords on the "widget" symbol in order to perform actions or to be drawn on the screen.

The challenge is, the documentation doesn't clearly lay out what the keyword API is. This makes it hard to compose widgets in ways beyond what's shown in the docs.

[1] https://www.gnu.org/software/emacs/manual/html_mono/widget.h...

appetrosyan•9mo ago
The idea is that we extend that and give it direct access to SDL. Such that we can e.g. run a shader in the buffer background, or allow you to have floating windows (frames) interacting with each other.

I am very aware of the advantages conferred by TUI and I seek to expand those to the GUI; not dumb-down to the level of modern GUI toolkits (that to be fair are dealing with a completely different problem). Hopefully, this can lead to some ideas being easier to implement from within Emacs.

_mlbt•9mo ago
Somewhat off topic, but I love all the references to Led Zeppelin’s incredible song, Stairway to Heaven.
gudzpoz•9mo ago
Personally, and contrary to the article, I do prefer Emacs's plain text widgets over more "GUI-like" ones. Plain text widgets minimize the differences between TUI and GUI Emacs and also inherently offer text selection, searching, copying, and pasting, which nicely integrates with Emacs. I mean, not many GUI frameworks let you place a cursor within a button and select its text, do they? I believe this is a unique advantage of text-based widgets: while other GUI applications require a dedicated mechanism for searching through their settings, text-based widgets allow you to use any text-searching packages to perform these actions.

Reading through the article, the author seems to be hoping for a pure GUI approach with Emacs-like navigation mechanisms, but I am not convinced that this can be as flexible as text-based widgets. However, for packages used exclusively within a GUI environment (like el-easydraw [1], which relies quite heavily on SVG-based widgets), it would be nice to have a dedicated GUI widget library.

(There was a discussion on Reddit about this a week ago [2], and I saw some comments defending GTK and PGTK that might be worth reading.)

[1] https://github.com/misohena/el-easydraw/

[2] https://www.reddit.com/r/emacs/comments/1kcgwme/the_emacs_wi...

appetrosyan•9mo ago
Author of the article.

This is what I was referring to when I talked about "rich verbs".

Many people feel that way. The idea here is not to tell you that you're wrong, but understand what you want and do it better on the GUI side. TUIs can do a lot and we should recognise their benefits. GUIs can do that too, and can sometimes do better things.

The text-based widgets done graphically do the trick. We can add stuff that can't be done in a TUI and see if they give you anything useful. If it can be done with text widgets means that it can be done in principle. GTK can't do it, and that's why I'm leaving it behind.

> (There was a discussion on Reddit about this a week ago [2], and I saw some comments defending GTK and PGTK that might be worth reading.)

The author of those comments abused their power on reddit. I will not get into the weeds, just say that I'd be happy to respond to the critique presented here in good faith.

robobro•9mo ago
Why did you delete the page?
appetrosyan•9mo ago
Didn't. I migrated to `hugo` and it trims off the `.html` at the end. The permalink is the same.
matt-attack•9mo ago
I agree and only use emacs in the console and love it. With the advent of lsp modes and real time typescript and linting it’s fantastic. But one thing I don’t like about the console is when LSP mode is giving you an in-line error on the right side of the terminal it’s wrapped and beautifully interspersed amongst your code, but it’s impossible to select multi line errors in order to paste into tools like ChatGPT. Since selecting the error, also selects your code on the left side.

Anyone have a good solution to this ?

LargoLasskhyfv•9mo ago
PSA: Use The Lucid Toolkit https://irreal.org/blog/?p=12672

https://old.reddit.com/r/emacs/comments/1hlj04t/emacs_using_...

appetrosyan•9mo ago
That's the best thing to do for the moment.
robobro•9mo ago
404

Page Not Found

Sorry, this page does not exist.

You can head back to the homepage.

appetrosyan•9mo ago
Hi. I just migrated my blog to Hugo yesterday. The correct link is:

https://appetrosyan.github.io/posts/emacs-widget/

The Amish Paradox (2004)

https://www.latimes.com/archives/la-xpm-2004-jan-12-he-amish12-story.html
1•paulpauper•59s ago•0 comments

You're a Computer Science Major. Don't Panic About A.I

https://www.nytimes.com/2025/11/12/opinion/ai-coding-computer-science.html
1•paulpauper•2m ago•0 comments

The Sunday Signal: The Loom, the Layoff, and the Life Raft

https://newsletter.djr.ai/p/the-sunday-signal-the-loom-the-layoff
1•discoinferno•2m ago•0 comments

The Great Online Game (2021)

https://www.notboring.co/p/the-great-online-game
1•simonebrunozzi•2m ago•0 comments

Thanks for Subscribing

https://www.fsf.org/free-software-supporter/success
1•maing•3m ago•0 comments

Show HN: Open-source MCP server for AI podcast clipping

https://github.com/nmbrthirteen/podcli
1•nsiradze•4m ago•0 comments

GNU Hurd on Guix Is Ready with 64-Bit Support, SMP Multiprocessor Support "Soon"

https://www.phoronix.com/news/GNU-Hurd-64-bit-2026
1•voxadam•4m ago•0 comments

OpenAI's DoD contract may allow mass surveillance and autonomous weapons

https://drew337494.substack.com/p/perfectly-transparent
4•fwipsy•5m ago•1 comments

'Employers are increasingly turning to degree and GPA'

https://fortune.com/2026/01/06/recruiting-college-isnt-dead-top-schools-not-talent-is-everywhere/
4•paulpauper•6m ago•0 comments

Math Academy Review: The Shoe-Tying Method Behind Adaptive Math Learning

https://opened.co/blog/math-academy-review-shoe-tying-method
1•gmays•9m ago•0 comments

Background Jobs for TanStack Start with pg-boss

https://jxd.dev/writing/background-jobs-tanstack-start-pg-boss/
1•jamie_davenport•10m ago•0 comments

Power Mode Plugin for Neovim (2026 Take)

https://github.com/axsaucedo/neovim-power-mode
1•axsaucedo•11m ago•1 comments

Claude dethrones ChatGPT as top U.S. app after Pentagon saga

https://www.axios.com/2026/03/01/anthropic-claude-chatgpt-app-downloads-pentagon
5•doener•11m ago•0 comments

The unreasonable effectiveness of S-Expressions

https://nim-lang.org/araq/sexpressions.html
2•moigagoo•13m ago•0 comments

Hackerbot-Claw: An AI-Powered Bot Actively Exploiting GitHub Actions

https://www.stepsecurity.io/blog/hackerbot-claw-github-actions-exploitation
1•pluc•15m ago•0 comments

Can 'friction-maxxing' fix your focus?

https://www.bbc.com/future/article/20260227-can-friction-maxxing-fix-your-focus
6•jethronethro•18m ago•0 comments

From the Guillotine to Napoleon: The French Revolution in Clothes

https://worldhistory.substack.com/p/the-fashion-counter-revolution
1•crescit_eundo•18m ago•0 comments

Show HN: MCP file tools silently eat your context window.I built one that doesnt

https://github.com/ckanthony/Chisel
4•ckanthony•19m ago•2 comments

The Things We Built (and Broke)

https://theblairwitchprojects.substack.com/p/the-things-we-built-and-broke
1•sg17gweedo•21m ago•1 comments

Horse that fades in as you doomscroll (Userscript)

https://gist.github.com/ravarcheon/606b641df4ade3642fb01bec0950c7c0
2•trms•23m ago•0 comments

Knowledge Priming (Manual RAG)

https://martinfowler.com/articles/reduce-friction-ai/knowledge-priming.html
1•danebalia•23m ago•1 comments

Aura-State: Formally Verified LLM State Machine Compiler

2•rohanmunshi08•25m ago•0 comments

Epstein files reveal deeper ties to scientists than previously known

https://www.nature.com/articles/d41586-026-00388-0
4•Teever•28m ago•0 comments

Official NeuroMoney Launch

https://neuromoney.io/app/
1•LukeHenderson11•28m ago•2 comments

All it takes to poison AI training data is to create a website

https://www.schneier.com/blog/archives/2026/02/poisoning-ai-training-data.html
3•u1hcw9nx•28m ago•1 comments

It's Here (Sort Of)

https://kyefox.com/its-here-sort-of/
2•Kye•31m ago•0 comments

World Chess Championship matches have not had an on-board checkmate since 1929

https://en.wikipedia.org/wiki/World_Chess_Championship_1929
2•haunter•31m ago•2 comments

It doesn't matter if the post was fully AI generated

https://simianwords.bearblog.dev/it-doesnt-matter-if-the-post-was-fully-ai-generated/
3•simianwords•31m ago•1 comments

Inside Anthropic's Killer-Robot Dispute with The Pentagon

https://www.theatlantic.com/technology/2026/03/inside-anthropics-killer-robot-dispute-with-the-pe...
4•eoskx•32m ago•2 comments

Datacentre developers face calls to disclose effect on UK's net emissions

https://www.theguardian.com/technology/2026/mar/01/datacentre-developers-energy-greenhouse-gas-em...
5•devonnull•35m ago•0 comments