From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: despen@verizon.net Newsgroups: gmane.emacs.help Subject: Re: Running Programs from Inside Emacs Date: Thu, 17 Feb 2011 10:09:11 -0500 Organization: A noiseless patient Spider Message-ID: References: <73d0253a-5d33-461f-9d55-cc3102cd67cb@glegroupsg2000goo.googlegroups.com> <87r5b6vrmh.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1297957249 22047 80.91.229.12 (17 Feb 2011 15:40:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 17 Feb 2011 15:40:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 17 16:40:45 2011 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.69) (envelope-from ) id 1Pq5yG-0000zx-7e for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Feb 2011 16:40:44 +0100 Original-Received: from localhost ([127.0.0.1]:38533 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pq5yF-00066u-Oa for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Feb 2011 10:40:43 -0500 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 22 Injection-Info: mx01.eternal-september.org; posting-host="jHG/q4CDuHQ12inYDCpZIQ"; logging-data="29030"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/2NJqiyTNYapPArYsuJXsAqItk/1GfO/g=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:mx9OJd8PpUZM1z9uQXB1iJJl1Z4= sha1:44D/WffdjmzmZnko9TUft15GZUQ= Original-Xref: usenet.stanford.edu gnu.emacs.help:185038 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:79196 Archived-At: "Pascal J. Bourguignon" writes: > haziz writes: > >> When using emacs for programming in C, I know how to compile programs from inside emacs using Mx compile to invoke make -k which then compiles using gcc (I am running Linux Mint on a desktop machine at home and also use Mac OS X on a laptop). >> >> I have so far been unable to figure out how to "run" the resulting binary from inside emacs. I would like to be able to then run the binary file from inside emacs. So far I have had to exit emacs returning to my bash shell to run the binary by for e.g. ./helloworld > > For non-interactive programs you can run them after the compilation: > > M-x compile RET C-e && ./helloword RET IMO, better is to use the Makefile. all: helloworld.test helloworld: cc helloworld.c -o helloworld helloworld.test: helloworld ./helloworld