Hacker News new | ask | show | jobs
by waynecochran 1515 days ago
Doesn't emacs have a nano mode?
3 comments

Regardless emacs can take long to boot up (unless you invoke it with -Q) but nano is instant. So when I need to change one line of a file real quick, nano is the better tool imho.
I launch Emacs when I log in just after booting. It restores its desktop (all the frames and buffers) and I never close it. Even though it has to restore a couple of dozen buffers and nearly that many frames it takes only a few seconds anyway.

As I am in Emacs anyway opening a file is very fast unless it's a really large file, multiple giga bytes.

Why would anyone close Emacs? Do you close the web browser too? What about X Windows?

Even without a server, modern Emacs can load quite swiftly by making use of deferred loading on demand. I stopped using an Emacs server some time ago because it loads fast enough, now.
I haven’t used Emacs in a few years and I don’t remember the startup time being a problem. Maybe because I always left it running?

Anyway, I looked up what people are saying these days. Looks like maybe a second or two?

https://www.reddit.com/r/emacs/comments/m8d55l/what_is_your_...

Setting up emacs server pretty much solves this problem as each subsequent launch uses the same running daemon. After that you just set up an alias that launches emacsclient like the following:

alias editor='emacsclient -t'

alias visual='emacsclient -c -a emacs'

Unfortunately, I don't expect to have emacs server running in an EC2 instance intended to run a company service since it needs to be a copy of prod instance (for testing/development). In such instances nano is helpful.
Ah, yes that is where tramp emacs package comes in handy, as it allows one to edit remote files within your local instance of emacs.

Note there is also helm-aws [https://github.com/istib/helm-aws] for managing AWS EC2 server instances directly from Emacs.

I like JED for that.
Maybe you can get one. I don’t see a nano mode in MELPA or GNU, and it doesn’t ship with Emacs. Nano is also much more likely to be installed than Emacs, especially since Apple stopped shipping Emacs with macOS.
Apple also stopping shipping nano with macOS (as of 12.3) and went back to pico.
Huh, interesting. Nano is symlinked to pico. I never noticed, since I don’t use it.
GNU Nano is GPLv3 which Apple boycots (its v3 since 2007 according to Wikipedia). Tells us GPLv3 works :-) not sure what the license of Pico is. My first text editor was Q&A on MSDOS, it relied on F-keys, and on Windows 9x I got used to ctrl as modifier. Pico/Pine and later Nano was a natural successor, easy to learn. I use Vim and ST now.
> not sure what the license of Pico is

Apache 2.0. I've used pine as a mail reader for well over two decades at this point, mostly on big old UNIX boxes. GNU nano always felt like the knockoff version.

Right,it got relicensed. Originally it was not available on e.g. Debian.
I don't even think Pico is in active development any more.
I wish they wouldn't do that. Nano is not Pico.
Vim isn't vi, but vi is usually symlinked to vim. And sh is very often a symlink to something like dash or bash.
can't you just... use nano?