Emacs standing alone on a Linux Kernel
informatimago.free.fr
informatimago.free.fr
Many computer users run a modified version of the Emacs system every day, without realizing it. Through a peculiar turn of events, the version of Emacs which is widely used today is often called Linux, and many of its users are not aware that it is basically the Emacs system, developed by the Emacs Project.
There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the Emacs operating system: the whole system is basically Emacs with Linux added, or Emacs/Linux. All the so-called Linux distributions are really distributions of Emacs/Linux!
We're running these on refrigerators.
just saw that you're probably making a joke, as i just found this :) https://www.gnu.org/gnu/linux-and-gnu.en.html
"Emacs is a great operating system, lacking only a decent text editor"
That’s deep. Never heard it before, it does make sense. Thanks.
(setq decent t)
(setq great nil)My only requirement for my first personal PC (T1800, 386/sx, 4 MiB, monochrome) was that it could run True Emacs (on Linux) - I could certainly have used this, but `exec emacs` achieves nearly the same.
I think I was taught that 1st year, or perhaps the predecessor. It's was MIS' first year teaching. IIRC, Trine's array started at 1 and there was much debate over the merits of that vs. starting at zero like C but other than that it was a reasonable language for the time.
Now there is an intriguing idea...
"just install the command you need in /bin" is cheating.
https://wiki.gentoo.org/wiki/Custom_Initramfs
Then just drop the kernel image onto your EFI partition, and you have a single-binary Linux/emacs system!
Mounting an encrypted, logical, or otherwise special root partition Providing a minimalistic rescue shell (if something goes wrong) Customize the boot process (e.g., print a welcome message) Load modules necessary to boot (e.g., third party storage drivers) Anything the kernel can't do that's usually handled in user space
So a lot of things which are not emacs.
M-x eshell is a shell implemented completely in Emacs Lisp and integrates with Emacs really nicely
setxkbmap -option ctrl:nocaps
xmodmap -e "keycode 107 = Control_R"
I would occasionally experience some pinky pain until I did this. Losing capslock is mostly inconsequential (you can always use upcase-region).https://www.masteringemacs.org/article/running-shells-in-ema...
(the whole site has lots of information about emacs)
What them made Lisp Machines was a mix of things:
* the command interface is based on the Lisp REPL (read eval print loop)
* the operating system itself is written in Lisp
* the instruction set of the CPU is optimized for Lisp (for example via microcode)
* the CPU itself might have hardware support for Lisp (for example for efficient GC)
* the hardware itself (console, keyboard, system bus, extension cards, memory, ...) is used directly from Lisp and might be optimized for it (like special keyboards, special memory cards, special fronted computers, ...)
What's OTOH rarely is the case, that they run Lisp directly in Hardware -> which would mean that the CPU itself is a Lisp interpreter.
Anyway, one thing this brings to mind is how much of Linux is encapsulated within the kernel itself. This is why distros feel so... similar.
Egads!
https://re-ws.pl/2020/11/busybox-based-linux-distro-from-scr...
https://nehabodi.sourceforge.net/
I wonder if I could do the same with Slashem.
sure, VI would be faster, but i would have to use vi.
Even after I did the usual toil of analyzing startup times and trimming my vimrc, its speed/responsiveness correlates inversely with the size of the text file that's open. And we're not talking about some artifically-constructed benchmark — just an extra-long ordinary text file (or log file, or code file) sitting around will be enough to make vim start to feel slow.
Maybe we're all just getting old, and the dream of "one text editor for everything" is becoming one of those quaint old notions of yesteryear.
I mean, that's only ever been a dream in the emacs community. Vim might have toy plugins for other stuff, but by and large people use it to edit period. As it should be, isn't the whole UNIX philosophy to do one thing well? If I want email or a text browser in the CLI (I don't) I'll use dedicated, better, faster programs, each on a tmux pane that I can use instantly with a keyboard shortcut, rather than wait for a slow emacs buffer to load.
That's not true and not something you could really accurately guess at.
I have exclusively used one text editor for everything (emacs) for many years.
I also know others that have done the same.
Unfortunately, what with logging in JSON and so on, these two cases aren't really distinct anymore. But if I did want to use one editor for both log viewing and coding, I'd pick the one that was the most easily and interactively customizable.
It really feels like the best of all worlds.
Do you mean vanilla emacs or a bespoke configuration?
Number of buffers should not slow emacs down and never has across many versions and platforms for me on vanilla emacs.
I would find it hard to believe vanilla emacs was slow switching between lots of buffers. Perhaps if you had 6 windows (as emacs refers to panes) evenly split of minified javascript on a single line it would be slow?
However an issue in my bespoke configurations that has caused the buffer switching issue you mention before is adding a call to the modeline and not debouncing.
This goes double for crufty enterprise apps that use editor-in-the-browser panes that get in the way or lose data.
If you were using tmux, you weren't using emacs for everything!
Emacs for everything also includes replacing terminal with eshell/eat and eventually even frequently curses applications with emacs variations.
> Of course, quite a number of syscalls are missing from emacs (not available as elisp primitives), so as it is, it would be hard enough to do EVERYTHING with emacs, but this is a starting point.
That program has traditionally been `/sbin/init` which launches all background things that need to be running, including your `getty`'s for console login, your `sshd` for SSH login, and your `gdm`'s or what not for GUI login.
Lately it's `systemd` which does the same in a less simple but more flexible/featureful manner.
Here, there is literally no other process running but Emacs - it's your "login shell."
This is the first step in replacing `systemd` with `emacs`, and it will take less space and be easier to use. /s
This is cheating. Why not use also bash when you claim you only use emacs ?