lilypond-user
[Top][All Lists]
Advanced

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

Re: emacs question


From: Jeremy Henty
Subject: Re: emacs question
Date: Wed, 10 Sep 2008 17:04:03 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

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 




reply via email to

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