Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update to use github hosting and clear up instructions.

  • Loading branch information...
commit 20541814ca2bdb4163ce3de4675cf69c44f85855 1 parent 6866925
@nicferrier authored
Showing with 27 additions and 12 deletions.
  1. +24 −9 README.md
  2. +2 −2 bin/compile
  3. +1 −1  bin/detect
View
33 README.md
@@ -1,13 +1,21 @@
# Heroku buildpack: Emacs Lisp
-This is an Emacs Lisp Heroku buildpack. It is probably only useful
-with [Elnode](http://www.emacswiki.org/emacs/Elnode).
+This is an Emacs Lisp Heroku buildpack for Elnode.
+
+First make sure you have at LEAST heroku gem version 2.11.0+
+
## Usage
+Make a git repository with a file start-elnode.el:
+
```lisp
-;;; init.el
-(require 'elnode (concat load-file-name "elnode.el"))
+;;; start-elnode.el
+(add-to-list package-archives "http://marmalade-repo.org/packages/")
+(package-initialize)
+(package-refresh-contents)
+(package-install 'elnode)
+(require 'elnode)
(defun handler (httpcon)
"Demonstration function"
@@ -16,13 +24,20 @@ with [Elnode](http://www.emacswiki.org/emacs/Elnode).
`("Server" . ,(concat "GNU Emacs " emacs-version)))
(elnode-http-return httpcon "<html><body><h1>Hello from Emacs!</h1></body></html>"))
-(elnode-start 'handler (string-to-number (or (getenv "PORT") "8080")) "0.0.0.0")
+(elnode-start
+ 'handler
+ :port (string-to-number (or (getenv "PORT") "8080"))
+ :host "0.0.0.0")
(while t (accept-process-output nil 1))
```
- # requires heroku gem version 2.11.0+
- $ heroku create --stack cedar --buildpack http://github.com/technomancy/heroku-buildpack-emacs.git
+add heroku as a remote to the repo:
+
+ $ heroku create --stack cedar \
+ --buildpack http://github.com/nicferrier/heroku-buildpack-emacs.git
+
+and then deploy the app by pushing to heroku:
$ git push heroku master
...
@@ -33,12 +48,12 @@ with [Elnode](http://www.emacswiki.org/emacs/Elnode).
Downloading Emacs 24 pretest from http://p.hagelb.org/emacs.tar.gz...
...done
-The buildpack will detect that your app has an `init.el` in the root
+The buildpack will detect that your app has a `start-elnode.el` in the root
and download a copy of the Emacs 24 pretest to bundle in your slug.
The Procfile for Emacs Lisp apps currently needs to untar that copy of
Emacs before running and symlink it to /tmp/emacs, like this:
- web: tar xzf emacs.tar.gz && ln -s $PWD/emacs /tmp/emacs; emacs/bin/emacs --daemon --load init.el
+ web: tar xzf emacs.tar.gz && ln -s $PWD/emacs /tmp/emacs; emacs/bin/emacs --daemon --load start-elnode.el
This is obviously undesired since it means other users could interfere
with this symlink, so a way to compile Emacs without referring to the
View
4 bin/compile
@@ -7,6 +7,6 @@ indent() {
echo "-----> Found an init.el file."
# TODO: cache this
-echo "Downloading Emacs 24 pretest from http://p.hagelb.org/emacs.tar.gz..." | indent
-curl -s -o $1/emacs.tar.gz http://p.hagelb.org/emacs.tar.gz
+echo "Downloading Emacs 24 pretest from github..." | indent
+curl -s -o $1/emacs.tar.gz https://github.com/downloads/nicferrier/heroku-buildpack-emacs/static-emacs.tar.gz
echo "...done" | indent
View
2  bin/detect
@@ -1,6 +1,6 @@
#!/bin/sh
-if [ -f $1/init.el ]; then
+if [ -f $1/elnodeboot.el ]; then
echo "Emacs Lisp"
exit 0
else
Please sign in to comment.
Something went wrong with that request. Please try again.