[PD] Hide backslash escapes in symbol atoms

Roman Haefeli reduzent at gmail.com
Thu Nov 18 15:32:41 CET 2021


Hi all

It's just a cosmetic thing, nevertheless it concerns me.

Up to 0.50, usage of whitespaces in symbol atoms was good. As in:
Whitespaces could be used while typing into symbol atoms and the
displayed value showed only the whitespaces without the backslashes for
escaping them, while saving symbols containing whitespaces in text
would add the backslashes as a way to preserve the symbol for next
read.

Since 0.51, things regarding backslashes are quite messy. Backslashes
are hidden in iemgui labels, but displayed in symbol atoms and print
output. There is/was an issue about that on Github which I'm unable to
spot right now that contained a lengthy discussion about the pros and
cons of the current (imho: messy) situation. 

I don't quite understand if the change between 0.50 and 0.51 was
intentional or simply a side effect of other fixes. However, I would
very much prefer to get the old behavior back. 

I propose to distinguish the FUDI-encoded value from the FUDI-decoded
value. As long as the message is FUDI-encoded - I write it down to a
file or I send through the network - the backslashes should be kept.
However, when I decode the FUDI message, for instance, when I take a
symbol from a message and display it with a symbol atom, the backslash
should not be displayed, since I want to display the decoded value.
Otherwise there is no way to ever get back the decoded value.

I'm not sure about [print], but considering it already skips the 'list'
selector for lists starting with a number or the 'float' selector for
number messages, I consider it to display the decoded value and thus it
should display symbols without backslash escaping.

Roman



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20211118/2ab54292/attachment.sig>


More information about the Pd-list mailing list