bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: include-settings and path or file name with blanks


From: Colin Hall
Subject: Re: include-settings and path or file name with blanks
Date: Thu, 12 Apr 2012 15:45:38 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Thu, Apr 12, 2012 at 11:12:36AM +0100, James wrote:
> Hello,
> 
> On 12 April 2012 01:28, Colin Hall <address@hidden> wrote:
> >
> > On Tue, Apr 10, 2012 at 05:45:42AM -0700, Eluze wrote:
> >>
> >> I can run LilyPond with
> >> --include="D:/data/ly/includes - copy" -dinclude-settings="myInit.ly"
> >>
> >> if the init file contains a blank it doesn't work
> >> --include="D:/data/ly/includes - copy" -dinclude-settings="myInit 2.ly"
> >>
> >> I have to use 4 sets of quotes
> >> --include="D:/data/ly/includes - copy" -dinclude-settings=""""myInit
> >> 2.ly""""
> >>
> >> this also work when the whole file with path is specified (and the path or
> >> file name contains blanks):
> >> -dinclude-settings=""""D:/data/ly/includes - copy/myInit 2.ly""""
> >>
> >> so we have the funny situation where we can write
> >>
> >> lilypond ?-I"D:/data/ly/includes - copy"
> >> -dinclude-settings=""""D:/data/ly/includes - copy/myInit 2.ly"""" test.ly
> >>
> >> should this be documented
> >
> > No reason why not.
> 
> Well yes, I'm still not even sure what the issue is here.
> 
> For instance is it a 'windows' shell issue (which we cannot fix), can
> we get someone to do the same thing on Linux and confirm the behavior?

prompt>
prompt>
prompt>echo "What OS are we running?" > /dev/null 
prompt>uname -rvmpio
2.6.35-32-generic #67-Ubuntu SMP Mon Mar 5 19:39:49 UTC 2012 x86_64 unknown 
unknown GNU/Linux
prompt>tree
.
|-- bug.ly
|-- bug.pdf
|-- include - copy
|   |-- include filename with spaces.ly
|   `-- includefilenamenospaces.ly
|-- include filename with spaces.ly
`-- includefilenamenospaces.ly

1 directory, 6 files
prompt>
prompt>
prompt>cat bug.ly
\version "2.15.35"

\score
{
  \music
}
prompt>
prompt>
prompt>cat includefilenamenospaces.ly 
\version "2.15.35"

music = {
  c'4 c'4 c'4 c'4 |
}
prompt>
prompt>
prompt>diff -s includefilenamenospaces.ly "include filename with spaces.ly" 
Files includefilenamenospaces.ly and include filename with spaces.ly are 
identical
prompt>
prompt>
prompt>echo "Use an include file without spaces, works fine" > /dev/null 
prompt>lilypond -d include-settings=includefilenamenospaces.ly  bug.ly
Running Lilypond 
GNU LilyPond 2.15.35
Processing `bug.ly'
Parsing...
Interpreting music... 
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `bug.ps'...
Converting to `./bug.pdf'...
Success: compilation successfully completed
prompt>
prompt>
prompt>echo "Quoting so that the equals sign, the quotes and the spaces all 
make it through to Lilypond" > /dev/null 
prompt>lilypond -d include-settings\=\"include\ filename\ with\ spaces.ly\" 
bug.ly
Running Lilypond 
GNU LilyPond 2.15.35
Processing `bug.ly'
Parsing...
Interpreting music... 
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `bug.ps'...
Converting to `./bug.pdf'...
Success: compilation successfully completed
prompt>
prompt>
prompt>

Quoting for the -d option is pretty hairy on Linux too.

The -d introduces an option on the command line and everything
following that must survive intact on it's way through the shell (bash
in my case above) until it gets to the arguments of the Lilypond
program.

> We have already know warnings about using these '-d' commands with
> Windows which are already explicitly stated, but just to dump this as
> a 'LilyPond' issue to fix in doc is not going to help.
> 
> http://lilypond.org/doc/v2.15/Documentation/usage/command_002dline-usage#basic-command-line-options-for-lilypond
> 
> See the 'Note' under the --evaluate command.
> 
> Is this just that?

I'll take a look.

Cheers,
Colin.

-- 

Colin Hall



reply via email to

[Prev in Thread] Current Thread [Next in Thread]