On Wed, Sep 10, 2008 at 04:41:57PM +0200, James E. Bailey wrote:
>
> M-: (buffer-file-name) returned
> "/Users/jamesebailey/Documents/James Music/Choral Music/Dad/Litany/ 
> Litany.ly"
> with the quotes
>
> [...] 
>
> So, if I understand correctly,
>       1) buffer-file-name is a correctly escaped filename

No, the quotes you see are part of the print syntax of the string, not
the string  itself.  If you query  the string for  its first character
(ie. the one at index 0) you'll get a '/', not a '"'.  Look:

Eval: (buffer-file-name)
"/tmp/foo.txt"

Eval: (aref (buffer-file-name) 0)
47 (#o57, #x2f)

Eval: ?\/
47 (#o57, #x2f)

Eval: ?\"
34 (#o42, #x22)

So  (buffer-file-name) does  not escape  the string.   From  the elisp
manual:

    - Function: shell-quote-argument argument
        This function returns a string which represents, in shell
        syntax, an argument whose actual contents are ARGUMENT.  It
        should work reliably to concatenate the return value into a
        shell command and then pass it to a shell for execution.

which sounds like what you want.

Regards, 

Jeremy Henty 


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to