[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Simple Emacs for rescue or quick edits?
From: |
Oleksandr Gavenko |
Subject: |
Re: Simple Emacs for rescue or quick edits? |
Date: |
Thu, 01 Aug 2013 00:43:11 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
On 2013-07-31, Pascal J. Bourguignon wrote:
> 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
>
I also make another check:
$ strace emacs -q -nw -e 'kill-emacs' 2>&1 | grep ^open | grep -v ENOENT
347
$ strace emacs -Q -nw -e 'kill-emacs' 2>&1 | grep ^open | grep -v ENOENT
118
$ strace vim -u NONE -c 'q' 2>&1 | grep ^open | grep -v ENOENT | wc -l
81
Seems that Debian site-lisp slow down loading of bare emacs. So -Q is another
good suggestion.
Some strange I see in:
$ strace emacs -Q -nw -e 'kill-emacs' 2>&1 | grep ^open
203:1294:open("/home/user/.abbrev_defs", O_RDONLY) = 4
... 4 times more ...
I don't use abbrev.el. And my ~/.abbrev_defs has a lot of empty:
(define-abbrev-table 'shell-mode-abbrev-table '(
))
Look like suggestion for Emacs improvement (disabling abbrev with -Q).
> 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 check on my system - both really fast (emacs 2 time slower, but who care if
it is 0.04s)!
>> Any suggestions?
>
> Use emacs, always emacs.
I use sh wrapper around "exec emacsclient -a emacs -n". '-n' is essential
part.
But Emacs block itself ever with "emacsclient -n" when you try run:
M-! emacsclient -n <FILE-OR-DIR> RET (or M-x shell-command).
With "emacs -Q" I avoid such issue.
--
Best regards!