Re: emacs lilypond-mode and the midi command
In message 1f7f572f-c5ec-46e7-a70d-075395915...@googlemail.com, James E. Bailey derhindem...@googlemail.com writes On 07.03.2009, at 17:20, Tim McNamara wrote: On Mar 7, 2009, at 4:05 AM, James E. Bailey wrote: On OSX, the lilypond mode for emacs doesn't properly escape filenames. open -a 'Mighty MIDI' /Users/jamesebailey/Documents/James Music/ Choral Music/Windhauch/Windhauch.midi 2009-03-07 10:59:31.767 open[465] No such file: /Users/ jamesebailey/Documents/James I'm having trouble making sense of what you are trying to do with this command and from where you are trying to do it. Sorry, I'm trying to use the midi command in lilypond mode from within emacs. Since I'm on a macintosh, I change the timidity -ia and timidity in the lilypond.mode.el file to be open -a 'Mighty MIDI'. It works for opening the pdfs from within emacs. I use the emacs shortcut to view the pdf and it opens. I've changed the default xpdf to open -a 'Skim' and everything works perfectly. That open command looks incorrectly stated for Emacs on two fronts. Are you typing this command in somewhere (Emacs or the shell) or is this command being generated inside Emacs from one of the lilypond-mode menus? As previously stated, I'm typing this in the lilypond-mode.el file. First, Emacs doesn't use an open command to open files, it uses the sequence Control-x Control-f (C-x C-f [and note the case]). If lilypond-mode is generating that command, it seems guaranteed to fail. it works for the pdfs Are you *sure* it's exactly the same syntax? Note that your pathname is *un*quoted and *contains* *a* *space*. This is GUARANTEED to fail if typed at the command line. Not knowing MacOS, I can't tell you what's the correct way to quote it, but I'd try putting a backslash before the space. Cheers, Wol -- Anthony W. Youngman - anth...@thewolery.demon.co.uk ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: emacs lilypond-mode and the midi command
On 08.03.2009, at 12:58, Anthony W. Youngman wrote: In message 1f7f572f-c5ec-46e7-a70d-075395915...@googlemail.com, James E. Bailey derhindem...@googlemail.com writes On 07.03.2009, at 17:20, Tim McNamara wrote: On Mar 7, 2009, at 4:05 AM, James E. Bailey wrote: On OSX, the lilypond mode for emacs doesn't properly escape filenames. open -a 'Mighty MIDI' /Users/jamesebailey/Documents/James Music/ Choral Music/Windhauch/Windhauch.midi 2009-03-07 10:59:31.767 open[465] No such file: /Users/ jamesebailey/Documents/James I'm having trouble making sense of what you are trying to do with this command and from where you are trying to do it. Sorry, I'm trying to use the midi command in lilypond mode from within emacs. Since I'm on a macintosh, I change the timidity -ia and timidity in the lilypond.mode.el file to be open -a 'Mighty MIDI'. It works for opening the pdfs from within emacs. I use the emacs shortcut to view the pdf and it opens. I've changed the default xpdf to open -a 'Skim' and everything works perfectly. That open command looks incorrectly stated for Emacs on two fronts. Are you typing this command in somewhere (Emacs or the shell) or is this command being generated inside Emacs from one of the lilypond-mode menus? As previously stated, I'm typing this in the lilypond-mode.el file. First, Emacs doesn't use an open command to open files, it uses the sequence Control-x Control-f (C-x C-f [and note the case]). If lilypond-mode is generating that command, it seems guaranteed to fail. it works for the pdfs Are you *sure* it's exactly the same syntax? Note that your pathname is *un*quoted and *contains* *a* *space*. This is GUARANTEED to fail if typed at the command line. Not knowing MacOS, I can't tell you what's the correct way to quote it, but I'd try putting a backslash before the space. The path quoted is not something I have control over, that is the output copied directly from emacs. That is the problem: emacs does not correctly escape pathnames when upening a MIDI file. I thought I made that clear, but everyone else here is discussing bash, and not how lilypond-mode opens a MID file. Does anyone else have this problem? Can anyone else reproduce this issue (using the command midi C-c return or even Midi all C-c C- return) errors when opening a file with a space in the path? ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: emacs lilypond-mode and the midi command
On Mar 7, 2009, at 4:05 AM, James E. Bailey wrote: On OSX, the lilypond mode for emacs doesn't properly escape filenames. open -a 'Mighty MIDI' /Users/jamesebailey/Documents/James Music/ Choral Music/Windhauch/Windhauch.midi 2009-03-07 10:59:31.767 open[465] No such file: /Users/jamesebailey/ Documents/James I'm having trouble making sense of what you are trying to do with this command and from where you are trying to do it. That open command looks incorrectly stated for Emacs on two fronts. Are you typing this command in somewhere (Emacs or the shell) or is this command being generated inside Emacs from one of the lilypond- mode menus? First, Emacs doesn't use an open command to open files, it uses the sequence Control-x Control-f (C-x C-f [and note the case]). If lilypond-mode is generating that command, it seems guaranteed to fail. Second, you're trying to open a MIDI file (.midi) rather than a LilyPond file (.ly); I don't know if opening anything but a .ly file will automatically enter lilypond-mode in Emacs (assuming you have set up the correct Lisp code in your .emacs file first to require lilypond-mode when a .ly file is opened). I just fired up Emacs and opened a LilyPond file with spaces in the file name and also in three levels of directories with spaces in their names, too, without any problem and no escape characters being used. The file opened and lilypond-mode was automatically entered. From within Emacs, try: C-x C-f ~/Documents/James Music/Choral Music/Windhauch/Windhauc.midi Does that work any better? Which version of Emacs are you using? The one that comes with OS X and is accessed through the command line in Terminal is hopelessly out of date. If you haven't already, try the GUI versions (the latest Carbon Emacs or Aquamacs, for example) which are much more recent builds, under active development and easier by far to use. Or you can compile your own, the -current versions in the Emacs CVS repository have the necessary code to build a Mac .app package; you just need to set the right flags (--without-X --with-Carbon IIRC; it's been a long time since I compiled a version of Emacs, the available builds are very good indeed). HTH! ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: emacs lilypond-mode and the midi command
On 07.03.2009, at 17:20, Tim McNamara wrote: On Mar 7, 2009, at 4:05 AM, James E. Bailey wrote: On OSX, the lilypond mode for emacs doesn't properly escape filenames. open -a 'Mighty MIDI' /Users/jamesebailey/Documents/James Music/ Choral Music/Windhauch/Windhauch.midi 2009-03-07 10:59:31.767 open[465] No such file: /Users/ jamesebailey/Documents/James I'm having trouble making sense of what you are trying to do with this command and from where you are trying to do it. Sorry, I'm trying to use the midi command in lilypond mode from within emacs. Since I'm on a macintosh, I change the timidity -ia and timidity in the lilypond.mode.el file to be open -a 'Mighty MIDI'. It works for opening the pdfs from within emacs. I use the emacs shortcut to view the pdf and it opens. I've changed the default xpdf to open -a 'Skim' and everything works perfectly. That open command looks incorrectly stated for Emacs on two fronts. Are you typing this command in somewhere (Emacs or the shell) or is this command being generated inside Emacs from one of the lilypond-mode menus? As previously stated, I'm typing this in the lilypond-mode.el file. First, Emacs doesn't use an open command to open files, it uses the sequence Control-x Control-f (C-x C-f [and note the case]). If lilypond-mode is generating that command, it seems guaranteed to fail. it works for the pdfs Second, you're trying to open a MIDI file (.midi) rather than a LilyPond file (.ly); I don't know if opening anything but a .ly file will automatically enter lilypond-mode in Emacs (assuming you have set up the correct Lisp code in your .emacs file first to require lilypond-mode when a .ly file is opened). lilypond mode works just fine. it's opening the midi file from within emacs that's the problem. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: emacs lilypond-mode and the midi command
On 07.03.2009, at 23:44, Tim McNamara wrote: On Mar 7, 2009, at 4:05 AM, James E. Bailey wrote: On OSX, the lilypond mode for emacs doesn't properly escape filenames. open -a 'Mighty MIDI' /Users/jamesebailey/Documents/James Music/ Choral Music/Windhauch/Windhauch.midi 2009-03-07 10:59:31.767 open[465] No such file: /Users/ jamesebailey/Documents/James I'm having trouble making sense of what you are trying to do with this command and from where you are trying to do it. snip Addendum: I was able to replicate this bheavior in Bash under Terminal. The problem appears to be how Bash handles spaces in filenames. Weird, in this day and age you'd think that shells would be intelligent enough to cope with this. There is a new revision of Bash out in the past few weeks, which perhaps gets around this. I wonder if lilypond-mode is for some reason calling to the shell and running into a problem there; IMO it shouldn't, it should use the standard Emacs commands. If double quotes are put around the path, that seems to properly escape them, although even this was flakey on my Mac: /Users/jamesebailey/Documents/James Music/Choral Music/ Windhauch/Windhauch.midi Another option might be: /Users/jamesebailey/Documents/James Music/Choral Music/ Windhauch/Windhauch.midi Even then I am not sure that this will open in Emacs with this syntax. *I* can send this command to bash through emacs just fine. The problem is that I don't know how to change the way the command is sent through lilypond-mode. And, as previously stated, this was a problem with the way lilypond opened pdf's, maybe I'll see if I can apply that fix to the midi... ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user