Mg: an Emacs-like editor in 160 kb
homepage.boetes.org
homepage.boetes.org
mg seems almost, but not quite, entirely unlike emacs.
the thing that makes emacs emacs is not the keybindings or the so-called "modeless" editing (which is a misinterpretation by vim folks, emacs is way more modeful than vim), but the built-in scriptability / extensibility.
In my experience it highly depends on the editor. With Sublime Text 3 on OS X, each keystroke is delayed by SSHFS' latency. It's a pain.
Tramp transfers the files back and forth, always working on a local copy (if I remember correctly). It provides a better experience.
Some of the most frequent operations, like switching between buffers or windows takes 3 key strokes!
It can take more keystrokes than that, even, if you have three or more windows.
You can also cross compile it (which you cannot do to Emacs).
Microemacs and derivatives like MG or uemacs dates back to the mid 80's, and has been ported to pretty much any platform and OS you can think of (first time I came across one of them was on the Amiga in the late 80's), so they're practical if you want the same experience "everywhere", including places too limited to bog down with a full emacs, and when you don't want that experience to be vim.
I believe that Workbench 2+ for the Amiga came bundled with MicroEMACS, though!
And Nano is only an option for me to escape the horror of vi if I for some reason can't install an emacs-like.
Other than that I use Emacs variants in Common Lisp for programming. Mostly derivatives of Hemlock, an Emacs editor written in Common Lisp by CMU in the early 80s.
crontab -e
Select an editor: 4. /usr/bin/mg
there it is, that's why sometimes we need this program.A Forth REPL ?
[0] of FFMPEG, QEMU, BPG, TCC, JSLINUX and more fame.
That is mostly not like not Emacs? Or did Zwei and other emacsen had the same key bindings as emacs and gnu's readline?
The Lisp scripting is the entire point of Emacs. Who cares about the keybindings. I don't really see the point. Can't you just compile emacs? I remember 25 years ago when people thought emacs was too big, and small emacs clones were popular, but in 2015 no one cares, right?
Rather than solving these easier useless problems, why doesn't someone solve the harder problem of making a better emacs clone with a high-performance Emacs Lisp clone. Then Emacs could be used to replace Visual Studio, Xcode, etc. Emacs is an editor construction kit:
I mean, I can run full GNU Emacs on my Raspberry Pi. What's the point of a "micro emacs" missing all the good parts?
http://superuser.com/questions/313105/ram-requirements-of-em...
A dozen Emacs "clones" already exist for even lower memory machines:
https://www.gnu.org/software/zile/
http://www.emacswiki.org/emacs/Jove
Anyway, like I mentioned, wouldn't time be better spent creating a high-performance clone rather than a partially functional tiny clone?
My point exactly. These little routers have just a few megs of RAM. Emacs also has ~70MB of (compressed!) elisp files. On a machine with single digit MBs of flash, that's just not workable.
And! Even if you do have 70MB of disk and 16MB of RAM available, Emacs isn't necessarily performant. Emacs was dog slow when I had a $5/month prgmr vm, but Mg was blazing fast.
> A dozen Emacs "clones" already exist for even lower memory machines
Mg isn't new, in case that is what you are thinking (it's at least 10 years old).
I tried a bunch of tiny emacs clones a few years ago and Mg was the absolute best. All the rest had weird gratuitous differences or were missing obvious important keys (one of them didn't have M-d). Mg isn't complete (obviously) but it has a surprising number of plain editing keystrokes built in and functions perfectly for editing conf files or crontabs or other small remote tasks.
> Anyway, like I mentioned, wouldn't time be better spent creating a high-performance clone rather than a partially functional tiny clone?
Whose time? And what do you mean by high-performance clone?
Edit: I see, I missed your (way) above comment. To re-answer: Those tasks are orthogonal. Nifty higher level editing junk is certainly a good idea, and people are working on it. I don't see why it would need to be an Emacs clone though, why not just make Emacs itself better? That's the whole point of it in the first place.
Mg is based on MicroEmacs, as far as I know, which makes it roughly 30 years old.
That said, I do use jove every single day...
"Stop slacking you lazy bum!",
"slacker slacker lazy bum bum bum slacker!",
"I could search... but I'm a lazy bum ;)",
"sshutup sshithead, ssharpsshooting susshi sshplats ssharking assholes.",
"Lazy bums slacking on your asses."
etc!Here are some other data points: Hickey (Clojure) uses the stock Acqumacs with zero customization and Graham (creator of HN and the first real web app) uses plain vi to edit Lisp.
If you want to use a text editor to get work done, sane defaults and an editor that gets out of the way is king.
It can be, but it doesn't have to be. Sometimes more is more.
As for your examples...
> Here are some other data points: ... Graham (creator of HN and the first real web app) uses plain vi to edit Lisp.
And you can tell the great amount of effort that makes him put into this very fine website, can't you?
This is probably the worst website I frequently visit in terms of features, design, technical basis and mobile readability. It sucks in all respects except community.
If this is the pinnacle of websites which vi can get us, please move everyone everywhere to anything else, notepad included. I've created better websites than this in Notepad (during my early university years), and that's not a joke.
2. Emacs daemon - as many suggest, why would you ever quit emacs?
But if you do find you shut Emacs down...
3. Slimmed down alternative init eg. https://github.com/ocodo/.emacs.d/blob/master/emacsq & https://github.com/ocodo/.emacs.d/blob/master/emacsq.el (note this init could be even slimmer, but the start time is about 2.5 seconds, which is fast enough, and I get a very well configured environment)
Or just ...
4. emacs -Q - no init.
One of these are going to solve your issue, without having to interrupt your emacs flow.
You could also look at your init for bottlenecks and have a secondary script. Which you can optionally run when you want those features. Keep the real init minimal.
There's many strategies.
Only annoying thing is the way it retains buffers for modified files when you exit, even if you choose not to save them.
emacs -q (or faster, -Q) could be used in a pinch, but I find default emacs almost unusable.
global-set-key "\^h" delete-backward-char
global-set-key "\e[1~" beginning-of-line
global-set-key "\e[4~" end-of-line
set-default-mode fill
set-fill-column 72
Been using it for quite some time and really dig it.
curl -O http://homepage.boetes.org/software/mg/mg-20150316.tar.gz
And I can't remember when the last time i've had a program compile with just 'make' and no messing about. It's quite impressive. Thank you!For those of us who just want a clean, fast, light-weight editor, mg is great. It's what Emacs would have been had it been an editor, instead of something else.
The thing is, vi is much better at being "just an editor" than emacs is. The key bindings for vi are highly ergonomic and let you keep your fingers on the home row almost all the time. With emacs, you're playing "twister" with your fingers, often pressing 3 or 4 keys simultaneously just do to some simple task like quitting or indenting a paragaph. vi also supports things like deleting to the end of the line, going to the end of the file, or even appending to the end of a line with a single keypress.
If you're using something with emacs key bindings but no emacs-like extensibility, you're really getting the worst of both worlds. You really should just be using vi. And you will find a lot of people with your philsophy who use it, and it is installed on nearly every system out there.
I happily used it on my first Linux computer, which only had 4 megs of ram.
I like GNU Emacs, and I run GNU Emacs most of the time.
I _do_ know how to use vi/vim and I'm quite pragmatic on the matter.
When I am doing server configurations, by the way, vi/vim start up way, way more quickly than GNU Emacs.
This is good, but as I use emacs most of the time, I end up in mixing keyboard shortcuts.
Thus, on my system, $EDITOR is /usr/bin/mg and /usr/bin/vi (vi, not vim) is a symlink to /usr/bin/mg.
So I get emacs keybindings and a fast-starting editor.
If i __do__ need syntax highlighting or anything, i run vim (not a symmlink) or the full GNU Emacs.
Put simply.
BTW, anyone have a copy of Gosling's emacs? I know it went closed source, but I doubt it matters at this point.