unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Oleksandr Gavenko <gavenkoa@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Simple Emacs for rescue or quick edits?
Date: Thu, 01 Aug 2013 00:43:11 +0300	[thread overview]
Message-ID: <87ehaepfrk.fsf@gavenkoa.example.com> (raw)
In-Reply-To: 87hafbsmcy.fsf@informatimago.com

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!




  parent reply	other threads:[~2013-07-31 21:43 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
2013-07-31  5:13   ` Teemu Likonen
2013-07-31 21:43   ` Oleksandr Gavenko [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87ehaepfrk.fsf@gavenkoa.example.com \
    --to=gavenkoa@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).