From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleksandr Gavenko Newsgroups: gmane.emacs.help Subject: Re: Simple Emacs for rescue or quick edits? Date: Thu, 01 Aug 2013 00:43:11 +0300 Organization: Oleksandr Gavenko , http://gavenkoa.users.sf.net Message-ID: <87ehaepfrk.fsf@gavenkoa.example.com> References: <87hafbsmcy.fsf@informatimago.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1375307030 22395 80.91.229.3 (31 Jul 2013 21:43:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Jul 2013 21:43:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 31 23:43:52 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V4eBS-0007dn-5g for geh-help-gnu-emacs@m.gmane.org; Wed, 31 Jul 2013 23:43:50 +0200 Original-Received: from localhost ([::1]:36664 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4eBR-0006lv-RN for geh-help-gnu-emacs@m.gmane.org; Wed, 31 Jul 2013 17:43:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4eB7-0006lL-UH for help-gnu-emacs@gnu.org; Wed, 31 Jul 2013 17:43:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4eB0-0004im-I1 for help-gnu-emacs@gnu.org; Wed, 31 Jul 2013 17:43:29 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:35036) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4eB0-0004iO-C4 for help-gnu-emacs@gnu.org; Wed, 31 Jul 2013 17:43:22 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V4eAz-0007ME-AI for help-gnu-emacs@gnu.org; Wed, 31 Jul 2013 23:43:21 +0200 Original-Received: from 178.137.11.9 ([178.137.11.9]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 31 Jul 2013 23:43:21 +0200 Original-Received: from gavenkoa by 178.137.11.9 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 31 Jul 2013 23:43:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 75 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 178.137.11.9 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:N2Udtlt+ubX0b/QOwwcoOu8o6VE= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:92607 Archived-At: On 2013-07-31, Pascal J. Bourguignon wrote: > Why wouldn't it? I use enw: > > $ cat > ~/bin/enw < #!/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 RET (or M-x shell-command). With "emacs -Q" I avoid such issue. -- Best regards!