Escaped spaces not present after save/load

When i save a patch and then load it the escaped spaces go away.

I’ve tried to use loadbang on a symbol like this:

does anyone know how to make escaped spaces stay?

TL;DR; I solved the problem, seems to be a bug with pd.

When I am entering my escaped spaces it looks like this:

And upon removing focus from the message block, the \ characters remain there…

Now, upon saving my patch, i can open it in a text editor and see that my escape are gone!
#X msg 341 60 set Octave transpose %d;

After loading my patch the escapes are not present…

If I manually add the escapes in the patch, it works!
#X msg 341 60 set Octave\ transpose\ %d;

I’ve been using puredata for years on and off, and the more I use it the more I hate it. This is ridiculous.

1 Like

not really a bug, its just that spaces are a pain in PD generally,
it’s all due to the fact that any non-float is represented as a symbol,
a symbol cannot contain a space… as its the delimiter for symbols, and there is no ‘escape’ character for this - so ‘strings’ end up being passed around as lists of symbols

this is all ok (if a bit clunky!) as long as externals handle lists of symbols correctly
e.g. makefilename should not require escaping, it should automatically escape filenames depending upon the platforms requirements.

but for sure, strings and symbols are a routing pain in PD :wink:

I discovered this behavior happening with makefilename. As a workaround, I was trying to loadbang a symbol with the escaped spaces and the behavior persisted after patch save/reload. I think it has something to do with how puredata writes the patch file.