I've used Spacemacs for some years now as my primary editor, but recently I've been looking into #neovim.

It starts up a lot quicker, even with a bunch of plugins, and surprisingly for a terminal editor it has a more sophisticated UI than windowed Emacs.

@weavejester I’ve been using #vim for nearly 30 years :facepalm:. #neovim has re-wired my workflow.
Yes, #emacs fans will tell you the same about their #editor — but these tools aren’t just rivals, they represent opposing philosophies. Vim/Neovim: speed, composability, the Unix ethos. Emacs: the “OS inside your editor,” everything bundled in. Both have strengths, but they reveal two very different ways of thinking about code, control, and workflow.

@demiguru

I understand that emacs is designed to be invoked and then one will live in it until the end of his session. While vi is designed to be invoked as needed.

But on today's computer, emacs usually is also super fast, whether their invocation, opening files or when processing something.

I understand that emacs is not following Unix philosophy at all.

But in a sense, emacs is nothing but elisp interpreter with some addition to aid text editing.

All of those elisp packages are not emacs. They are just elisp packages, running on emacs. And those elisp packages usually are highly specialized tools.

I understand composability means each tools can be combined to build a more complex solution, such as through piping and redirection.

In a sense, elisp packages are just functions. We can use them in our own elisp code. But I know, it is different with the Unix composability.

#GNUEmacs #Emacs

@weavejester

@restorante @demiguru @weavejester

Vi isn't composable either. Sed and Ed and awk are composable.

That argument is out of context when talking about things with user interfaces.

I would say that emacs is ultimately more composable than vi, vim, or neovim. Emacs can integrate easily with other systems and tools.

That's the thing that it does amazingly well. Just because it's a super power doesn't mean that it's not within the philosophy.

The extensibility of #Emacs through integration with other tools is off the charts. That to me is completely within the Unix philosophy. I've been a Unix dev for 45 years. I think I know.

@Zenie @restorante @weavejester The claim that #Emacs is “more composable” than vi/#vim/neovim rests on stretching the meaning of composability. What Unix traditionally meant by composability was the ability to take simple, single-purpose tools and connect them together via well-defined interfaces (stdin/stdout, pipes, files). By that definition, ed, sed, and awk are indeed composable—they were designed to slot into pipelines without friction.

@Zenie @restorante @weavejester Vi (and later vim/neovim) may not fit that classical mold perfectly, but they do adhere to it in a limited way:

They operate directly on plain text files (not opaque binary state).
They can be scripted through ex commands.
They can be invoked non-interactively to perform transformations (vi -es).

That’s composability in the Unix sense: predictable input/output behavior and scriptable interfaces.

@Zenie @restorante @weavejester Emacs, on the other hand, is extensible, but extensibility is not the same as composability. Extensibility often means pulling other tools into Emacs, wrapping them in Lisp, and effectively making Emacs the hub of everything.
@Zenie @restorante @weavejester That’s closer to integration or even absorption, not composition. You don’t pipe the output of grep into Emacs and get a text transformation out the other side—you embed grep within Emacs as a Lisp function call.

@Zenie @restorante @weavejester That’s philosophically different.

Vim is composable in the Unix tradition because it’s file-centric, scriptable, and plays in pipelines.
Emacs is extensible and integrative, but its model of absorbing everything into itself arguably violates the spirit of “do one thing well.”

In other words, if we’re being strict about Unix philosophy, Emacs is powerful, but it’s less “composable” than vim—it’s more of an operating system in itself.

@demiguru

I am not an expert of elisp. But may be you are interested to:

https://www.gnu.org/software/emacs/manual/html_node/emacs/Command-Example.html

echo "Hello World" | emacs --batch --eval '(progn (insert (read-from-minibuffer "Input: ")) (write-region (point-min) (point-max) "output.txt"))'

I just simply copy paste the code above

@Zenie @weavejester

Command Example (GNU Emacs Manual)

