help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sending commands to shell with emacs lisp


From: despen
Subject: Re: sending commands to shell with emacs lisp
Date: Sun, 13 Sep 2009 10:39:27 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

Corey Foote <coreyfoote@hotmail.com> writes:

> Thanks, but I really am just looking for a way to send an "enter"
> keystroke to my *shell* buffer after I've inserted a command. I'm just
> trying to save myself a few keystrokes in my edit, compile, execute cycle.

For that, you want to use a Makefile and M-x compile.

For example, in the Makefile:

all: foo.test

foo: foo.c
     cc foo.c -o foo

foo.test: foo
     foo args


With that Makefile, just do M-x compile and your module
is compiled if need be, then the test is run.

You might use diff in the .test rule to capture the test output
and verify the results.

I've got M-x compile bound to F1 and M-x next-error bound to
F2.

So typically, for do the edit/compile/execute cycle, I finish
my edits, Hit F1, return, and I'm done.

An important advantage with M-x compile is that Emacs will
ask you if you want to save the file before the compile starts.
It's not necessary to remember to save the file.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]