hi,
the prospect of refining Pd internals to allow for a more flexible dealing with message text, is good news, no doubt.
Please, do not restrict this discussion to "how to accept filenames with spaces" only! If the only problem was: how to prevent [open(save)panel] from truncating of filenames, then the best solution would be to leave it as an internal matter of gui -> [openpanel] communication, with [openpanel] output being an unquoted symbol with unescaped whitespace[1]. If this does not work, please show me why.
But embedding whitespace in symbols typed into message box or loaded from file is a totally different story. And it does not matter, if those symbols are to be interpreted as filenames, or as anything else.
In tune with Richard -- quoting is less clumsy than escaping, it is less foreign for an average user (unix user as well :-), less restrictive, and less expensive to parse. For instance, {symbol "why not"} is a valid message box to type, while {symbol why\snot} is not -- at least this is now the case.
And the algorithm for atom_string() would be simple and cheap: if a symbol contains special chars or separators, or if it starts with a digit, then do add quotes. The algorithm for binbuf_text() would be even simpler -- no characters need special treatment, except the quotes themselves.
But making quoting a universal standard, while retaining existing escaping scheme for dollars, semis, and commas, requires care. There are many special cases, various pitfalls, and much room for users to abuse them. If having message target or message selector in quotes does not really scare me, what about resolving any combination of quoted and escaped or not escaped dollars, semis, and commas? Maybe it is easy, but I am lost here...
K"puzzled"of
[1] This effect could be achieved crudely, just as in my [opanel] example, which bashes any separator (be it single- or multi- character) to a single space. Otherwise some escaping scheme could be used -- and it really does not matter what scheme.
Miller Puckette wrote:
No, Pd doesn't do this, at least not yet. Perhaps this is a better scheme than the one I'm proposing. I have to look and see how hard it would be to implement (maybe it's just easy)...
...
On Fri, Nov 16, 2001 at 05:29:13PM +0000, Richard Dobson wrote:
Is this sort of thing really necessary? The standard system on both Win32 and OS X is to wrap paths in quotes, as in "C:\My SoundFiles\Bass Riff.wav"