And now we're talking about something entirely different.
Re:I Use My Terminal
by umanwizard on Tuesday June 24, 2025 @09:32PM
(#44372889)
How? Interacting with the state of emacs software is exactly what the OP was talking about.
In emacs, you can do this, because your email client is a package written in Lisp and running in the globally shared context of the emacs interpreter, so you can directly query its state. And if you don't know the names of the variables to query, you can trivially jump into the source code and start figuring it out. Furthermore, there is a 99.9% chance the state is implemented using well-known emacs primitives like buffers, whereas for general programs launched from the shell there is no standard set of UI and text manipulation libraries.
There isn't functionality in bash to magically jump to the C++ source code of Thunderbird or read variables from its internal state, which is the key difference.