3 ms·
If Emacs had (defun kill-paragraph (string cursor) ...) ; resulting in a new string/cursor its use would look nothing like the equivalent editing
by morelisp 4y ago
If Emacs had
(defun kill-paragraph (string cursor)
...) ; resulting in a new string/cursor
its use would look nothing like the equivalent editing operation, and the user and Emacs Lisp worlds would be nearly incommensurate. You might as well have a plugin system!
- eadmund 4y agoTo expand on some of the implicit knowledge here: it's helpful to know that Emacs user-level commands are just Lisp functions bound to keys (e.g. one could bind kill-paragraph to C-M-k). The command an end-user binds to use interactively is the exact same command that a programmer would use when writing a program. If things were bifurcated, then as morelisp notes there would be one suite of functions for complex string manipulation, and there would be some binding of keys to commands, and there would be some glue code between them which would have to be written for anything exposed to the user. Which means someone would have to write that glue, someone would have to make choices about it, someone would have to maintain it. That would have required quite a lot of activation energy to move from being a user to being a programmer, as Mr. Petersen points out in his excellent entry. Instead, in Emacs users can program and programmers can use. Famously, secretaries learned to program Emacs without any guidance or prompting! There is no artificial boundary between user and developer. This is very similar to how Excel enables business users to develop solutions, to be honest, but an order of magnitude more powerful (because Emacs exposes so much more to the user-programmer than does Excel).