Hi
I'm new to lisp,so the question might be stupid. i was wondering if
there was any function in MCL that would load an html file in a
browser like the browse-url in emacs lisp.if not is it possible to
execute sytem commands , there by loading netscape.i'v been searching
for a week to find a solution for this,Any help would be greatly
appreciated
Thanks in advance
Vijay
Hi!
vijay <·············@yahoo.com> wrote:
> I'm new to lisp,so the question might be stupid. i was wondering if
> there was any function in MCL that would load an html file in a
> browser like the browse-url in emacs lisp.if not is it possible to
> execute sytem commands , there by loading netscape.i'v been searching
> for a week to find a solution for this,Any help would be greatly
> appreciated
I've hacked a really awful kludge, but at least it works, using bsd.lisp
and the osascript command (I didn't want to search too long in order to
execute applescripts from mcl):
(defun do-applescript (script &key application)
(let ((command (if application
(format nil "osascript -e 'tell app \"~A\"~%~A~%end
tell'"
application script)
(format nil "osascript -e '~A'" script))))
(bsd:system-command command)))
Then you can do:
(do-applescript (concatenate 'string
"open location \"file://"
(ccl::posix-namestring file)
"\""))
Cheers, Audrey
--
From the poppy-bole
For you I stole
A little lovely dream.
·····@bl0rg.net (Audrey Ros�e) wrote in message news:<···························@bl0rg.net>...
> Hi!
>
> vijay <·············@yahoo.com> wrote:
> > I'm new to lisp,so the question might be stupid. i was wondering if
> > there was any function in MCL that would load an html file in a
> > browser like the browse-url in emacs lisp.if not is it possible to
> > execute sytem commands , there by loading netscape.i'v been searching
> > for a week to find a solution for this,Any help would be greatly
> > appreciated
>
> I've hacked a really awful kludge, but at least it works, using bsd.lisp
> and the osascript command (I didn't want to search too long in order to
> execute applescripts from mcl):
>
> (defun do-applescript (script &key application)
> (let ((command (if application
> (format nil "osascript -e 'tell app \"~A\"~%~A~%end
> tell'"
> application script)
> (format nil "osascript -e '~A'" script))))
> (bsd:system-command command)))
>
> Then you can do:
>
> (do-applescript (concatenate 'string
> "open location \"file://"
> (ccl::posix-namestring file)
> "\""))
>
Hi
Thanks a lot for your help, but i'm afraid i was not able to get it
to work, i'm having trouble loading BSD.lisp i downloaded bsd.lisp and
tried to load it into MCL(by doing file and then clicking load file),
but i got an error message saying
Error in process Initial: There is no package named "BSD" .
> While executing: CCL::SET-PACKAGE
> Type Command-/ to continue, Command-. to abort.
> If continued: Retry finding package with name "BSD".
See the Restarts� menu item for further choices.
so i modified the file as follows
(eval-when (:compile-toplevel :eval-toplevel :execute)
(unless (find-package :bsd)
(defpackage "BSD"))) ; eval-when
(defpackage "BSD")
but now i get an error message
Loading #P"Macintosh HD:Users:vj:April23:bsd.lisp"...
> Error: File "ccl:interfaces;index;traps.idx" does not exist.
> While executing: CCL::IF-DOES-NOT-EXIST
> Type Command-. to abort.
See the Restarts� menu item for further choices.
i dont have aclue as to what i'm supposed to be doing,
> Cheers, Audrey