From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: saint@eng.it Newsgroups: gmane.emacs.help Subject: Re: --script and --quick Date: Wed, 27 May 2015 14:02:17 +0200 Message-ID: <21861.45641.561501.901128@mail.eng.it> References: <877frvbdqm.fsf@web.de> <87oal79td9.fsf@wanadoo.es> <87iobfs202.fsf@web.de> <20150526142445521942652@bob.proulx.com> <21861.27223.977546.127174@mail.eng.it> <87lhgas0fb.fsf@web.de> Reply-To: Gian Uberto Lauri NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1432728173 2708 80.91.229.3 (27 May 2015 12:02:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 May 2015 12:02:53 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 27 14:02:47 2015 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 1Yxa2p-0003R1-1L for geh-help-gnu-emacs@m.gmane.org; Wed, 27 May 2015 14:02:47 +0200 Original-Received: from localhost ([::1]:53477 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yxa2o-0005h2-Dy for geh-help-gnu-emacs@m.gmane.org; Wed, 27 May 2015 08:02:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yxa2X-0005gX-Qm for help-gnu-emacs@gnu.org; Wed, 27 May 2015 08:02:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yxa2T-0002jO-PC for help-gnu-emacs@gnu.org; Wed, 27 May 2015 08:02:29 -0400 Original-Received: from relay.eng.it ([91.109.60.38]:49492 helo=mail.eng.it) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yxa2T-0002iQ-8d for help-gnu-emacs@gnu.org; Wed, 27 May 2015 08:02:25 -0400 Original-Received: from MAVK-1 (unknown [192.168.10.71]) by deliver.antivirus (Postfix) with ESMTP id 6630A4400B; Wed, 27 May 2015 14:02:23 +0200 (CEST) Original-Received: from quigley (unknown [172.27.7.115]) by mail.eng.it (Postfix) with ESMTP id 13A1244007; Wed, 27 May 2015 14:02:23 +0200 (CEST) In-Reply-To: <87lhgas0fb.fsf@web.de> X-Mailer: VM 8.1.1 under 24.4.1 (x86_64-unknown-linux-gnu) X-echelon-food: SIRC Amherst Trafficking SIN FSB Homeland security monarchist 2600 Magazine AK-47 Extreme weather TRW Cornflower PBX NACSI UXO X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Status: not scanned, disabled by settings X-KLMS-AntiPhishing: Clean, 2015/05/27 08:34:08 X-KLMS-AntiVirus: Kaspersky Security 8.0 for Linux Mail Server, version 8.0.1.705, bases: 2015/05/27 07:15:00 #8687980; khse: 2014-03-12 13:55:01 X-KLMS-AntiVirus-Status: Clean, skipped X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 91.109.60.38 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:104611 Archived-At: Michael Heerdegen writes: > "Gian Uberto Lauri" writes: >=20 > > ---------------------------------8<---------------------- > > #!/bin/bash > > > > emacs --quick --script $@ > > ---------------------------------8<---------------------- >=20 > And put the code into a different file=3F *This* is the interpreter (a wrapper for Emacs). Use it for all your scripts. -------------------------8<-------------------------- #!/home/saint/bin/esh (find-file "paperoga") (insert (concat "hello" "world")) (save-buffer) -------------------------8<-------------------------- This is a script . BTW, I often use emacsclient --eval to invoke functions in a running and is faster, but could block the foreground Emacs for a while. My favourite strategy is a little shell script that targets the files and processes them within Emacs. --=20 /\ =5F=5F=5F Ubuntu: anci= ent /=5F=5F=5F/\=5F|=5F|\=5F|=5F=5F|=5F=5F=5FGian Uberto Lauri=5F=5F=5F=5F=5F= African word //--\| | \| | Integralista GNUslamico meaning "I can \/ coltivatore diretto di software not install gi=E0 sistemista a tempo (altrui) perso... Debian" Warning: gnome-config-daemon considered more dangerous than GOTO