The confusion is my fault... "." never really meant current working directory,
it just means "THIS directory here".  I.E., it could mean any #$^#$ thing at
all :)

M

On Sat, Jan 08, 2022 at 10:42:35AM +0100, Dan Wilcox wrote:
> I agree with Roman's point that "current working directory" as an idea is 
> different, depending on the user. For some, it will be relative to the patch, 
> for others it will be relative to the shell (and the resulting programs 
> launched by it). I agree it makes technical sense that [file] would be 
> relative to the Pd process, knowing the C api behind it, but for many it's a 
> bit of friction for sure since it's something that now works different from 
> other objects which handle paths implicitly. Additionally, I think it's 
> perhaps a stretch to assume most beginners are aware of how shells and paths 
> work.
> 
> If it were up to me, I would make [file] work like the other objects and 
> treat relative paths as relative to the canvas. OTOH I know this could 
> complicate the implementation. I think at the very least, this difference 
> needs to be well documented with the requisite canvas-oriented approaches 
> documented. Forgive me if they are already as I've not used [file] yet, but 
> Roman's question indicates to me perhaps not everything is covered yet. ;)
> 
> Another approach is to provide a very explicit option to get the patch canvas 
> location which fits into the api ala [file patchdir] or [file canvasdir]. I 
> know this is probably redundant to [pdcontrol] but perhaps helps with the 
> distinction..?
> 
> > On Jan 8, 2022, at 1:07 AM, pd-list-requ...@lists.iem.at wrote:
> > 
> > Message: 4
> > Date: Sat, 8 Jan 2022 01:07:48 +0100
> > From: Christof Ressi <i...@christofressi.com 
> > <mailto:i...@christofressi.com>>
> > To: Pd-List <pd-list@lists.iem.at <mailto:pd-list@lists.iem.at>>
> > Subject: Re: [PD] [file]: paths not relative to patch
> > Message-ID: <0d33e805-37ff-4988-d50e-29eb3d86d...@christofressi.com 
> > <mailto:0d33e805-37ff-4988-d50e-29eb3d86d...@christofressi.com>>
> > Content-Type: text/plain; charset=UTF-8; format=flowed
> > 
> >> If I pass a relative path to such an utility, I want it to resolve to 
> >> the current working directy and *not* to the Pd patch itself. 
> > In practice, I almost wrap such utilities in a shell script anyway and 
> > there I would turn relative path arguments into absolute paths before 
> > passing them on to Pd. But I just wanted to show that the current 
> > directory is not completely useless.
> 
> --------
> Dan Wilcox
> @danomatika 
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__twitter.com_danomatika&d=DwIFAg&c=-35OiAkTchMrZOngvJPOeA&r=XprZV3Fxus2L1LCw80hE4Q&m=si0E4sBrl6UO_wKfCrB67OJIEHVUTR1xFkggTXMywUTZjoXA_Zik5eRJKP7Q-LwD&s=gH_npJrym_AUp6g2bC1Cy42FFNjsXv2JGArQ6pEwxoM&e=
>  >
> danomatika.com 
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__danomatika.com_&d=DwIFAg&c=-35OiAkTchMrZOngvJPOeA&r=XprZV3Fxus2L1LCw80hE4Q&m=si0E4sBrl6UO_wKfCrB67OJIEHVUTR1xFkggTXMywUTZjoXA_Zik5eRJKP7Q-LwD&s=5QkVbm0PrquWxtDou0wHEgQlij2_6GjNBrY2b5e5XMI&e=
>  >
> robotcowboy.com 
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__robotcowboy.com_&d=DwIFAg&c=-35OiAkTchMrZOngvJPOeA&r=XprZV3Fxus2L1LCw80hE4Q&m=si0E4sBrl6UO_wKfCrB67OJIEHVUTR1xFkggTXMywUTZjoXA_Zik5eRJKP7Q-LwD&s=H8fVMW2BC7JQXR0lgwqC8aVGjEXivsHhxcCet25Ib4Q&e=
>  >
> 
> 
> 

> _______________________________________________
> Pd-list@lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.puredata.info_listinfo_pd-2Dlist&d=DwICAg&c=-35OiAkTchMrZOngvJPOeA&r=XprZV3Fxus2L1LCw80hE4Q&m=si0E4sBrl6UO_wKfCrB67OJIEHVUTR1xFkggTXMywUTZjoXA_Zik5eRJKP7Q-LwD&s=Yk4lLERpW4lj0UBqxDacoYqSc91l7nXb2qIJgzQCYoM&e=
>  




_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to