From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: William Xu Newsgroups: gmane.emacs.help Subject: Re: Wait for compile to finish Date: Fri, 21 Oct 2005 23:43:48 +0800 Organization: the Church of Emacs Message-ID: <873bmu7u4r.fsf@williamxwl.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1129912083 1508 80.91.229.2 (21 Oct 2005 16:28:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 21 Oct 2005 16:28:03 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 21 18:28:00 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ESzh2-0001EW-I2 for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Oct 2005 18:24:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ESzh1-0000S3-Ry for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Oct 2005 12:24:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ESz4C-0001R8-BA for help-gnu-emacs@gnu.org; Fri, 21 Oct 2005 11:44:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ESz47-0001Pl-Dm for help-gnu-emacs@gnu.org; Fri, 21 Oct 2005 11:44:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ESz45-0001Pe-HW for help-gnu-emacs@gnu.org; Fri, 21 Oct 2005 11:44:18 -0400 Original-Received: from [64.233.162.193] (helo=zproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ESz45-0003rf-Jt for help-gnu-emacs@gnu.org; Fri, 21 Oct 2005 11:44:17 -0400 Original-Received: by zproxy.gmail.com with SMTP id k1so406212nzf for ; Fri, 21 Oct 2005 08:44:15 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:in-reply-to:organization:references:user-agent:date:message-id:mime-version:content-type; b=Pp1B2M+C1urd4V+TkAQI4AwHPjk/UFsDO0seKnRDoYF6s5zecr89fBZayHHYqyrvudJ07ZGxhzTzUyUtDstcUTmYa6ngMHJVUgv92/+F4K8unz9olCjeGp5M2wwLuS/tavrFYW8fMoCa0HbNHf9KfQcMyX5ieppyePCmXx+3fmM= Original-Received: by 10.37.13.75 with SMTP id q75mr3318580nzi; Fri, 21 Oct 2005 08:44:15 -0700 (PDT) Original-Received: from williamxu ( [59.66.131.187]) by mx.gmail.com with ESMTP id p4sm92636nzc.2005.10.21.08.44.14; Fri, 21 Oct 2005 08:44:15 -0700 (PDT) Original-To: help-gnu-emacs@gnu.org In-Reply-To: (bago@ludens.elte.hu's message of "20 Oct 2005 15:07:54 +0200") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) 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:30441 Archived-At: bago@ludens.elte.hu (Toto) writes: > Greetings! > > My problem is the following: > > I would like to have a function, which runs the program, that belongs to > the buffer i'm editing or compile it first if it isn't done already. > To make it more clear. Say, i'm editing helloworld.c and i call this > function, it should execute helloworld.exe (yes, i'm on windows). If > there is no hello.exe in the current directory (or it is older than the > source file) emacs should compile it first and run it afterwards. > > For this purpose I have come up with a funcion similar to the one > below. For this purpose, you might be interested in this: http://www.emacswiki.org/cgi-bin/emacs/smart-compile+.el -- William