Re: How to solve: module 'syscalls' requires package OS
Jean Louis <[email protected]> Thu, 23 Mar 2017 23:05:10 +0300
| Newsgroups | gmane.lisp.clisp.general |
|---|---|
| Message-ID | <[email protected]> |
Hello, Thank you. Yes, now I can save the memory image. Then I need to work on it that it really works. On Thu, Mar 23, 2017 at 09:01:08PM +0100, Pascal Bourguignon wrote: > > > On 23 Mar 2017, at 16:29, Jean Louis <[email protected]> wrote: > > > > Hello, > > > > When I try to make memory image, with that line, then I get problem: > > > > module 'syscalls' requires package OS > > > > How do I solve that? > > > > (defparameter memdir "/run/shm/") > > (defparameter tmp-file "rcd-wrs-XXXXXX") > > (defparameter tmp-org (format nil "~a~a.org" memdir tmp-file)) > > (defparameter tmp-md (format nil "~a~a.md" memdir tmp-file)) > > (require "syscalls") > > > > ;; (saveinitmem "org2markdown" :quiet nil :init-function 'main :verbose t :norc t :documentation "Converts Org standard input into markdown" :executable t) > > (defun main nil > > (let ((input (with-open-stream (str *standard-input*) > > (loop :for line = (read-line *standard-input* nil nil) > > :while line > > :do (format t "~A~%" line))))) > > (with-open-file (stream tmp-org :if-exists :supersede :if-does-not-exist :create :external-format "utf-8") > > (format stream input)) > > (shell (format nil "emacs -Q -l ~~/.emacs.d/elpa/org-20170210/org-autoloads.el "~a" --batch -f org-mode -f org-md-export-to-markdown --kill" tmp-org)) > > (format t (with-open-file (stream tmp-md :direction :input) > > (loop :for line = (read-line *standard-input* nil nil) > > :while line > > :do (format t "~A~%" line)))) > > (exit))) > > > > ;; (main) > > > “OS” is a nickname of the “POSIX” package that is created by the syscalls module, so if you have required syscalls, it must exist, and you cannot get this error. > > Works for me, with the following change: > > [pjb@despina :0.0]$ cat o.lisp > (defparameter memdir "/run/shm/") > (defparameter tmp-file "rcd-wrs-XXXXXX") > (defparameter tmp-org (format nil "~a~a.org" memdir tmp-file)) > (defparameter tmp-md (format nil "~a~a.md" memdir tmp-file)) > (require "syscalls") > > > (defun main nil > (let ((input (with-open-stream (str *standard-input*) > (loop :for line = (read-line *standard-input* nil nil) > :while line > :do (format t "~A~%" line))))) > (with-open-file (stream tmp-org :if-exists :supersede :if-does-not-exist :create :external-format "utf-8") > (format stream input)) > (shell (format nil "emacs -Q -l ~~/.emacs.d/elpa/org-20170210/org-autoloads.el "~a" --batch -f org-mode -f org-md-export-to-markdown --kill" tmp-org)) > (format t (with-open-file (stream tmp-md :direction :input) > (loop :for line = (read-line *standard-input* nil nil) > :while line > :do (format t "~A~%" line)))) > (exit))) > > (saveinitmem "org2markdown" :quiet nil :init-function 'main :verbose t :norc t :documentation "Converts Org standard input into markdown" :executable t) > > /tmp > [pjb@despina :0.0]$ clisp o.lisp > > Bytes permanently allocated: 172,224 > Bytes currently in use: 3,311,400 > Bytes available until next GC: 826,440 > > /tmp > [pjb@despina :0.0]$ ls -l org2markdown > -rwxr-xr-x 1 pjb wheel 6215484 Mar 23 20:58 org2markdown* > > > > -- > __Pascal J. Bourguignon__ > > > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ clisp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/clisp-list