4

GitHub - darius/halp: Run programs in the Emacs buffer holding their source, see...

 1 year ago
source link: https://github.com/darius/halp
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
HALP

With Halp, one keystroke executes all specially-marked lines from a
buffer and inserts the results inline. It can do this for source code
in Python, Haskell (literate or illiterate), or sh. This helps you
interactively test your programs as you write them -- like a
read-eval-print loop, but different.

To try it out, first install halp.el as described below. Then visit a
suitable file, (like sample.py, sample.lhs, or sample.sh in
examples/), and hit M-i. These sample files will explain what you can
do and how it works. (Actually only sample.py explains much. But for
the other languages, currently, there's little to explain.)


INSTALLING

Add this line to your .emacs:

  (load-file "/path/to/this/directory/halp.el")

or just do M-x load-file halp.el. (Where /path/to/this/directory/ is 
where this README file and the rest of Halp resides.)

It will bind M-i in the modes that Halp supports. (Edit halp.el if you
want to change this.)

You will need python-mode, or haskell-mode, etc., installed already
(whichever of these you intend to use with Halp). You will also need
Python >= 2.5 and Emacs >= 21.

To build and install the JavaScript support:

  1. Build V8 from http://code.google.com/p/v8/
  2. Copy or symlink include/ and libv8.a from the directory you built
     V8 in (probably named v8-read-only)
  3. Run "make -f v8halp.mk"
  4. Put the resulting v8halp binary in your $PATH.


AUTHORS

Darius Bacon <[email protected]>
Brandon Moore
Evan Murphy

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK