by tetris11 · 2y ago · 0 comments
There is the emacs-fzf package, icicles, and various other vertical completion frameworks, but I essentially want something that pretends to be fzf at the Emacs level, without having to spawn background shell scripts
There are some options outlined in the readme of fussy[1], which is a wrapper around them. There are some pure elisp ones, and some written in native languages (including fzf itself) interfaced with dynamic module (so FFI rather than subprocess). Does that qualify as Emacs level?
I think it would have reduced composition in practice. Part of what you get out of "text as the universal interface" is tools that never heard of each other being able to work together. Because there's only a couple types: string, maybe number depending on the context, list (strings separated by spaces or newlines) and record (single line of a csv/tsv file), things can be kinda coerced into working together.
You could get this with a type system... if you restrict yourself to at the most advanced List<String>, Map<String, String>, but you've lost ~80% of your type system value. As soon as anyone defines a custom struct, only tools that have heard of that type (which, in practice, end up being tools specifically made to work with it) can use it. Just using text with a few conventions is a really high utility point on the pareto curve for basically zero work.
I could see some benefit in getting a system defined Path/URL type, but you'd really need to have a culture of sticking to built in types, and a system that offers types to cover basically every use-case.
I don't think C ABI gets you this. Passing structs across ABI boundaries is kinda iffy, especially if you're using a different compiler than the program was originally compiled with. And lord knows what non-C programs would try to do.
You've just invented a rudimentary and worse version of COM. (There are advantages in not limiting yourself to low-level tooling like ptys/pipes/sockets.)
A web-dev example might be that CSS, the language design, is not the same as the ever-growing and inconsistent set of properties that the browser uses to style documents.
We lost that battle in the late 70s/early 80s. It has nothing to do with the open source world.