Command Example (GNU Emacs Manual)

@restorante @Zenie @weavejester

What you’ve shown is Emacs scripting, which is fine, but it’s internal extensibility — you’re writing Emacs Lisp that runs inside Emacs. That’s not the same as taking existing Unix tools and composing them through standard input/output.

In your example: echo "Hello World" | emacs --batch --eval '…'

@restorante @Zenie @weavejester

Notice that echo isn’t actually feeding data through stdin to Emacs in a composable pipeline — instead Emacs is prompting and inserting via Elisp. Compare that to: echo "Hello World" | sed 's/World/Unix/'

@restorante @Zenie @weavejester echo "Hello World" | awk '{ print toupper($0) }'

Here, the tools are directly transforming streams, no custom scripting language needed.

@demiguru @restorante @Zenie @weavejester awk or sed is your scripting language in that case (much simpler and more limited than emacs lisp but still). 's/World/Unix' is your script, and you could write that to a file, use more complex or multiple commands etc. With emacs you can achieve the same thing and make it more composable by making a few adjustments to the example above:

@demiguru @restorante @Zenie @weavejester

echo "Hello World" | emacs --batch --eval '(progn (insert (read-from-minibuffer "")) (princ (string-replace "World" "Unix" (buffer-string))))'

This does the same as 's/World/Unix/' in sed and prints it again to standard output. It's not that #emacs is not composable like that, but that it's usually used interactively (because that's more fun).

@demiguru @restorante @Zenie @weavejester also, I think of #emacs more like a universal interface to your computer, the command line, all the tools you call etc. And in that sense I would interpret the unix philosophy a bit differently: the individual tools, whether that's a command line program or a lisp function, should do one thing well and be composable, but IMO it doesn't matter if you pipe them together on the command line or you combine them within emacs.

@eruwero
I get that view — #Emacs can feel like a universal interface to the system, and its #Lisp functions are composable in their own right.

Where I see the #Unix philosophy diverge is in the boundary: tools designed as separate executables, with contracts enforced by the #OS, versus composition inside a single runtime. Both routes achieve interoperability, but one leans on external guarantees, the other on internal extensibility.

@restorante @Zenie @weavejester

@demiguru @restorante @Zenie @weavejester IMO this internal/external distinction is relatively arbitrary. In one case you have "separate executables" that you call from a shell, which is equivalent to calling a function, with the shell being the interpreter. In the other case you have lisp functions and a lisp interpreter (emacs) to call them.
@eruwero @restorante @Zenie @weavejester Right, that’s the analogy I was pointing at — a #shell is an interpreter, processes are its “functions.”
The key difference is that in the #Unix model, the #OS enforces the separation: each process is isolated, communicates through defined streams, and can be swapped out independently. In #Emacs, #Lisp functions share one runtime. Both are composable, but the guarantees differ.

@demiguru @restorante @Zenie @weavejester ok I get your point. I still prefer the lisp machine/emacs approach were there are as few arbitrary boundaries as possible and everything can be modified dynamically, but that's a philosophical issue :)

What I still don't get is how vi/vim/neovim better fits into this unix model because you use it in a similar way as emacs, you usually don't use it in some pipeline in the shell, even if you could do that. So AFAIU they are equivalent wrt that

@eruwero @[email protected] @Zenie @weavejester Fair point — in practice, most people don’t drop Vim/Neovim into pipelines either. The distinction isn’t about what users *typically* do, but what the tools were designed around.
#Vim/#Neovim operate directly on text files and expose transformations that can be invoked non-interactively (`-es`, ex commands, reading/writing from stdin/out).
@eruwero @restorante @Zenie @weavejester That puts them closer to the #Unix “small tool + text stream” model, even if most use is interactive.
#Emacs can absolutely script and integrate too, but its defaults lean toward internal composition inside #Lisp. Different defaults, different traditions — even if in day-to-day use they both feel like editors first.