all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: despen@verizon.net
To: help-gnu-emacs@gnu.org
Subject: Re: sending commands to shell with emacs lisp
Date: Sun, 13 Sep 2009 10:39:27 -0400	[thread overview]
Message-ID: <icvdjmzz6o.fsf@verizon.net> (raw)
In-Reply-To: mailman.6560.1252824219.2239.help-gnu-emacs@gnu.org

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.




  parent reply	other threads:[~2009-09-13 14:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-13  5:15 sending commands to shell with emacs lisp Corey Foote
2009-09-13  5:45 ` tomas
2009-09-13  6:43   ` Corey Foote
2009-09-13 10:21     ` tomas
     [not found]   ` <mailman.6560.1252824219.2239.help-gnu-emacs@gnu.org>
2009-09-13 14:39     ` despen [this message]
2009-09-13  6:55 ` Thierry Volpiatto
     [not found] ` <mailman.6558.1252820105.2239.help-gnu-emacs@gnu.org>
2009-09-13  7:45   ` Bruno Barbier
     [not found] <mailman.6557.1252818947.2239.help-gnu-emacs@gnu.org>
2009-09-13  7:14 ` Helmut Eller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=icvdjmzz6o.fsf@verizon.net \
    --to=despen@verizon.net \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.