Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commas become un-escaped on save and reload #24

Open
ChromaticIsobar opened this issue Jun 27, 2023 · 3 comments
Open

Commas become un-escaped on save and reload #24

ChromaticIsobar opened this issue Jun 27, 2023 · 3 comments

Comments

@ChromaticIsobar
Copy link

ChromaticIsobar commented Jun 27, 2023

When saving a file with a message containing an escaped comma (\,), the comma becomes unescaped (,) when the file is reloaded.

System
Linux 5.4.0-152-lowlatency #169-Ubuntu x86_64
Pd-L2Ork version 2.17.0 (20210417-rev.ca592f6f)
compiled 21:12:53 Apr 17 2021

This issue does not affect puredata:
Pd-0.50.2 ("") compiled for Debian (0.50.2-3ubuntu0.1) on 2021/08/09 at 11:58:58 UTC

Steps to reproduce

  1. Save this to file (e.g. comma.pd)
    #N canvas 813 362 450 300 12;
    #X obj 0 25 print;
    #X msg 0 0 {"hello": "world"\\\, "y": 2023};
    #X connect 1 0 0 0;
    
  2. Open it with purr-data
  3. Click on the message: it gets printed correctly
  4. Switch to edit mode
  5. Edit the message (e.g. "world" -> "worlds")
  6. Switch out of edit mode
  7. Click on the message: it gets printed correctly
  8. Save the file
  9. Close the file
  10. Open the file: you should notice the comma being unescaped
  11. Click on the message: it gets printed incorrectly (two separate lines)
purr-data-issue.mp4
@agraef
Copy link
Owner

agraef commented Jul 25, 2023

Yes, I can reproduce this. Apparently somewhere on the round-trip between GUI and engine the backslash gets lost. I'll have to investigate. The relevant code is very different from vanilla Pd, because Purr's GUI is written in JavaScript, not Tcl.

@vaishnavi192
Copy link

is the issue closed? if not then plz assign to me. @ChromaticIsobar

@ChromaticIsobar
Copy link
Author

I can still reproduce this issue in release 2.19.3

System
Linux 5.4.0-166-lowlatency #183-Ubuntu x86_64
Pd-L2Ork version 2.19.3 (20230725-rev.e9fca4f8)
compiled 11:31:29 Jul 25 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants