From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hongxu Chen Newsgroups: gmane.emacs.help Subject: Re: Simple Emacs for rescue or quick edits? Date: Wed, 31 Jul 2013 09:41:27 +0800 Message-ID: <87ehafa4l4.fsf@gmail.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 1375234916 7989 80.91.229.3 (31 Jul 2013 01:41:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Jul 2013 01:41:56 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Pascal J. Bourguignon" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 31 03:41:58 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 1V4LQJ-0004SA-A4 for geh-help-gnu-emacs@m.gmane.org; Wed, 31 Jul 2013 03:41:55 +0200 Original-Received: from localhost ([::1]:38930 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4LQI-00070Y-Vg for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Jul 2013 21:41:54 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4LQ4-0006zt-3K for help-gnu-emacs@gnu.org; Tue, 30 Jul 2013 21:41:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4LPy-0006Rk-FC for help-gnu-emacs@gnu.org; Tue, 30 Jul 2013 21:41:40 -0400 Original-Received: from mail-pb0-x22e.google.com ([2607:f8b0:400e:c01::22e]:49440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4LPy-0006RL-7G for help-gnu-emacs@gnu.org; Tue, 30 Jul 2013 21:41:34 -0400 Original-Received: by mail-pb0-f46.google.com with SMTP id rq2so136945pbb.5 for ; Tue, 30 Jul 2013 18:41:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=SB0kF5IEAui+AECbYMYcEM3tGRj3wx/Vuw2NNvXtYtI=; b=vuqgOficSh0HkMcQHGC6EJngXToFtwvkQfrhzrDUPE6XM4jtnkbBGBCawtQRX55itn mGdASxRk6VZUl26Y+rm408ZRAAw2ZIS432NaMqGRkVHTKapHAY79S8Mru5hWJhPg20EB GWkD+BTtwaAZFDdMiLo4PkhiPNol2Wz2kqUUloSfKsIItkaTaCw7uc6lGj1J+nYMkvgO G2W3ajZjEgVU74OgGRUlf1hzprU56ZtSGHttAsUniHytiieIkPBAUoafuPtIUIYBV2QB VqZmvuDWfsXmIWk5blwsaOe9+NAjTw2NluMk9z/36MHpLJ2cbENs/fUt0XPbTF2eayWW El3A== X-Received: by 10.68.252.194 with SMTP id zu2mr76504687pbc.58.1375234892921; Tue, 30 Jul 2013 18:41:32 -0700 (PDT) Original-Received: from hongxuchen-VM.STAP ([167.220.232.198]) by mx.google.com with ESMTPSA id 4sm85867183pbw.32.2013.07.30.18.41.30 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 30 Jul 2013 18:41:31 -0700 (PDT) In-Reply-To: <87hafbsmcy.fsf@informatimago.com> (Pascal J. Bourguignon's message of "Wed, 31 Jul 2013 00:40:13 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c01::22e 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:92578 Archived-At: "Pascal J. Bourguignon" writes: > Oleksandr Gavenko 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 < #!/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