From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Arnaldo Mandel Newsgroups: gmane.emacs.help Subject: RE: emacs equivalent of vi % Date: Wed, 13 Aug 2008 08:37:18 -0300 Message-ID: <18594.51054.16986.161383@gargle.gargle.HOWL> References: NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1218627651 11350 80.91.229.12 (13 Aug 2008 11:40:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Aug 2008 11:40:51 +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 Aug 13 13:41:43 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KTEiJ-0000wd-Il for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Aug 2008 13:40:28 +0200 Original-Received: from localhost ([127.0.0.1]:39474 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTEhM-0007Gb-Jb for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Aug 2008 07:39:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KTEh0-0007GM-UW for help-gnu-emacs@gnu.org; Wed, 13 Aug 2008 07:39:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KTEgy-0007FK-QW for help-gnu-emacs@gnu.org; Wed, 13 Aug 2008 07:39:06 -0400 Original-Received: from [199.232.76.173] (port=38367 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTEgy-0007Ex-0r for help-gnu-emacs@gnu.org; Wed, 13 Aug 2008 07:39:04 -0400 Original-Received: from hope.ime.usp.br ([143.107.45.8]:34536) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KTEgx-0005OO-4M for help-gnu-emacs@gnu.org; Wed, 13 Aug 2008 07:39:03 -0400 Original-Received: (qmail 27501 invoked from network); 13 Aug 2008 11:37:16 -0000 Original-Received: from galena.ime.usp.br (143.107.45.17) by hope.ime.usp.br with QMQP; 13 Aug 2008 11:37:16 -0000 In-Reply-To: X-Mailer: VM 7.19 under Emacs 21.2.2 Full-Name: Arnaldo Mandel X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:56554 Archived-At: Rustom Mody wrote (on Aug 13, 2008): > In vi one can do, for example, > :!gcc % > and the current file gets compiled -- ingeneral : > :!someCommand options % otherStuff > and the filename gets interpolated. > Is there any way to get the '%' behavior in emacs? > [Note: I know about compile; I am asking a more general question about > getting the filename] See shell-command-on-region or, better yet, shell-command-with-completion-on-region -- Arnaldo Mandel Departamento de Ciência da Computação - Computer Science Department Universidade de São Paulo, Bra[sz]il am@ime.usp.br Talvez você seja um Bright http://the-brights.net Maybe you are a Bright.