<div dir="ltr">Thanks Antoine, re my last point: if the norm is that it should, then that's what I'll do. And is why I asked, thanks!<div><br></div><div>iain</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 8, 2021 at 8:44 AM Antoine Rousseau <<a href="mailto:antoine@metalu.net">antoine@metalu.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>the functions "canvas_open()" and "canvas_makefilename()" can do all this for you, in the same way as other data files (texts, arrays, wavs...) are opened.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>- do *not* traverse through all directories on the Pd search paths</div></blockquote><div><br></div><div>why not?  Is it a problem if it finds "scm/foo.scm" somewhere else? I say that because "canvas_open()" and "canvas_makefilename()" WILL traverse Pd search paths...</div><div><br></div><div><br></div><div><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><font face="arial, helvetica, sans-serif"> Antoine<br><br></font></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 8 oct. 2021 à 17:01, Iain Duncan <<a href="mailto:iainduncanlists@gmail.com" target="_blank">iainduncanlists@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi folks, I want to solicit opinions from the broader Pd dev community before figuring out how to fix this bug report from Alex:<div><a href="https://github.com/iainctduncan/scheme-for-pd/issues/15" target="_blank">https://github.com/iainctduncan/scheme-for-pd/issues/15</a><br></div><div><br></div><div>His point was that a relative path didn't do what he expected, situation</div><div>- an s4pd object created as "sp4d scm/my-file.scm"</div><div><br></div><div>So this is what I think should happen for file searching, but will change my mind if it is not in accordance with what users would expect. The handling rules will be the same whether from a a "read {file}" message or an arg to the object:</div><div><br></div><div>Proposed Rules:</div><div>- absolute paths - opened</div><div>- single file name paths:</div><div>   - first look in the canvas directory</div><div>   - then search all Pd paths</div><div>- relative path names (i.e. "s4pd scm/foo.scm"):</div><div>  - search in the canvas directory</div><div>  - do *not* traverse through all directories on the Pd search paths</div><div><br></div><div>Does that sound right? Or would the expectation be that it would search for scm/foo.js on all the search paths? </div><div><br></div><div>Related, should it know how to do the right thing to convert unix style paths on windows?</div><div><br></div><div>Please feel free to comment here or on the github ticket.</div><div><br></div><div>thanks</div><div>iain</div></div>
_______________________________________________<br>
Pd-dev mailing list<br>
<a href="mailto:Pd-dev@lists.iem.at" target="_blank">Pd-dev@lists.iem.at</a><br>
<a href="https://lists.puredata.info/listinfo/pd-dev" rel="noreferrer" target="_blank">https://lists.puredata.info/listinfo/pd-dev</a><br>
</blockquote></div>
</blockquote></div>