Jean Louis
2017-03-23 15:29:32 UTC
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)
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)