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

Comments

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

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

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

Page Not Found

Sorry, this page does not exist.

You can head back to the homepage.

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

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

Scientists watch sperm whales work as a team to assist a birth

https://www.npr.org/2026/03/27/nx-s1-5762978/sperm-whale-birth-cooperation-coordination-marine-ma...
1•Brajeshwar•57s ago•0 comments

Ask HN: What's the Deal with Forward Deployed Engineers?

1•rubyrenegade•1m ago•0 comments

Show HN: Built a reading experience for DTV by Michael Moritz

https://www.aditdaga.com/dtv
1•dagaadit•1m ago•0 comments

Nematophagous Fungus

https://en.wikipedia.org/wiki/Nematophagous_fungus
1•lordgilman•2m ago•0 comments

Football 'has eaten almost every sport' due to digital dominance

https://www.theguardian.com/football/2026/feb/25/football-digital-dominance-goalhanger-podcast-ch...
1•PaulHoule•2m ago•0 comments

MCP Authorization in 5 easy OAuth specs

https://workos.com/blog/mcp-authorization-in-5-easy-oauth-specs
1•fagnerbrack•3m ago•0 comments

The Cost of Concurrency Coordination with Jon Gjengset

https://www.youtube.com/watch?v=tND-wBBZ8RY
1•VorpalWay•3m ago•0 comments

A small experiment with multi-agent workflows for dev (forgeAI)

https://github.com/nelson820125/forgeai
3•teng0127•5m ago•2 comments

Apple Mac Pro Fades into Oblivion

https://www.cnet.com/tech/computing/apple-mac-pro-fades-into-oblivion/
1•thunderbong•6m ago•1 comments

Lebesgue Constants

https://www.johndcook.com/blog/2026/03/26/lebesgue-constants/
1•ibobev•6m ago•0 comments

So many em-dashes in Tim Cook's letter

https://www.apple.com/50-years-of-thinking-different/
1•frasermarlow•6m ago•1 comments

Handle CSV, JSON and XML with Java

https://xnacly.me/posts/2023/java-encoding/
1•ibobev•6m ago•0 comments

Git Guide for Absolute Beginners

https://xnacly.me/posts/2023/git-guide/
1•ibobev•6m ago•0 comments

Text-scale should be the default

https://www.lkhrs.com/mutex/text-scale-should-be-the-default/
1•8organicbits•7m ago•0 comments

Show HN: I have 5 PostHog projects and got tired of checking them one at a time

https://www.pockethog.com/
1•rspitzer•10m ago•0 comments

AgentID – open-source identity layer for AI agents

https://github.com/Pedroshakoor/Agent-ID
1•pedroshakoor•16m ago•1 comments

Show HN: The Economics of Builder Saturation in Digital Markets

1•armcat•17m ago•0 comments

ZeroNet: Peer to Peer Darknet

https://zeronet.io/
1•dtj1123•17m ago•0 comments

Japan's giant caldera volcano is refilling 7,300 years later

https://phys.org/news/2026-03-japan-giant-caldera-volcano-refilling.html
1•Brajeshwar•18m ago•0 comments

Euro-Office

https://github.com/Euro-Office
1•Tomte•21m ago•0 comments

Iran: The first war with live odds

https://www.dopaminemarkets.com/p/iran-the-first-war-with-live-odds
1•astorplace•22m ago•0 comments

Devs, no need to signup to accept payments anymore, use PayRam

https://www.payram.com/
1•BuddhaSource•23m ago•1 comments

From $0 to 5k USD in two days

https://struere.dev/
1•MarcoKueks•24m ago•2 comments

The Spice Must Flow: What Dune Gets Right About the Oil Crisis Happening Now

https://old.reddit.com/r/dune/comments/1s06xwb/the_spice_must_flow_what_dune_gets_right_about/
1•helsinkiandrew•24m ago•0 comments

Ask HN: Supplemental Consulting Work Advice

1•graerg•25m ago•0 comments

Bitcall.io

https://bitcall.io
1•erammm•26m ago•0 comments

Mach 1.5 tests reveal noise feedback loops from supersonic jets

https://techxplore.com/news/2026-03-mach-reveal-noise-feedback-loops.html
2•layer8•26m ago•0 comments

Louisiana's Barksdale Air Force Base was targeted by 'multiple waves' of drones

https://www.nationalreview.com/2026/03/how-vulnerable-is-america-to-an-operation-spiderweb-at-hom...
3•fortran77•30m ago•1 comments

Trump Said Congestion Pricing Would Make Manhattan a 'Ghost Town.' He Was Wrong

https://www.nytimes.com/2026/03/27/opinion/congestion-pricing-traffic-new-york.html
1•Vinnl•31m ago•0 comments

Anthropic Economic Index Learning Curves

https://www.anthropic.com/research/economic-index-march-2026-report
2•gmays•31m ago•0 comments