help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple Emacs for rescue or quick edits?


From: Hongxu Chen
Subject: Re: Simple Emacs for rescue or quick edits?
Date: Wed, 31 Jul 2013 09:41:27 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

"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 via email to

[Prev in Thread] Current Thread [Next in Thread]