Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
xLispStat support #154
(autoload 'run-xlispstat "/usr/local/lib/xlispstat" "Run inferior xlispstat process" t) (autoload 'run-kcl "/usr/local/lib/xlispstat" "Run inferior kcl process" t) (global-set-key "\C-xd" 'lisp-send-defun) (global-set-key "\C-xj" 'lisp-send-defun-and-go) (global-set-key (kbd "\C-x C-e") 'lisp-eval-last-sexp)
Would anyone know to tell why I keep having as output -->
so, I got lucky, then? That uses not to be the case. I go on fedora (not tried on any other platform). Just downloaded the xlispstat-3-52-23.tar.gz. Once extracted did
At command line it runs OK by:
So, that said. Would anyone know to tell whether I'm wrong trying to use xlispstat as another inferior-lisp-process? I'd love to have a xlispstat REPL like scheme & clojure users have in geiser or cider. But I still dunno what I should do so any clue, (or warning) will be very much welcomed. I'd really appreciate it.
To start with I got 2 scripts. The first one found in the tar.gz file mentioned above state itself is part of the gnu-emacs but as vspinu also said, xlispstat is not supported anymore, so I'm some puzzled about its situation in the whole ess body, so reuse it or what. I thought do show it here could help to clarify the question:
;; Running an inferior xlispstat process ;; Copyright (C) 1985, 1986, 1987, 1988 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. ;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY. No author or distributor ;; accepts responsibility to anyone for the consequences of using it ;; or for whether it serves any particular purpose or works at all, ;; unless he says so in writing. Refer to the GNU Emacs General Public ;; License for full details. ;; Everyone is granted permission to copy, modify and redistribute ;; GNU Emacs, but only under the conditions described in the ;; GNU Emacs General Public License. A copy of this license is ;; supposed to have been given to you along with GNU Emacs so you ;; can know your rights and responsibilities. It should be in a ;; file named COPYING. Among other things, the copyright notice ;; and this notice must be preserved on all copies. (require 'shell) (defun xlisp-quit-sentinel (proc reason) (if (and (not (memq reason '(run stop)))) (save-buffers-kill-emacs))) (defun set-xlisp-sentinel () (let ((process (get-process "lisp"))) (set-process-sentinel process 'xlisp-quit-sentinel) (process-kill-without-query process))) (defun run-xlispstat-exit () (run-xlispstat) (set-xlisp-sentinel)) (defun run-kcl-exit () (run-kcl) (set-xlisp-sentinel)) (defun run-xlispstat () "Run an inferior xlispstat process." (interactive) (let ((old-prog inferior-lisp-program)) (setq inferior-lisp-program "xlispstat") (run-lisp) (setq inferior-lisp-program old-prog))) (defun run-kcl () (interactive) (let ((old-prog inferior-lisp-program)) (setq inferior-lisp-program "kcl") (run-lisp) (setq inferior-lisp-program old-prog))) ;; modified to use .lsp suffix on temp file - xlisp gets upset without it. (defun lisp-send-defun (display-flag) "Send the current defun to the Lisp process made by M-x run-lisp. With argument, force redisplay and scrolling of the *lisp* buffer. Variable `inferior-lisp-load-command' controls formatting of the `load' form that is set to the Lisp process." (interactive "P") (or (get-process "lisp") (error "No current lisp process")) (save-excursion (end-of-defun) (let ((end (point)) (filename (format "/tmp/emlisp%d.lsp" (process-id (get-process "lisp"))))) (beginning-of-defun) (write-region (point) end filename nil 'nomessage) (process-send-string "lisp" (format inferior-lisp-load-command filename))) (if display-flag (let* ((process (get-process "lisp")) (buffer (process-buffer process)) (w (or (get-buffer-window buffer) (display-buffer buffer))) (height (window-height w)) (end)) (save-excursion (set-buffer buffer) (setq end (point-max)) (while (progn (accept-process-output process) (goto-char (point-max)) (beginning-of-line) (or (= (point-max) end) (not (looking-at inferior-lisp-prompt))))) (setq end (point-max)) (vertical-motion (- 4 height)) (set-window-start w (point))) (set-window-point w end))))) ;;ends here
The second one is an add-hook script trying to create a handful of kbd:
(add-hook 'ess-mode-hook '(lambda () (define-key ess-mode-map "\C-c\C-e" '(lambda () (interactive) (let ((curr (point))) (end-of-defun) (lisp-eval-last-sexp) (goto-char curr)))) (define-key ess-mode-map "\C-x\C-e" 'lisp-eval-last-sexp) (define-key ess-mode-map "\C-c\C-r" 'lisp-eval-region) (define-key ess-mode-map "\C-c\C-c" '(lambda () (interactive) (lisp-eval-string (buffer-string)))) (define-key ess-mode-map "\C-c\C-z" 'run-lisp))) ;; the line below is commented because should be redundant considering ;; that in the above script the ;;inferior-lisp-program is already set, isn't? ;;(add-hook 'ess-mode-hook (lambda () (setq inferior-lisp-program "/usr/local/lib/xlispstat/xlisp")))
Well, that's it by now. As said any comment or help will be greatly appreciated.
posting-progress.. in the year of our lord, Emacs. March 23th 2015
(setq inferior-lisp-program "xlispstat")`
(setq inferior-lisp-program "/usr/local/bin/xlispstat")
(setq inferior-lisp-program "/usr/local/lib/xlispstat/xlisp") ;; the above xlispstat is really a bash executable link to ;; /usr/local/lib/xlispstat/xlisp
or do this by adding a
(add-hook 'xls-mode-hook (lambda () (setq inferior-lisp-program "/usr/local/lib/xlispstat/xlisp")))
I got no success. I cannot get an inferior xlispstat process. (not yet).
If I will manage to install xlispstat then I hope I can fix ESS pretty strightforwardly, but I don't know when I can get down to it. Not this week for sure.
You can try opening files in