Sha256: ad771a54d618007a1c0db608dc75cd71079280a73ba86b55cf1ed805c48f59c0

Contents?: true

Size: 639 Bytes

Versions: 5

Compression:

Stored size: 639 Bytes

Contents

#!/usr/bin/env ruby

$:.unshift File.join(File.dirname(__FILE__), "../../lib") 

require 'relisp'

emacs = Relisp::ElispSlave.new

# basic functionality
puts emacs.elisp_eval("(+ 1 2)")
puts (emacs.elisp_eval '(concat "two " "words")')
puts emacs.concat("two", " words")
puts emacs.*(5,2)
puts emacs.create_file_buffer("blah.txt")

# variable persistence between calls
emacs.elisp_eval( "(setq new-var 23)")
puts emacs.elisp_eval( "(+ 1 new-var)")

# recursive calls
puts emacs.elisp_eval( '(ruby-eval "1 + 3")')

# wrappers around elisp editing data types
buffer =  Relisp::Buffer.new("ruby-created-buffer")
puts buffer
puts buffer.name

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
relisp-1.0.1 examples/ruby_master/ruby_master_example
relisp-0.9.0 examples/ruby_master/ruby_master_example
relisp-0.9.1 examples/ruby_master/ruby_master_example
relisp-0.9.2 examples/ruby_master/ruby_master_example
relisp-1.0.0 examples/ruby_master/ruby_master_example