all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hongxu Chen <leftcopy.chx@gmail.com>
To: "Pascal J. Bourguignon" <pjb@informatimago.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Simple Emacs for rescue or quick edits?
Date: Wed, 31 Jul 2013 09:41:27 +0800	[thread overview]
Message-ID: <87ehafa4l4.fsf@gmail.com> (raw)
In-Reply-To: <87hafbsmcy.fsf@informatimago.com> (Pascal J. Bourguignon's message of "Wed, 31 Jul 2013 00:40:13 +0200")

"Pascal J. Bourguignon" <pjb@informatimago.com> writes:

> Oleksandr Gavenko <gavenkoa@gmail.com> writes:
>
>> Sometime I need quick small editor. I maintain (in ~/.bashrc):
>>
>>   alias e=emacsclient -a emacs -n
>>
>> for most cases it's enough.
>>
>> But in case of rescue and EDITOR env var running Emacs is not convenient.
>
> Why wouldn't it?  I use enw:
>
> $ cat > ~/bin/enw <<EOF
> #!/bin/bash
> exec emacs -q -nw "$@"
> EOF
> $ chmod 755 ~/bin/enw
> $ export EDITOR=enw
> $ export VISUAL=enw
>
>
> alias e='emacs -q -nw' # works too.
>
> for quick edits.   And when I say quick, I mean quick: almost 1/4 the
> boot time of vim:
>
> [pjb@kuiper :0.0 ~]$ time echo :q |vim
> real    0m2.027s
> user    0m0.016s
> sys     0m0.008s
>
> [pjb@kuiper :0.0 ~]$ time emacs -q -nw -e 'kill-emacs'
> real    0m0.573s
> user    0m0.528s
> sys     0m0.040s

I don't believe the comparison is proper. Shouldn't be written like this?

~ > time vim -u NONE -c 'q'
vim -u NONE -c 'q'  0.01s user 0.01s system 44% cpu 0.045 total
~ > time command emacs -Q -nw -e 'kill-emacs'
command emacs -Q -nw -e 'kill-emacs'  0.11s user 0.05s system 97% cpu 0.165 total

The idea of startup time comparison is not that meaningful though. And
the best way is just what you have mentioned: keep emacs running on.

>  
>
>> Any suggestions?
>
> Use emacs, always emacs.

-- 
Best Regards,
Hongxu Chen



  reply	other threads:[~2013-07-31  1:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2187.1375219801.12400.help-gnu-emacs@gnu.org>
2013-07-30 21:35 ` Simple Emacs for rescue or quick edits? Emanuel Berg
2013-07-30 22:40 ` Pascal J. Bourguignon
2013-07-31  1:41   ` Hongxu Chen [this message]
2013-07-31  5:13   ` Teemu Likonen
2013-07-31 21:43   ` Oleksandr Gavenko
2013-07-30 21:29 Oleksandr Gavenko
2013-08-01  6:34 ` Luca Ferrari
2013-08-01 15:01   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ehafa4l4.fsf@gmail.com \
    --to=leftcopy.chx@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=pjb@informatimago.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.