From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dan Espen Newsgroups: gmane.emacs.help Subject: Re: Calling external programs in emacs Date: Fri, 13 Jan 2017 17:34:12 -0500 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1484346945 29639 195.159.176.226 (13 Jan 2017 22:35:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 13 Jan 2017 22:35:45 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 13 23:35:40 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 1cSARU-0006FM-DP for geh-help-gnu-emacs@m.gmane.org; Fri, 13 Jan 2017 23:35:28 +0100 Original-Received: from localhost ([::1]:45590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cSARY-0000j4-Vj for geh-help-gnu-emacs@m.gmane.org; Fri, 13 Jan 2017 17:35:33 -0500 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Original-Injection-Info: mx02.eternal-september.org; posting-host="5204edc3a342e2de0aec4f66b3a2a1d7"; logging-data="16730"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18KlkXQpj7gvvcZSS9J4HKQWUKZ7eILGE0=" Cancel-Lock: sha1:7h6+Jyuftd9uFkWPz2T3wVYZ8ew= Original-Xref: usenet.stanford.edu gnu.emacs.help:219053 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:112114 Archived-At: Sam Nirvana writes: > 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? That runs a shell command in vi. Emacs can do that also (M-!), but for compiling, you want to use the emacs command: M-x compile you probably want to bind a key to that. The main reason you want to do a compile is because the Emacs functions next-error and previous-error work after a compile. The M-x command by default runs the command "make -k". You can just type your command over that. I highly recommend creating a Makefile. -- Dan Espen