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•12mo ago

Comments

spit2wind•12mo 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•12mo 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•12mo ago
Somewhat off topic, but I love all the references to Led Zeppelin’s incredible song, Stairway to Heaven.
gudzpoz•12mo 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•12mo 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•12mo ago
Why did you delete the page?
appetrosyan•12mo ago
Didn't. I migrated to `hugo` and it trims off the `.html` at the end. The permalink is the same.
matt-attack•12mo 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•12mo ago
PSA: Use The Lucid Toolkit https://irreal.org/blog/?p=12672

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

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

Page Not Found

Sorry, this page does not exist.

You can head back to the homepage.

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

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

Johnny Castaway Screensaver 1992 for macOS Tahoe. Runs as a Screensaver

https://github.com/tallPete/JohnnyCastaway
1•castawayjohnny•4m ago•1 comments

Ask HN: What Wintel/AMD (Laptop) Harware are you liking?

1•aagha•9m ago•0 comments

Fulfilling a life-long dream; 72-year old will graduate from medical school

https://www.washingtonpost.com/lifestyle/2026/05/10/grandmother-medical-school-graduate-residency/
2•wallflower•10m ago•0 comments

To learn to speak you have to speak

http://languagemuse.blogspot.com/2025/06/to-learn-to-speak-you-have-to-speak.html
2•andsoitis•19m ago•0 comments

Pitfalls of Try/Finally in Python

https://pythonkoans.substack.com/p/koan-20-the-unreliable-messenger
2•meander_water•26m ago•0 comments

I'm going back to writing code by hand

https://blog.k10s.dev/im-going-back-to-writing-code-by-hand/
23•dropbox_miner•32m ago•5 comments

Honda Patents a Fake Clutch for Electric Motorcycles

https://electrek.co/2026/05/07/honda-patents-fake-clutch-for-electric-motorcycles-and-it-might-ac...
2•m463•34m ago•1 comments

Freenode IRC Mathematics Seminars (2010)

https://freenode-math.fandom.com/wiki/Seminars
1•susam•35m ago•0 comments

"Cannot be explained" – New ultra stainless steel stuns researchers

https://www.sciencedaily.com/releases/2026/05/260510030950.htm
5•HardwareLust•50m ago•0 comments

Stateless settlement-gated HTTP APIs using UTXO replay protection

https://github.com/ruidasilva/merkleworks-x402-spec
1•ruidasilva•55m ago•0 comments

West Bank settlers forced a Palestinian to dig up the body of his father

https://www.bbc.com/news/articles/cjrpnjpl39po
6•khaledh•1h ago•0 comments

Free/OSS agentic API interrogator

https://github.com/dapooleygmailcom/gaiia-mcp-server
1•dapooley•1h ago•1 comments

Make America AI-Ready

https://beta.dol.gov/ai-ready
2•andsoitis•1h ago•0 comments

Transmission Spectroscopy of the Habitable Zone Exoplanet LHS1140B (2024)

https://arxiv.org/abs/2406.15136
1•johnbarron•1h ago•0 comments

Tubestack: YouTube <> Substack

https://anishlk.com/tubestack/
2•anishlk•1h ago•1 comments

Budi – local-first AI coding cost tracker (Rust, tails local logs, no proxy)

https://getbudi.dev/
2•siropkin•1h ago•0 comments

Japan's New Care Workers: Bodybuilders, Wrestlers and MMA Fighters

https://www.nytimes.com/2026/04/25/world/asia/japan-care-workers-bodybuilders-sumo-mma.html
1•danso•1h ago•1 comments

The Fall of the Theorem Economy

https://davidbessis.substack.com/p/the-fall-of-the-theorem-economy
2•cubefox•1h ago•0 comments

Surprising Signs of an Atmosphere Around a Tiny World, Billions of Miles Away

https://www.nytimes.com/2026/05/07/science/plutino-atmosphere-astronomy-pluto.html
1•lxm•1h ago•0 comments

Energy Prices Are Driving Demand for Solar Panels and Heat Pumps

https://www.nytimes.com/2026/05/08/business/europe-solar-panels-iran-war.html
7•lxm•1h ago•4 comments

Catch breaking API changes before merge

https://ImpactGuard.dev
1•dclavijo•1h ago•0 comments

Challenging the Way We Pedal

https://hackaday.com/2026/05/09/challenging-the-way-we-pedal/
2•lxm•1h ago•0 comments

Mariculture Systems to begin the construction of Portugal aquaculture facility

https://www.seafoodsource.com/news/aquaculture/mariculture-systems-approved-to-begin-the-construc...
3•mooreds•1h ago•0 comments

How we know if our agent is right

https://www.mendral.com/blog/how-we-know-if-our-agent-is-right
2•shad42•1h ago•0 comments

A Preview of the Future

https://unsung.aresluna.org/a-preview-of-the-future/
3•zdw•1h ago•0 comments

Make America AI ready: Strengths, weaknesses, and recommendations

https://blog.citp.princeton.edu/2026/05/05/make-america-ai-ready-strengths-weaknesses-and-recomme...
16•Kye•1h ago•11 comments

Bonsai of the Imperial Palace [video]

https://www.youtube.com/watch?v=HXoECYXr_Bk
1•tkgally•1h ago•0 comments

Diversity as the Bottleneck in Self-Play

https://ivison.id.au/2026/05/06/self-play.html
2•jxmorris12•1h ago•0 comments

Learning on the Shop floor

https://twitter.com/tobi/status/2053121182044451016
4•jmacd•1h ago•0 comments

New map shows where electric truck charging is scaling

https://electrek.co/2026/05/08/new-map-electric-truck-charging-is-scaling/
3•Bender•1h ago•0 comments