frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

The Emacs Widget Toolkit

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

Comments

spit2wind•2mo 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•1mo 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.

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

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

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

Page Not Found

Sorry, this page does not exist.

You can head back to the homepage.

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

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

Study: Apple's newest AI model flags health conditions with up to 92% accuracy

https://9to5mac.com/2025/07/10/study-apple-ai-model-flags-health-conditions-with-up-to-92-accuracy/
1•mgh2•1m ago•0 comments

Jack Dorsey says his 'secure' new Bitchat app has not been tested for security

https://techcrunch.com/2025/07/09/jack-dorsey-says-his-secure-new-bitchat-app-has-not-been-tested-for-security/
1•jrflowers•3m ago•0 comments

Give Me Some Advice

1•bigbaldhead•9m ago•0 comments

My Journey to Build a Working Tesla Coil

https://sandman2127.github.io/design/Tesla_Coil/
1•1970-01-01•11m ago•0 comments

Track Work, Progress and Performance Instantly – Zero Manual Updates

2•heyitsapu•21m ago•0 comments

Show HN: Looking for Beta Testers: Run AI-Generated Code in AgentSphere Sandbox

1•AgentSphere•23m ago•0 comments

Concurrent Programming with Harmony

https://harmony.cs.cornell.edu/book/
1•todsacerdoti•25m ago•0 comments

Show HN: Intuitive Layout Image Generation Prompt Generator

https://rymajp.com/ipgen
1•acdev•26m ago•0 comments

Nerve pain drug gabapentin linked to increased dementia, cognitive impairment

https://medicalxpress.com/news/2025-07-nerve-pain-drug-gabapentin-linked.html
1•clumsysmurf•33m ago•0 comments

Netflix Tudum Architecture: From CQRS with Kafka to CQRS with Raw Hollow

https://netflixtechblog.com/netflix-tudum-architecture-from-cqrs-with-kafka-to-cqrs-with-raw-hollow-86d141b72e52
2•soheilpro•34m ago•0 comments

Budget limits at DHS delayed FEMA's Texas deployment

https://www.washingtonpost.com/climate-environment/2025/07/10/fema-texas-flooding-dhs-search-rescue/
2•KnuthIsGod•41m ago•0 comments

The first intelligent screenshot tool of the AI era

https://github.com/zhushen12580/smart-screenshot
2•zane12580•42m ago•0 comments

Hard Usernames for Games Generator

https://hardusernames.com/en/hard-usernames-for-games
1•labubulive•43m ago•0 comments

The Egos at id (Software)

https://www.marclaidlaw.com/the-egos-at-id/
1•neko_ranger•45m ago•0 comments

'Autofocus' specs promise sharp vision, near or far

https://www.bbc.com/news/articles/cj6r06d7xdjo
6•tagawa•45m ago•0 comments

Tool strips away anti-AI protections from digital art

https://www.technologyreview.com/2025/07/10/1119937/tool-strips-away-anti-ai-protections-from-digital-art/
1•gnabgib•49m ago•0 comments

A Poor Man's User Study with a Vision Model and E[P]

https://twitter.com/johnjhorton/status/1943473769219002766
1•john_horton•49m ago•0 comments

Extreme Low-Bit Clustering for Large Language Models via Knowledge Distillation

https://arxiv.org/abs/2506.12038
1•PaulHoule•54m ago•0 comments

Grok 4 seems to consult Elon Musk to answer controversial questions

https://techcrunch.com/2025/07/10/grok-4-seems-to-consult-elon-musk-to-answer-controversial-questions/
12•mkeeter•54m ago•1 comments

America's largest power grid is struggling to meet demand from AI

https://www.reuters.com/sustainability/boards-policy-regulation/americas-largest-power-grid-is-struggling-meet-demand-ai-2025-07-09/
1•qwikhost•55m ago•0 comments

Show HN: Open-Source Alternative to Mercury

https://github.com/different-ai/zero-finance
1•ben_talent•55m ago•0 comments

Psilocybin treatment extends cellular lifespan, improves survival of aged mice

https://www.nature.com/articles/s41514-025-00244-x
19•pseudolus•57m ago•2 comments

Supporting kernel development with large language models

https://lwn.net/Articles/1026558/
1•signa11•59m ago•0 comments

Flickle – connect any two actors via movies in ≤6 guesses

https://flickle.carpoolgames.net
6•kanoacook•59m ago•1 comments

Earth's Spin Picks Up Speed: 3 Shorter Days This Summer

https://esstnews.com/earths-spin-picks-up-speed-3/
1•thunderbong•1h ago•0 comments

Automating Weekly Releases with GitHub Actions

https://michaelbastos.com/?blog=automating-weekly-releases-with-github-actions
1•mbastos•1h ago•1 comments

Over 2,000 senior staff set to leave NASA under agency push

https://www.politico.com/news/2025/07/09/nasa-staff-departures-00444674?cdmc=2zglpgOF21PefXUKP0PbPaLZDC0&refcode2=2zglpgOF21PefXUKP0PbPaLZDC0&refcodecdmc=2zglpgOF21PefXUKP0PbPaLZDC0
14•belter•1h ago•6 comments

Anubis now supports non-JS challanges

https://anubis.techaro.lol/blog/release/v1.20.0/
1•todsacerdoti•1h ago•1 comments

A remembrance of Matthew S. Trout (mst)

https://curtispoe.org/blog/rip-mst.html
3•todsacerdoti•1h ago•0 comments

Some of Iran's Enriched Uranium Survived Attacks, Israeli Official Says

https://www.nytimes.com/2025/07/10/us/politics/iran-attacks-damage.html
3•whack•1h ago•1 comments