Jump to content

is Emacs superior to built-in editor?


Recommended Posts

I used Emacs for many years for Python, C++ and Haskell - and I see it's possible to use it with OpusModus. However my Emacs shortcuts are rusty - ever since I started tutoring multiple programming languages for high school students, I've had to switch to Visual Studio Code so that my students wouldn't have to learn a Emacs (very unlike their modern editors they are used to) or need to learn a different IDE for every language.

 

If I'm going to spend time relearning Emacs (I'm not really used to it any more), I might as well spend time learning the built-in editor, right? Or is there a compelling reason to dust off my Emacs skills?

 

Mike

Link to comment
Share on other sites

I am using Opusmodus mainly via Emacs these days (when I find the time to use it 😅), but this editor is only something I would recommend for developers. For me, it has several benefits over the builtin Opusmodus editor. 

 

my Emacs shortcuts are rusty

There are some easy workarounds for that. If you are on a Mac (likely) I would recommend Aquaemacs (https://aquamacs.org), which for many standard tasks uses the standard Mac shortcuts instead. I use it every day, it works well. For Linux or Windows, there is also ErgoEmacs, which works well for me too.

 

For me, the main benefits of using Emacs is that I can use the full Slime functionality (https://common-lisp.net/project/slime/ ). Some of that functionality is also available in the Opusmodus editor, but hidden and only accessible via shortcuts (e.g., I am regularly jumping to the definition of various functions -- works with my own definitions and the CCL builtins, if things are set up properly, though of course not with Opusmodus definitions). However, much of the Emacs Slime functionality does not have an equivalent in the Opusmodus editor. Most important for me is perhaps having full access to the Lisp debugger (something blocked in the Opusmodus editor to simplify things for users, I guess).

 

If you are coming from other programming languages, it is worth checking out what a Lisp debugger can do, because the interface is a bit for nerds, but its functionality/power goes beyond what you find in debuggers for pretty much all other languages. There are some YouTube videos out there (e.g., look for presentations by Rainer Joswig, though these are of course not music-specific). For some general intro, you might want to read about conditions and restarts in Lisp, which is the foundation built into the language that allows the debugger to do what it can do (https://lispcookbook.github.io/cl-cookbook/error_handling.html ). 

 

Another thing I like about using Opusmodus from within Emacs is that I can use it with other Emacs modi. For example, I commonly organise larger composition projects as org mode files (https://orgmode.org ). Then I can integrate any notes to myself in a wiki-syntax (which tend to be lengthy in my case...) alongside my code (e.g., I commonly have different versions of some code together with different results in the file hidden in closed subsections), have links to files and relevant background research, integrate with the code links to resulting files. I may export the whole thing into various formats (e.g., slides for presentations or just PDF files for articles), have TODO lists integrated etc.

 

Anyway, this is all mainly something for nerds... 

 

 

The main downside of using Emacs over the Opusmodus editor is that Opusmodus-specific functionality is missing by default, like shortcuts for notating or playing back some musical results, but -- we can add our own shortcuts to Emacs. So, I started to add shortcuts for the most important functions for me (like notating and playback), and -- importantly -- I can also add my custom shortcuts, e.g., for playing back some custom data representation that first needs translating into a standard Opusmodus score. My current Emacs Lisp definitions for this purpose depend on some custom functions I defined in my libraries, but if you are trying to do something like that I might be able to help. 😅

 

 

 

 

 

Link to comment
Share on other sites

Thanks so much! Yes, I think I'm going to use Emacs. The shortcuts are coming back to me. I might reprogram a few to keep things similar with VS Code. Like Cmd-S for save.

 

I'm finishing a traditional composition now and after that is done I'll start an OM project in earnest. So I might come back to you then for more ideas.

 

Regards,

Mike

Link to comment
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.

×
×
  • Create New...

Important Information

Terms of Use Privacy Policy