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

Comments

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

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

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

Page Not Found

Sorry, this page does not exist.

You can head back to the homepage.

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

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

How Trump is moving to control U.S. elections, one state at a time

https://www.reuters.com/investigations/how-trump-is-moving-control-us-elections-one-state-time-20...
1•notagoodidea•24s ago•0 comments

An intriguing case of "exceptional resilience" against dementia

https://peterattiamd.com/heat-shock-proteins-and-alzheimers-mutation/
1•brendanashworth•1m ago•0 comments

Ask a Staff Engineer Anything

https://askastaffengineer.com/
1•mooreds•1m ago•0 comments

Canvas-Ing the Web

https://meyerweb.com/eric/thoughts/2026/04/27/canvas-ing-the-web/
1•jjgreen•1m ago•0 comments

Canva apologizes after its AI tool replaces 'Palestine' in designs

https://www.theverge.com/ai-artificial-intelligence/919028/canva-magic-layers-ai-replacing-palestine
1•alex_suzuki•2m ago•0 comments

What AI bros have wrong about Jevons Paradox

https://b2bs.substack.com/p/jevons-paradox-ai-and-humanitys-relevance
1•oopsiremembered•2m ago•0 comments

Bloom filters: the niche trick behind a 16× faster API

https://incident.io/blog/bloom-filters
1•tahazsh•3m ago•0 comments

KloudAudit – find cloud waste in 15 min without giving AWS account access

https://www.kloudaudit.eu/
1•leumasj•3m ago•0 comments

AI's not going to kill open source code security

https://www.theregister.com/2026/04/26/opinion_column/
1•CrankyBear•4m ago•0 comments

Nonlinearity Affects a Pendulum

https://www.johndcook.com/blog/2026/04/24/nonlinear-pendulum/
1•ibobev•4m ago•0 comments

Nth Derivative of a Quotient

https://www.johndcook.com/blog/2026/04/25/nth-derivative-of-a-quotient/
1•ibobev•4m ago•0 comments

Closed-form solution nonlinear pendulum with Jacobi functions

https://www.johndcook.com/blog/2026/04/25/exact-solution-nonlinear-pendulum/
1•ibobev•4m ago•0 comments

Hardware-accelerated 4K video on RK3588 with Linux 7.0

https://seoulsaram.org/articles/RK3588/mainline-hwdec
2•captain_bender•7m ago•1 comments

Agentic ML engineer. works with Colab. Zero infra needed. 3x faster TurboQuant

https://github.com/altaidevorg/isanagent
2•monatis•8m ago•1 comments

Sometimes Your Job Is to Get in the Way

https://randsinrepose.com/archives/sometimes-your-job-is-to-get-in-the-way/
2•mooreds•8m ago•0 comments

Raspberry Pi Badgeware

https://www.raspberrypi.com/news/raspberry-pi-badgeware/
1•salkahfi•8m ago•0 comments

Why Food Additives May Not Be FDA Reviewed

https://undark.org/2026/04/24/interview-jennifer-pomeranz/
1•speckx•8m ago•0 comments

Show HN: Explain Like I'm Five for ArXiv Papers

https://eli.voxos.ai/
1•Falimonda•9m ago•0 comments

AI Cannot Self Improve and Math Behind Proves IT

https://smsk.dev/2026/04/26/ai-cannot-self-improve-and-math-behind-proves-it/
1•ColinWright•9m ago•0 comments

The emergence of just-in-time integrations

https://nango.dev/blog/just-in-time-integrations/
1•rguldener•9m ago•0 comments

A Fast Quicksort in C for Modern CPUs with Threads and Branch‑Avoidant Coding

https://easylang.online/blog/threaded_sorting
1•signa11•10m ago•0 comments

Can birds catch diseases from birdbaths?

https://coloradosun.com/2026/04/27/can-birds-catch-diseases-from-birdbaths/
1•mooreds•11m ago•0 comments

The Top%: Engineering Tenzai's AI Hacker to Compete with Elite Humans

https://blog.tenzai.com/tenzais-ai-hacker-to-compete-with-elite-humans/
1•gk1•12m ago•0 comments

Mythos Preview: What Every CISO Should Do Now

https://blog.tenzai.com/mythos-preview-what-every-ciso-should-do-now/
1•gk1•13m ago•0 comments

Don't Fall for This PayPal Deposit Scam

https://www.mouseprint.org/2026/04/27/dont-fall-for-this-paypal-deposit-scam/
2•speckx•17m ago•0 comments

A chemistry lab that runs itself to find the perfect reaction

https://www.nature.com/articles/d41586-026-01283-4
1•Brajeshwar•19m ago•0 comments

AI Is Getting Boring

https://www.france24.com/en/tv-shows/tech-24/20260426-ai-is-already-getting-boring
2•speckx•20m ago•0 comments

I built a WordPress plugin that generates 1000 SEO pages in minutes

https://www.indiehackers.com/post/i-built-a-wordpress-plugin-that-generates-100-seo-pages-in-minu...
1•codefreex•23m ago•0 comments

Google's new gradient icons for Gmail, Drive and others are radical redesigns

https://9to5google.com/2026/04/26/gmail-google-gradient-redesign/
1•maxloh•24m ago•0 comments

GPT-5.5 hallucinates at 6 times the rate of Opus 4.7 on degraded insurance docs

https://aginor.ai/extraction-test/
2•TimGMichaud•26m ago•0 comments