Jump to content

Opmo 1.3: Emacs interface (with SLIME) broken?


Recommended Posts

Opusmodus 1.2 can be used from within the Emacs editor as well (see the post at the link below for details). For me as a programmer having additionally access to the Emacs Lisp IDE SLIME is greatly preferable due to various advanced features provided by Slime when compared with the more easy-to-use native IDE of Opusmodus. 

 

For more information on SLIME see its website:

https://common-lisp.net/project/slime

 

Unfortunately, the SLIME link is seemingly broken in Opusmodus 1.3, which I just started for the first time. For those who have no SLIME installed (but have Quicklisp set up), SLIME can be installed with the following command.

(ql:quickload "quicklisp-slime-helper")

 

Unfortunately, this results now in an error.

 

To load "quicklisp-slime-helper":
  Load 1 ASDF system:
    quicklisp-slime-helper
; Loading "quicklisp-slime-helper"
..
> Error: Undefined function asdf/interface::operation-forced called with arguments (#<load-op>) .
> While executing: #<standard-method asdf/action:perform (asdf/lisp-action:load-op swank-loader::swank-loader-file)>, in process Listener-2(9).
> Type cmd-/ to continue, cmd-. to abort, cmd-\ for a list of available restarts.
> If continued: Retry applying asdf/interface::operation-forced to (#<load-op>).
> Type :? for other options.


I already had SLIME installed, but simply running it does not work either and results in the same error.

(cl-user::start-swank) 

? To load "swank":
  Load 1 ASDF system:
    swank
; Loading "swank"
.
> Error: Undefined function asdf/interface::operation-forced called with arguments (#<load-op>) .
> While executing: #<standard-method asdf/action:perform (asdf/lisp-action:load-op swank-loader::swank-loader-file)>, in process Listener-2(9).
> Type cmd-/ to continue, cmd-. to abort, cmd-\ for a list of available restarts.
> If continued: Retry applying asdf/interface::operation-forced to (#<load-op>).
> Type :? for other options.

 

Any help? Thanks a lot! 

 

Best,

Torsten

Link to post
Share on other sites
  • 1 year later...

Following up on this - is there a way to have Opusmodus work within a Jupyter notebook? I think it would be very useful in educational settings. I know there are lisp implementations that work in Jupyter (

 

1104500?s=400&v=4
GITHUB.COM

An enhanced interactive Shell for Common Lisp (based on the Jupyter protocol) - fredokun/cl-jupyter

 

) - but is there a way to include Opusmodus as well? At least the functions and notation?

Link to post
Share on other sites
On 6/23/2020 at 3:10 PM, Avner Dorman said:

Following up on this - is there a way to have Opusmodus work within a Jupyter notebook? I think it would be very useful in educational settings. I know there are lisp implementations that work in Jupyter (

1104500?s=400&v=4
GITHUB.COM

An enhanced interactive Shell for Common Lisp (based on the Jupyter protocol) - fredokun/cl-jupyter

) - but is there a way to include Opusmodus as well? At least the functions and notation?

 

 

 

If your goal is for you as a teacher to create documents for your students to read containing Common Lisp and Opusmodus code, and where you want to evaluate the code directly from within that document, then Org mode with embedded Common Lisp + Slime is your friend. This is a very powerful combination, that can automatically create nice slides (with the LaTeX beamer interface), embed music notation (Lilypond) etc. I used this combination for years for teaching, had then all sessions of a course in a single document for easily moving content around etc.

 

Nevertheless, you likely do not want to introduce your students to use Org mode... For that, Jupyter notebooks (or plain Opusmodus) will be more easy for the students.

 

ORGMODE.ORG

Org: an Emacs Mode for Notes, Planning, and Authoring

 

 

However, I don't know of a way to automatically embed music notation output of Opusmodus in Emacs Org mode. What is missing for that, AFAIK, is some Opusmodus function that automatically creates a graphic file for a given snippet or score. If that would be there, that feature shouldn't be too hard to add (other Org mode babel programming language interfaces do already similar things, e.g., Lilypond, and the code for that is freely available).

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Topics

    • By opmo
      Build-in Slime in Opusmodus coming soon.
      Here is the 'Emacs-Slime Setup.lisp' extension file:
      ;;;--------------------------------------------------------- ;;; SLIME in Opusmodus ;;;--------------------------------------------------------- #! ;;; HOWTO If you're accustomed to Emacs and Common Lisp, you may prefer SLIME, the Superior Lisp Interaction Mode for Emacs, to editing lisp in regular Opusmodus windows and its listener. There are a number of places to get Emacs for MacOS. One that works well is:   https://emacsforosx.com SLIME ships with Opusmodus, in the "/Applications/Opusmodus.app/Contents/Resources/third-party/slime" directory. There are two parts to Slime:   1. Swank, the server, a Common Lisp system, which runs inside      of the Opusmodus App.   2. Slime, the client, which is an Emacs lisp package. To start the Swank server when Opusmodus starts, comment out the (start-swank) form at the end of this file, and restart Opusmodus (or execute (start-swank) in the Listener to do it now, but not next time Opusmodus starts). To load Slime into your Emacs, define the following in your ~/.emacs startup file:   (load "/Applications/Opusmodus.app/Contents/Resources/third-party/slime/emacs-opusmodus.el")   (load-opusmodus-slime) If you want to use the Mac Command key for Emacs meta, instead of the default of the Mac Option key, and make C-o in dired open the file at point, in the Mac application that is assigned for editing that type of file, also add, after that:   (opusmodus-options) Then, restart Emacs, and do 'm-x slime-connect'. For Host, use the default of localhost. For Port, use 4005, or the port you specified in the (start-swank) call. 4005 will likely be the default. With (ignore-errors (slime-connect "localhost" 4005)) in your ~/.emacs startup file, the slime will start automatically at Emacs start. A "*slime-repl ccl*" buffer should appear. You can get to that buffer at any time with 'c-c s r' in Emacs. It is a read-eval-print loop, executing inside the Opusmodus App. Use it just as you do the Opusmodus Listener. There are some Opusmodus commands that may be executed from Emacs. They are all on the "om-selector", accessible via "C-c o". That will bring up a query for a single character ("Select [?alqsv]"). You may type one of: ?:    Show this help buffer. a:    Audition and Notation (snippet). l:    Audition and Notation last score. q:    Quit selector. s:    Stop audition. v:    Voices Audition and Notation (snippet). The "snippet" is the lisp form before the insertion point, as in Opusmodus. The commands (other than ? and q) behave as the like-named commands in the Opusmodus Tools/Snippet menu, except they open a new (reusable) notation window, instead of a new notation panel. When connected to Slime, errors in the Opusmodus Listener will bring up a backtrace dialog in the connected Emacs, NOT the CCL debugger in the Listener. Be careful to use the "Return to toplevel" restart from there, not one of the ones that kills the thread, or you'll break your Opusmodus, and will have to restart it. !# ;;; End of HOWTO ;; To start the Swank server when Opusmodus starts, you need to ;; uncomment the (start-swank) expression below: It can take a first ;; arg to change the port from the default of 4005, and a second arg ;; to change the directory from which to load Swank from the default ;; of inside the application bundle (you should only do this if you ;; need to run a different version of Swank, to be compatible with a ;; different version of Slime in your Emacs). (in-package :om) ; (start-swank) Janusz
    • By torstenanders
      Common Music (CM) is another interesting composition system (http://commonmusic.sourceforge.net), and a recent revision of the old CM version 2 (https://github.com/ormf/cm), which was still implemented in Common Lisp (in contrast to later versions defined in Scheme) can be loaded into and used alongside Opusmodus 1.2 without problems. This was possible primarily due to a largely revised load mechanism of the old CM sources.  
       
      With the new Opusmodus 1.3 this is not possible any more. It seems the problem is caused by the fact that :CLM (and a number of variants) are still added to *features*, but there is no CLM package anymore. I cannot see the Opusmodus sources, but I assume that all CLM definitions have been added directly to the Opusmodus package. Anyway, due to the present feature CM assumes that CLM is there, but then cannot find its package. 
       
      Anyway, I found a way around (by changing the relevant feature expressions from #-clm into #-(and clm (not opusmodus)) and will try to have that included in the relevant CM sources at https://github.com/ormf/cm
       
      Best,
      Torsten
       
    • By Andy
      My files in the Finder often have a duplicate with a tilde after them..what does this mean? I want to rename a file..do I do it to both?
      Thanks
×
×
  • Create New...