Skip to content

Instantly share code, notes, and snippets.

@kat-co
Created September 26, 2015 01:47
Show Gist options
  • Save kat-co/9a51ed7f5ac8cc874b26 to your computer and use it in GitHub Desktop.
Save kat-co/9a51ed7f5ac8cc874b26 to your computer and use it in GitHub Desktop.
A yasnippet to create elnode scripts that are executable by any shell (Windows, bash, etc.)
# -*- mode: snippet; require-final-newline: nil -*-
# name: elisp script
# key: script
# --
:;exec emacs -batch -l "\$0" -f ${1:main} "$@" --no-site-file -q # -*- Emacs-Lisp -*-
;; @emacs -batch -l "%~f0" -f $1 %* --no-site-file -q & goto :EOF
(require 'cl)
(defun $1()
$2)
;;:EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment