Hacker News new | ask | show | jobs
by barrkel 4198 days ago
Emacs can be made prettier, but that's not its forte - power and extensibility are. It's a better text editor, IMO, than any of the three you mention.

However, it's not particularly suited to quick server admin stuff. If you're using emacs as its intended, you'll have a lot of packages to load on startup, making it sluggish for ad-hoc editing with sudo (precluduing use of emacsclient). Emacs -q or mg would be faster. Personally, I'm fond of joe for this purpose - more functionality than mg while far smaller an install than emacs.

1 comments

>ad-hoc editing with sudo (precluding use of emacsclient)

It looks to me like you're probably unaware that an Emacs not running as root can edit files owned by root. The way it goes about it (in a word, TRAMP) is a little complicated under the hood, but (at least for files residing on the same machine as the Emacs process) reliable.

Specifically, both C-x C-f /sudo::/etc/hosts and `emacsclient /sudo::/etc/hosts` work.

And you can have something fun like the following in your bashrc to allow attaching to your running emacs daemon any time you need in the terminal:

    function semacs() {
      emacsclient -t -a "" "/sudo::$(realpath $@)"
    }
Even more fun is using tramp to edit files as root on a machine via ssh. The whole installed editor canard is somewhat a nonissue from the emacs side.