4 ms·
> Like a Lisp Machine, Emacs is totally user programmable at every level It's just that the levels of GNU Emacs don't get as low-level as the Lisp operating sy
by lispm 4y ago
> Like a Lisp Machine, Emacs is totally user programmable at every level
It's just that the levels of GNU Emacs don't get as low-level as the Lisp operating system of Lisp Machine (which is an actual computer with its operating system, and not an programmable editor written on top of operating systems, which were written in C and a bunch of other languages). The levels of a Lisp Machines go all the way down to (for example) the network stack and the actual instructions interfacing with the hardware. GNU Emacs usually re-packages the underlying OS services (I/O, file system, GUI, ...) with a Lisp-based API and one programs with that.
- teddyh 4y agoWell, yes, because GNU Emacs runs on Unix-compatible systems, and Emacs uses the Unix API to do its thing. For instance, Emacs does not implement TCP itself, it uses the Unix TCP/IP stack.
- lispm 4y agoIt also on Linux/UNIX does not create a directory listing itself, but calls an external program, provided by the operating system: ls. Where on a Lisp Machine it calls the Lisp function FS:DIRECTORY-LIST, which underneath is implemented in Lisp via its object system.
- teddyh 4y agoOn a Unix-compatible system, ls(1) is the highest-level interface to get a directory listing. There is no good reason for Emacs to use scandir(3) (or even opendir(3)/readdir(3)).
- lispm 4y agoGNU Emacs has complex code to deal with it. Some "ls" programs support a "-dired" option, some not. If this option is not supported, then Dired may fail to parse some unusual filenames. Then there is an 'ls' emulation in Emacs Lisp, which by default is not used on UNIX, but on Windows... There is a huge machinery with lots of complexity to deal with listing directories, either with ls, a GNU provided ls, or by providing a complex emulation of ls.