* Simple Emacs for rescue or quick edits?
@ 2013-07-30 21:29 Oleksandr Gavenko
2013-08-01 6:34 ` Luca Ferrari
0 siblings, 1 reply; 8+ messages in thread
From: Oleksandr Gavenko @ 2013-07-30 21:29 UTC (permalink / raw)
To: help-gnu-emacs
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.
I look to jove and zile:
http://www.emacswiki.org/emacs/ErsatzEmacs
but both have no colours support...
I become think that EDITOR=vim is best option...
joe also have syntax highlighting but I prefer to remember vim commands then
joe own...
Any suggestions?
--
Best regards!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Simple Emacs for rescue or quick edits?
[not found] <mailman.2187.1375219801.12400.help-gnu-emacs@gnu.org>
@ 2013-07-30 21:35 ` Emanuel Berg
2013-07-30 22:40 ` Pascal J. Bourguignon
1 sibling, 0 replies; 8+ messages in thread
From: Emanuel Berg @ 2013-07-30 21:35 UTC (permalink / raw)
To: help-gnu-emacs
Oleksandr Gavenko <gavenkoa@gmail.com> writes:
> But in case of rescue and EDITOR env var running Emacs is not
> convenient.
Can't you have Emacs running all the time?
--
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Simple Emacs for rescue or quick edits?
[not found] <mailman.2187.1375219801.12400.help-gnu-emacs@gnu.org>
2013-07-30 21:35 ` Emanuel Berg
@ 2013-07-30 22:40 ` Pascal J. Bourguignon
2013-07-31 1:41 ` Hongxu Chen
` (2 more replies)
1 sibling, 3 replies; 8+ messages in thread
From: Pascal J. Bourguignon @ 2013-07-30 22:40 UTC (permalink / raw)
To: help-gnu-emacs
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
> Any suggestions?
Use emacs, always emacs.
--
__Pascal Bourguignon__ http://www.informatimago.com/
A bad day in () is better than a good day in {}.
You know you've been lisping too long when you see a recent picture of George
Lucas and think "Wait, I thought John McCarthy was dead!" -- Dalek_Baldwin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Simple Emacs for rescue or quick edits?
2013-07-30 22:40 ` Pascal J. Bourguignon
@ 2013-07-31 1:41 ` Hongxu Chen
2013-07-31 5:13 ` Teemu Likonen
2013-07-31 21:43 ` Oleksandr Gavenko
2 siblings, 0 replies; 8+ messages in thread
From: Hongxu Chen @ 2013-07-31 1:41 UTC (permalink / raw)
To: Pascal J. Bourguignon; +Cc: help-gnu-emacs
"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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Simple Emacs for rescue or quick edits?
2013-07-30 22:40 ` Pascal J. Bourguignon
2013-07-31 1:41 ` Hongxu Chen
@ 2013-07-31 5:13 ` Teemu Likonen
2013-07-31 21:43 ` Oleksandr Gavenko
2 siblings, 0 replies; 8+ messages in thread
From: Teemu Likonen @ 2013-07-31 5:13 UTC (permalink / raw)
To: Pascal J. Bourguignon; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 389 bytes --]
Pascal J. Bourguignon [2013-07-31 00:40:13 +02:00] wrote:
> 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
> [pjb@kuiper :0.0 ~]$ time emacs -q -nw -e 'kill-emacs'
> real 0m0.573s
You should probably drop caches before running those tests.
$ sync; sudo sh -c 'echo 3 >/proc/sys/vm/drop_caches'
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Simple Emacs for rescue or quick edits?
2013-07-30 22:40 ` Pascal J. Bourguignon
2013-07-31 1:41 ` Hongxu Chen
2013-07-31 5:13 ` Teemu Likonen
@ 2013-07-31 21:43 ` Oleksandr Gavenko
2 siblings, 0 replies; 8+ messages in thread
From: Oleksandr Gavenko @ 2013-07-31 21:43 UTC (permalink / raw)
To: help-gnu-emacs
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!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Simple Emacs for rescue or quick edits?
2013-07-30 21:29 Simple Emacs for rescue or quick edits? Oleksandr Gavenko
@ 2013-08-01 6:34 ` Luca Ferrari
2013-08-01 15:01 ` Stefan Monnier
0 siblings, 1 reply; 8+ messages in thread
From: Luca Ferrari @ 2013-08-01 6:34 UTC (permalink / raw)
To: Oleksandr Gavenko; +Cc: help-gnu-emacs
On Tue, Jul 30, 2013 at 11:29 PM, Oleksandr Gavenko <gavenkoa@gmail.com> wrote:
> 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.
>
> I look to jove and zile:
>
> http://www.emacswiki.org/emacs/ErsatzEmacs
>
> but both have no colours support...
>
> I become think that EDITOR=vim is best option...
mg? Is an emacs-like client but has not all the lisp features.
Luca
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Simple Emacs for rescue or quick edits?
2013-08-01 6:34 ` Luca Ferrari
@ 2013-08-01 15:01 ` Stefan Monnier
0 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2013-08-01 15:01 UTC (permalink / raw)
To: help-gnu-emacs
> mg? Is an emacs-like client but has not all the lisp features.
I think the currently-supported equivalent is Zile. It's not "the real
thing" but when working on a 4MB home router, it's a pretty
good approximation.
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-08-01 15:01 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-30 21:29 Simple Emacs for rescue or quick edits? Oleksandr Gavenko
2013-08-01 6:34 ` Luca Ferrari
2013-08-01 15:01 ` Stefan Monnier
[not found] <mailman.2187.1375219801.12400.help-gnu-emacs@gnu.org>
2013-07-30 21:35 ` Emanuel Berg
2013-07-30 22:40 ` Pascal J. Bourguignon
2013-07-31 1:41 ` Hongxu Chen
2013-07-31 5:13 ` Teemu Likonen
2013-07-31 21:43 ` Oleksandr Gavenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).