wandbox

https://github.com/kosh04/emacs-wandbox.git

git clone 'git://github.com/kosh04/emacs-wandbox.git'
4

Wandbox for Emacser

MELPA Build Status

wandbox.el is Wandbox API Library for Emacs.

README : Japanese / English

What is Wandbox ?

Wandbox is online compiler/interpreter. Developed by @melponn and @kikairoya.

You can try various programming language sush as C, C++, D, Haskell, Perl, Python, Ruby, PHP, Erlang, Java, JavaScript, CoffeeScript Rust, Common Lisp, and more.

Installation

  1. Install wandbox.el into your load-path directory. or M-x package-install wandbox if Emacs 24+.
  2. and put (require 'wandbox) into your .emacs.

References

Command

Function

Run wandbox compile with detailed options. arguments compiler, options, code, compiler-option, runtime-option, save is based on wandbox API.

Variable

Example

;; Compile code with compiler name and options
(wandbox :compiler "gcc-head" :options "warning" :code "main(){}")
;; Compile as C source code (use wandbox-profiles)
(wandbox :lang "C" :code "main(){}")
;; Compile local file, and generate permalink
(wandbox :lang "C" :file "/path/to/prog.c" :save t)
;; use standard-input
(wandbox :lang "Perl" :code "while (<>) { print uc($_); }" :stdin "hello")
;; Add user-profile
(add-to-list 'wandbox-profiles '(:name "ANSI C" :compiler "clang-head" :options "warning,c89"))
(wandbox :name "ANSI C" :file "/path/to/prog.c")
;; Compile gist snippet
;; sample: https://gist.github.com/219882
(wandbox :name "CLISP" :gist 219882 :stdin "Uryyb Jbeyq!")
;; Compile any url file (add :url keyword)
(defun* wandbox-option-url (&key url &allow-other-keys)
  (if url (plist-put nil :code (wandbox-fetch url))))
(add-to-list 'wandbox-precompiled-hook #'wandbox-option-url)

(wandbox :lang "C" :url "http://localhost/prog.c")

TODO

License

This software is licensed under the MIT-License.