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/

Who Will Command the Robot Armies? (2016)

https://idlewords.com/talks/robot_armies.htm
1•diafygi•52s ago•1 comments

Global trade will continue, but will become more complex

https://www.economist.com/the-world-ahead/2025/11/12/global-trade-will-continue-but-will-become-m...
1•andsoitis•1m ago•0 comments

You're right, no one can tell if C++ is AI generated

https://mropert.github.io/2026/03/30/ai_garbage_cpp/
1•signa11•3m ago•0 comments

Hungary colluded with Russia to delist sanctioned oligarchs, companies and banks

https://theins.org/en/inv/290911
1•vrganj•4m ago•0 comments

Leaked Calls Expose Hungary and Slovakia as Secret Kremlin Backchannel Inside EU

https://united24media.com/latest-news/leaked-calls-expose-hungary-and-slovakia-as-secret-kremlin-...
1•reimertz•5m ago•0 comments

Meat Consumption and Cognitive Health by APOE Genotype (Alzheimer Disease Risk)

https://jamanetwork.com/journals/jamanetworkopen/fullarticle/2846712
1•raffael_de•6m ago•0 comments

China builds open RISC-V chip platform with Xiangshan, Ruyi OS

https://www.digitimes.com/news/a20260330VL206/risc-v-development-ip-processor.html
1•maxloh•6m ago•0 comments

Porting Go's io package to C

https://antonz.org/porting-go-io/
1•blenderob•7m ago•0 comments

Show HN: LynxDB – Log analytics in a single Go binary

https://github.com/lynxbase/lynxdb
1•owen-orlov•8m ago•0 comments

Claude Code has a Tamagotchi and a dream engine

https://gist.github.com/Houstoten/144e4ae9c520a281551d0cb92c488e04
1•deep_noz•9m ago•0 comments

Removing "to be" from an LLM's vocabulary changes how it reasons (I have data)

https://arxiv.org/abs/2603.27626
1•rodspeed•9m ago•1 comments

OLAP Is All You Need: How We Built Reddit's Logging Platform

https://old.reddit.com/r/RedditEng/comments/1rpbk7u/olap_is_all_you_need_how_we_built_reddits_log...
1•mooreds•11m ago•0 comments

Quadratic gravity theory reshapes quantum view of Big Bang

https://phys.org/news/2026-03-quadratic-gravity-theory-reshapes-quantum.html
2•jnord•11m ago•0 comments

Lincity for Amiga 68k

https://paulthetall.itch.io/lincity-for-68k-amiga
1•doener•12m ago•0 comments

A Cat-and-Mouse Game of Russian Internet Restrictions and Evasion

https://www.nytimes.com/2026/03/31/world/europe/russia-internet-restrictions.html
1•cainxinth•12m ago•0 comments

Show HN: A curated guide to everything on go.dev, organized for learners

https://github.com/tamnd/godev-index
1•tamnd•13m ago•0 comments

Fermi shares plunge 13% on $486M net loss

https://www.ft.com/content/49a8b5c8-d655-4eb8-b0dc-6bd403860925
1•mooreds•13m ago•0 comments

Where are the German self-driving cars?

https://realimaginedprogress.substack.com/p/german-carmakers-have-surrendered
2•dostick•15m ago•0 comments

He Helped Stop Iran from Getting the Bomb

https://www.newyorker.com/magazine/2026/04/06/he-helped-stop-iran-from-getting-the-bomb
1•tzury•16m ago•0 comments

Blockchain solves what happens to your data after death.:?;? –:.?

https://daycade.com
1•Martin_Dev_SaaS•16m ago•1 comments

Agile teams don't use a lot of data in their retrospectives

https://chuniversiteit.nl/papers/data-in-retrospectives
1•ibobev•17m ago•0 comments

Boyer-Moore Majority Element

https://buttondown.com/jaffray/archive/boyer-moore-majority-element/
1•ibobev•17m ago•0 comments

Walking backwards into the future – A look at descriptor heap in Granite

https://themaister.net/blog/2026/03/29/walking-backwards-into-the-future-a-look-at-descriptor-hea...
1•ibobev•17m ago•0 comments

The Secret Minicomputer Inside Your Sphere. The Origins of Sphere Basic

https://sphere.computer/news/2026-03-28-the-secret-minicomputer-inside-your-sphere.html
1•oldnetguy•18m ago•0 comments

Battery Booster Strategy

https://www.eesc.europa.eu/en/our-work/opinions-information-reports/opinions/battery-booster-stra...
1•doener•19m ago•0 comments

Presenting Unlicense Open Source Code Like a Pokemon Gym Badge Holder

https://cochranblock.org/codeskillz
1•cochranblock•20m ago•0 comments

SSRF → AWS IMDS: stealing EC2 IAM credentials with 3 HTTP requests

https://paolocostanzo.github.io/ssrf-imds-ec2-credentials/
1•PCostanzo•21m ago•0 comments

How I setup my Hetzner server with Coolify, Tailscale, UFW, and Cloudflare

https://ben.cates.fm/securing-coolify-with-tailscale-ufw-cloudflare/
2•benja123•21m ago•1 comments

Prediction: The Shopify CEO's Pull Request Will Never Be Merged nor Closed

https://joshmoody.org/blog/shopify-ceo-autoresearch-pr/
3•birdculture•21m ago•0 comments

Has Something Changed in the Near-Earth Meteoroid Environment?

https://www.amsmeteors.org/2026/03/has-something-changed-in-the-near-earth-meteoroid-environment/
1•Luc•27m ago•0 comments