in reply to Wrap perl scripts in emacs
One minor note: Under Unix if you don't require a specific perl binary or a specific script path and would like to have emacs just locate them in your PATH, just make them executable and add a shebang to them. You can then run them with a reduced version like this...
... in order to get rid of the two path globals. This isn't much different than using M-x shell-command directly, but it does give you an easy way to use a unique buffer with a useful name.;; Wrap perl scripts with emacs (defmacro perl-script (name description executable) `(defun ,name () ,description (interactive) (let ((buf (generate-new-buffer ,(symbol-name name)))) (shell-command ,executable buf) buf)))
|
|---|