From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: Calling external programs in emacs Date: Wed, 18 Jan 2017 10:21:22 -0800 Message-ID: References: <84ae994b-0052-4416-9b68-e9692a26f7e8@googlegroups.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1484763857 17914 195.159.176.226 (18 Jan 2017 18:24:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 18 Jan 2017 18:24:17 +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 Jan 18 19:24:10 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTutl-0002mu-Oh for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Jan 2017 19:23:53 +0100 Original-Received: from localhost ([::1]:43401 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTutq-0008DN-Ep for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Jan 2017 13:23:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTurj-0006zu-03 for help-gnu-emacs@gnu.org; Wed, 18 Jan 2017 13:21:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTuri-0001Cv-21 for help-gnu-emacs@gnu.org; Wed, 18 Jan 2017 13:21:46 -0500 Original-Received: from mail-qt0-x22d.google.com ([2607:f8b0:400d:c0d::22d]:33819) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cTurh-0001Cf-Uq for help-gnu-emacs@gnu.org; Wed, 18 Jan 2017 13:21:45 -0500 Original-Received: by mail-qt0-x22d.google.com with SMTP id l7so22747584qtd.1 for ; Wed, 18 Jan 2017 10:21:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=3rfCWZUg5woKDFeHGTGROfMAGxsL1ZoydbWw6SReGC0=; b=jkj1YpjUqzd237eGmePAlJ668M0peyaOu+AWzUsCWDRg7zg7Nfz7hhOjU7Fedmphfg A7jVv8942og4mLiT+zJvs365+eDD9BZEB5zyMIZzU0PFnXe87Mad9uR0fn7JvX6nzlsZ hqRLjWO0loKGHaSdSDvCtlXuoCt00NX5el+kias9DFMfJ6Vd56DTQ4Pmog+lNMQj/xx9 qnIJNeWbFzAt6ySZRdq9I3y+Vk8vwaQLVsTVKuHM2F3ZSDDAy2pWOoTPnoweB/FsGgOk 4DvBVhL9tThiq2uceZBZCIGahh81X9YJnDq0tPhiv+1Kvs31/RRoqb3jj4WM1eaop3PL U5jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=3rfCWZUg5woKDFeHGTGROfMAGxsL1ZoydbWw6SReGC0=; b=C2D++DfplvgO0C3+oxYvzoEH21H68YmStAEfpXgu8f3dqX5yepaEAlUCE2c1jMrLSN ivYFye3wbZ375CG1J+dIXBdXzCsAPVjV8VpxdR0bpSE4ME6jtzEaubz0vtOobUKcCgBs lETBhwRBoW92a6vDFb5i/IH+euztDu12d2WIPobHzWolOcTSbh5rWbUSaeO8178DB7Ao sUmoQEl/hmBGZz4Sj4Js4tnZ3o5+I/qPBA8tcVzpPFfnQgrX4HCdWqGbVcOo62Pazwya NUfLpzh5rN8ynouvZm8knpo3i1ktLTGlut96Bk70SgZ8UANNfRGQvxgitIB5IVlj94/X eyfQ== X-Gm-Message-State: AIkVDXJmEW83Iif4+lpkiaorBQOX6EVhCQmr+KwrBO0+KdrItmNLOSaCrxMV+6/JRa1lBlscR9QSzFnnNMLbfg== X-Received: by 10.237.34.38 with SMTP id n35mr3837611qtc.253.1484763703573; Wed, 18 Jan 2017 10:21:43 -0800 (PST) Original-Received: by 10.237.56.138 with HTTP; Wed, 18 Jan 2017 10:21:22 -0800 (PST) In-Reply-To: <84ae994b-0052-4416-9b68-e9692a26f7e8@googlegroups.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::22d X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:112124 Archived-At: Rusi wrote: > On Saturday, January 14, 2017 at 12:23:46 AM UTC+5:30, Sam Nirvana wrote: > > I'm new to emacs, so forgive my inexperience. > > > > As you know, with Vim I can compile, say, a TeX file from within the > > editor with the following command: > > > > :!pdftex % > > > > Is there a way to do the same thing with emacs? > > Others have already told you about M-! (also to be found on Menu=E2=86=92= Tools=E2=86=92Shell Command) > > The % trick however does not work OTB in emacs > Here is some elisp that can help that > https://lists.gnu.org/archive/html/help-gnu-emacs/2008-08/msg00482.html Someone may have already mentioned this, but Emacs's built-in way to achieve something similar is to type `M-! M-n'. The M-n will cause the relative file name of the current buffer to be inserted, leaving point before it. John