4 ms·
related, this works, even on macos: #!/usr/bin/emacs --script (message "hello, world")
by m463 6y ago
related, this works, even on macos:
#!/usr/bin/emacs --script
(message "hello, world")
- jinwoo68 6y agoSadly Apple doesn’t ship emacs anymore with macos. Of course you can (should?) install yourself.
- m463 6y agoWow, really? I always install from https://emacsformacosx.com/ https://emacsformacosx.com/ and didn't check on the text-only emacs. EDIT: Catalina killed it. Apple disappoints me.
- gumby 6y agoThat’s odd and sad, as simple emacs bindings (c-a, c-k, c-y etc) are included in every app that uses the standard text libraries. Took me years to notice as they were so deeply wired into my fingers that I just used them intuitively.
- neilv 6y agoI once did that for Web CGI with pretty elaborate HTML that used pulled data. Doing Web CGI in Emacs Lisp at the time was even much more productive than in Perl. If someone is trying to measure the executable startup performance, check that you've disabled loading of non-base Emacs Lisp code you don't need, and also make sure that your application code is byte-compiled on disk. (Usually, compiling the base Emacs binary involves/d loading a lot of Lisp code and doing whatever bytecompiling it did in that version, and then saving a core image to disk, so that you don't have to do all that expensive stuff. But if your distro is forcing loading a lot of additional Emacs Lisp code at each startup, you'll take a big hit. There are command line arguments to disable the site-specific and account-specific Emacs Lisp loading.)