Mozart application bundle for MacOs X

Torsten Anders torsten.anders at plymouth.ac.uk
Tue Oct 2 12:38:02 CEST 2007


Oops, forgot the emacs lisp code. Putting this into ~/.emacs makes  
the Oz usage more convenient for me: if I already started Emacs for  
doing something else, then at any time I can just open some Oz source  
file and I am ready in the OPI (no need to call oz and have to deal  
with multiple Emacsen running).

Best
Torsten

;; required to have oz-mode defined in case I don't start oz but  
plain emacs
(or (getenv "OZHOME")
     (setenv "OZHOME"
             "/usr/local/oz/"))   ; this is where Mozart is installed  
on my system
(setenv "PATH" (concat (getenv "OZHOME") "/bin:" (getenv "PATH")))
(setq load-path (cons (concat (getenv "OZHOME") "/share/elisp")
                       load-path))
(setq auto-mode-alist
       (append '(("\\.oz\\'" . oz-mode)
		("\\.ozm$" . ozm-mode)
                 ("\\.ozg\\'" . oz-gump-mode))
               auto-mode-alist))
(setq interpreter-mode-alist (cons '("oz" . oz-mode) interpreter-mode- 
alist))
;; autoload "oz.el" if the functions oz-mode or run-oz are executed
(autoload 'run-oz "mozart" "Run Mozart as a sub-process." t)
(autoload 'oz-mode "oz" "Major mode for editing Oz code." t)
(autoload 'ozm-mode "mozart" "Major mode for displaying Oz machine  
code." t)
(autoload 'oz-gump-mode "oz" "Major mode for editing Oz code with  
embedded Gump specifications." t)
(autoload 'oz-new-buffer "oz" "" t)


On Oct 2, 2007, at 11:03 AM, Torsten Anders wrote:
> Dear Gustavo,
>
> sorry for the delay, I finally tested your new version.
>
> On my system (Mac OS X 10.4.10), no file ~/.mozartapp was written
> after the first startup and at every startup Mozart.app ask about the
> path issue.
>
> Nevertheless, my ~/.profile file was updated accordingly (each
> time ;-) ). There seems to be a tiny issue: the PATH is set to
> SOMETHING/mozart-1.3.2/Mozart.app/Contents/Resources//bin (i.e. there
> are two slashes before the bin directory). However, it works  
> anyway ;-)
>
> Concerning the Emacs configuration file: in my ~/.emacs I don't have
> any "(require 'oz)", but I set OZHOME (see below for the exact code).
> So, Mozart.app did not show any warning but my ~/.emacs would have
> broken it because I overwrote OZHOME. Nevertheless, I feel this is a
> rare situation for Mac users looking for a drag-and-drop installation
> of Mozart ;-) So, perhaps it is sufficient just to put a warning in
> the documentation of Mozart.app.
>
> Again, thanks for doing this work!!
>
> Best
> Torsten
>
> On Sep 25, 2007, at 6:56 AM, Gustavo Gutierrez wrote:
>> Even easier, after learning some bash scripting, i modified the
>> mozart.app to do the following:
>>
>> 1) When executed for the first time, it asks the user to add command
>> line tools to its path environment variable. If user answers yes then
>> the command line tools are added to the path in the ~/.profile file.
>> In any case a .mozartapp is created in the home directory to  
>> signal no
>> first time launching.
>>
>> 2) Emacs configuration file detection was improved, now it checks  
>> that
>> a "(require 'oz)" line does not occur in the file. If it does, then
>> the warning is shown.
>>
>> Please, fell free to download the new version and make your comments.
>>
>> Cheers,
>> --
>> Gustavo Gutierrez
>> _____________________________________________________________________ 
>> _
>> ___________
>> mozart-hackers mailing list                           mozart-
>> hackers at mozart-oz.org
>> http://www.mozart-oz.org/mailman/listinfo/mozart-hackers
>
> --
> Torsten Anders
> Interdisciplinary Centre for Computer Music Research
> University of Plymouth
> Office:   +44-1752-233667
> Private: +44-1752-663492
> http://strasheela.sourceforge.net
> http://www.torsten-anders.de
>
>
>
>
> ______________________________________________________________________ 
> ___________
> mozart-hackers mailing list                           mozart- 
> hackers at mozart-oz.org
> http://www.mozart-oz.org/mailman/listinfo/mozart-hackers

--
Torsten Anders
Interdisciplinary Centre for Computer Music Research
University of Plymouth
Office:   +44-1752-233667
Private: +44-1752-663492
http://strasheela.sourceforge.net
http://www.torsten-anders.de






More information about the mozart-hackers mailing list