Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
On May 30, 2008, at 7:19 PM, Martin Peach wrote: > Hans-Christoph Steiner wrote: >> On May 30, 2008, at 3:17 PM, Damian Stewart wrote: >> why not do what a lot of other apps do and persistently store the last-used-directory somewhere in the config, so that next time I open Pd, Open is pointing to the same place as the last time I closed it? >>> >>> so no love for this idea then? >> >> That could work too. That would rely on the preferences system, >> right now it is not easy/clean to extend. So maybe that would >> come later. >> > > It should be not too difficult (?) to have openpanel/savepanel save > their current path in the .pd file when the patch is saved. > It seems to involve registering a save function using > class_setsavefn() to replace the default text_save() with a > panel_save() which would append the path symbol to the "#X obj x y > openpanel" binbuf for the object. Then in the panel_new() routine > the path will show up as an extra argument (I hope;) if it is > redeclared as openpanel_new(t_symbol *s, int argc, t_atom argv) and > adding a GIMME to the class_new() arguments. Hmm, that does sound useful, wanna code it? :D .hc I spent 33 years and four months in active military service and during that period I spent most of my time as a high class muscle man for Big Business, for Wall Street and the bankers. - General Smedley Butler ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
Hans-Christoph Steiner wrote: >On May 30, 2008, at 3:17 PM, Damian Stewart wrote: > >>>why not do what a lot of other apps do and persistently store the >>>last-used-directory somewhere in the config, so that next time I open >>>Pd, Open is pointing to the same place as the last time I closed it? >> >>so no love for this idea then? > >That could work too. That would rely on the preferences system, right now >it is not easy/clean to extend. So maybe that would come later. > It should be not too difficult (?) to have openpanel/savepanel save their current path in the .pd file when the patch is saved. It seems to involve registering a save function using class_setsavefn() to replace the default text_save() with a panel_save() which would append the path symbol to the "#X obj x y openpanel" binbuf for the object. Then in the panel_new() routine the path will show up as an extra argument (I hope;) if it is redeclared as openpanel_new(t_symbol *s, int argc, t_atom argv) and adding a GIMME to the class_new() arguments. Martin ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
On May 30, 2008, at 3:17 PM, Damian Stewart wrote: > Damian Stewart wrote: > >> why not do what a lot of other apps do and persistently store the >> last-used-directory somewhere in the config, so that next time I >> open Pd, Open is pointing to the same place as the last time I >> closed it? > > so no love for this idea then? That could work too. That would rely on the preferences system, right now it is not easy/clean to extend. So maybe that would come later. .hc News is what people want to keep hidden and everything else is publicity. - Bill Moyers ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
Damian Stewart wrote: > why not do what a lot of other apps do and persistently store the > last-used-directory somewhere in the config, so that next time I open Pd, > Open is pointing to the same place as the last time I closed it? so no love for this idea then? ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
In the most recent versions of Pd-extended, you can use "~" on all platforms for any path (I think, report a bug if not). "~hans", "~username", etc. doesn't work tho. On Windows, you can use envvars like %UserProfile%, so like [symbol % UserProfile%/Desktop(. I would be nice to have this on UNIX platforms, but I haven't found a function to do the conversion, like Windows has. .hc On May 30, 2008, at 3:58 AM, Rich E wrote: When I first posted about this, it was about the recently new ability to do this: [symbol somedir( | [openpanel] But this only works if "somedir" is at "$HOME/somedir" on linux and "/usr/blahblah/pdir/somedir" on mac. So if my directly layout is something like "~/patches/somedir", I have to explicitly write in the message to [openpanel] "/home/myname/patches/somedir". This will only work on my directly layout, so if it is a patch I'm going to share, I cannot use this new feature (might I add I really like the feature). I was only suggesting that [openpanel]/[savepanel]'s symbol argument has the patch's current directory appended to it, unless the "~" sign is used for home, or a full path is given. I think, as Martin suggested, this is all handled internally with canvas_getdir() and open_via_path(). Regarding the normal operation of [openpanel]/[savepanel], i.e. sending it a bang, I think it would be nice if the last directory navigated to is remembered, else the $HOME. -rich On Thu, May 29, 2008 at 2:26 PM, Frank Barknecht <[EMAIL PROTECTED]> wrote: Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote: > The problem here is that most people do not start Pd from the command > line. With Pd-extended, it is now included in the standard free > desktop menus (only tested on GNOME, should work on KDE), so I'll bet > most people use that rather than the command line (I do on Ubuntu). The HOME directory already is the default directory on Linux with Gnome/KDE/Blackbox or whatever, as it's the working directory when starting Pd from the manager. No need for any changes AFAIK. I'm the wrong person to comment on MS-Windows or Mac, as I don't use these and don't care even the teeny-tiniest bit about what happens to Pd on these systems, but please leave it on Linux as it is the standard here. All other apps like Vim, Emacs, Gimp, Firefox use the `pwd` as default and I can't see why Pd should behave differently. If you want to confirm this yourself, try the following with the gimp: $ cd /tmp $ gimp & Then make a new file, select "Save" and it will give you "/tmp" as first directory choice. Ciao -- Frank Barknecht _ __footils.org__ ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/ listinfo/pd-list There is no way to peace, peace is the way. -A.J. Muste ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
On May 30, 2008, at 8:38 AM, IOhannes m zmölnig wrote: > Frank Barknecht wrote: >> Hallo, > >> >> I'm the wrong person to comment on MS-Windows or Mac, as I don't use >> these and don't care even the teeny-tiniest bit about what happens to > > iirc, you can set the working directory on w32 in your "link". > so i suggest setting it to %HOME% (or whatever the name is) and no > need > to modify a single line of code within Pd. > > i am sure that there is a mechanism for this on OSX too (where i admit > that it is really annoying that Pd thinks it is started from "/"; > but i > would rather have os flaws fixed on the os level rather than on the > app-level...) So maybe something like this: - default to folder that Pd starts in - make launching shortcuts start in $HOME - then last folder used, with separate storage for open, save, and saveas .hc As we enjoy great advantages from inventions of others, we should be glad of an opportunity to serve others by any invention of ours; and this we should do freely and generously. - Benjamin Franklin ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
On May 29, 2008, at 11:31 PM, Frank Barknecht wrote: > Hallo, > Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote: > >>> How is it decided what's the topmost patch? >> >> By which window has focus. > > Missed this: But the focus is the window about to be saved, isn't it? Hehe, um, yeah, so the window that had focus immediately before. .hc > > Ciao > -- > Frank Barknecht _ > __footils.org__ > > ___ > PD-list@iem.at mailing list > UNSUBSCRIBE and account-management -> http://lists.puredata.info/ > listinfo/pd-list I have the audacity to believe that peoples everywhere can have three meals a day for their bodies, education and culture for their minds, and dignity, equality and freedom for their spirits. - Martin Luther King, Jr. ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
Frank Barknecht wrote: > Hallo, > > I'm the wrong person to comment on MS-Windows or Mac, as I don't use > these and don't care even the teeny-tiniest bit about what happens to iirc, you can set the working directory on w32 in your "link". so i suggest setting it to %HOME% (or whatever the name is) and no need to modify a single line of code within Pd. i am sure that there is a mechanism for this on OSX too (where i admit that it is really annoying that Pd thinks it is started from "/"; but i would rather have os flaws fixed on the os level rather than on the app-level...) mfgas.dr IOhannes ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
Rich E wrote: > When I first posted about this, it was about the recently new ability to > do this: > > [symbol somedir( > | > [openpanel] I did not know this yet, cool! > But this only works if "somedir" is at "$HOME/somedir" on linux and > "/usr/blahblah/pdir/somedir" on mac. So if my directly layout is > something like "~/patches/somedir", I have to explicitly write in the > message to [openpanel] "/home/myname/patches/somedir". This will only > work on my directly layout, so if it is a patch I'm going to share, I > cannot use this new feature (might I add I really like the feature). > > I was only suggesting that [openpanel]/[savepanel]'s symbol argument has > the patch's current directory appended to it, unless the "~" sign is > used for home, or a full path is given. I think, as Martin suggested, > this is all handled internally with canvas_getdir() and open_via_path(). > > Regarding the normal operation of [openpanel]/[savepanel], i.e. sending > it a bang, I think it would be nice if the last directory navigated to > is remembered, else the $HOME. I think it is quite easy to distinguish between what is a local path and what is an absolute path. these features that you are talking about would make life much easier! I hope they get added. marius. ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
When I first posted about this, it was about the recently new ability to do this: [symbol somedir( | [openpanel] But this only works if "somedir" is at "$HOME/somedir" on linux and "/usr/blahblah/pdir/somedir" on mac. So if my directly layout is something like "~/patches/somedir", I have to explicitly write in the message to [openpanel] "/home/myname/patches/somedir". This will only work on my directly layout, so if it is a patch I'm going to share, I cannot use this new feature (might I add I really like the feature). I was only suggesting that [openpanel]/[savepanel]'s symbol argument has the patch's current directory appended to it, unless the "~" sign is used for home, or a full path is given. I think, as Martin suggested, this is all handled internally with canvas_getdir() and open_via_path(). Regarding the normal operation of [openpanel]/[savepanel], i.e. sending it a bang, I think it would be nice if the last directory navigated to is remembered, else the $HOME. -rich On Thu, May 29, 2008 at 2:26 PM, Frank Barknecht <[EMAIL PROTECTED]> wrote: > Hallo, > Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote: > > > The problem here is that most people do not start Pd from the command > > line. With Pd-extended, it is now included in the standard free > > desktop menus (only tested on GNOME, should work on KDE), so I'll bet > > most people use that rather than the command line (I do on Ubuntu). > > The HOME directory already is the default directory on Linux with > Gnome/KDE/Blackbox or whatever, as it's the working directory when > starting Pd from the manager. No need for any changes AFAIK. > > I'm the wrong person to comment on MS-Windows or Mac, as I don't use > these and don't care even the teeny-tiniest bit about what happens to > Pd on these systems, but please leave it on Linux as it is the > standard here. All other apps like Vim, Emacs, Gimp, Firefox use the > `pwd` as default and I can't see why Pd should behave differently. > > If you want to confirm this yourself, try the following with the gimp: > > $ cd /tmp > $ gimp & > > Then make a new file, select "Save" and it will give you "/tmp" as > first directory choice. > > Ciao > -- > Frank Barknecht _ __footils.org__ > > ___ > PD-list@iem.at mailing list > UNSUBSCRIBE and account-management -> > http://lists.puredata.info/listinfo/pd-list > ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote: > >How is it decided what's the topmost patch? > > By which window has focus. Missed this: But the focus is the window about to be saved, isn't it? Ciao -- Frank Barknecht _ __footils.org__ ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
Hallo, Hans-Christoph Steiner hat gesagt: // Hans-Christoph Steiner wrote: > The problem here is that most people do not start Pd from the command > line. With Pd-extended, it is now included in the standard free > desktop menus (only tested on GNOME, should work on KDE), so I'll bet > most people use that rather than the command line (I do on Ubuntu). The HOME directory already is the default directory on Linux with Gnome/KDE/Blackbox or whatever, as it's the working directory when starting Pd from the manager. No need for any changes AFAIK. I'm the wrong person to comment on MS-Windows or Mac, as I don't use these and don't care even the teeny-tiniest bit about what happens to Pd on these systems, but please leave it on Linux as it is the standard here. All other apps like Vim, Emacs, Gimp, Firefox use the `pwd` as default and I can't see why Pd should behave differently. If you want to confirm this yourself, try the following with the gimp: $ cd /tmp $ gimp & Then make a new file, select "Save" and it will give you "/tmp" as first directory choice. Ciao -- Frank Barknecht _ __footils.org__ ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
On May 29, 2008, at 7:28 PM, Frank Barknecht wrote: > Hallo, > Martin Peach hat gesagt: // Martin Peach wrote: > Hans-Christoph Steiner wrote: >>> What folder were you working in when you create a new patch? >>> What if >>> there are no other patches open? What if there are many patches >>> open in >>> many different folders? >>> >> >> I usually open pd from inside ~/pd_patches and have subdirectories >> in there. >> If I make a new patch it's often interacting with another patch >> already in >> the same folder. > > I do this as well and I think it would be *very irritating* if Pd > would default to some directory different from the one I started Pd > from. Btw: If I start Pd from the window manager, new patches > automatically get saved to $HOME (because $HOME is the current working > directory of the window manager and everything else after logging in), > so there's no need to change anything on Linux. The problem here is that most people do not start Pd from the command line. With Pd-extended, it is now included in the standard free desktop menus (only tested on GNOME, should work on KDE), so I'll bet most people use that rather than the command line (I do on Ubuntu). On Window and Mac OS X, it is quite rare to start Pd from the command line. All that is a long way of saying that I don't think using the directory that Pd was launched from is a very reliable way of getting the directory that the user will most likely want. I think the combo of $HOME for new patches with no others and the directory of the topmost patch would make the most people happy. One thing to also consider is the last directory used. So maybe something like this: - $HOME when no other patch is open, and it's a new patch - directory of topmost patch when no open/save operation has been done before. - last_open_path/last_save_path once the openpanel/savepanel has been used >>> Before, on Mac OS X at least, it defaulted to "/". I've changed >>> that to >>> "~", which I think is a lot more useful. Perhaps it could be >>> like this: >>> >>> - if no other patches open, then "~". >>> - if other patches are open, then use the folder of the current >>> top window >> >> Yes, that's better, using "~" as default. And any new patch is >> most likely >> to be saved in the folder of the topmost already-open patch. And >> the default >> directory should also be a specifiable option in the preferences >> somewhere, >> not hard-coded, in the interest of total control. > > How is it decided what's the topmost patch? By which window has focus. .hc > > Ciao > -- > Frank Barknecht _ > __footils.org__ > > ___ > PD-list@iem.at mailing list > UNSUBSCRIBE and account-management -> http://lists.puredata.info/ > listinfo/pd-list Computer science is no more related to the computer than astronomy is related to the telescope. -Edsger Dykstra ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
Damian Stewart wrote: >-- while we're talking about open and save, is it possible to have >different default directories for [openpanel] vs for File->Open? (and for >[savepanel] vs File->Save, come to think of it > In x_gui.c the functions openpanel_symbol() and savepanel_symbol() appear to use an empty path by default. These could be changed to use some other path. Martin ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was:[openpanel]/[savepanel]directory, [cd])
Frank Barknecht wrote: >How is it decided what's the topmost patch? I suppose whatever is returned by canvas_getcurrentdir(). Martin ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
Hans-Christoph Steiner wrote: > What folder were you working in when you create a new patch? What if > there are no other patches open? What if there are many patches open > in many different folders? > > Before, on Mac OS X at least, it defaulted to "/". I've changed that > to "~", which I think is a lot more useful. Perhaps it could be like > this: > > - if no other patches open, then "~". > - if other patches are open, then use the folder of the current top > window why not do what a lot of other apps do and persistently store the last-used-directory somewhere in the config, so that next time I open Pd, Open is pointing to the same place as the last time I closed it? -- while we're talking about open and save, is it possible to have different default directories for [openpanel] vs for File->Open? (and for [savepanel] vs File->Save, come to think of it -- damian stewart | +31 659 025 782 | [EMAIL PROTECTED] frey | live art with machines | http://www.frey.co.nz ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
Hallo, Martin Peach hat gesagt: // Martin Peach wrote: > >>Hans-Christoph Steiner wrote: > >What folder were you working in when you create a new patch? What if > >there are no other patches open? What if there are many patches open in > >many different folders? > > > > I usually open pd from inside ~/pd_patches and have subdirectories in there. > If I make a new patch it's often interacting with another patch already in > the same folder. I do this as well and I think it would be *very irritating* if Pd would default to some directory different from the one I started Pd from. Btw: If I start Pd from the window manager, new patches automatically get saved to $HOME (because $HOME is the current working directory of the window manager and everything else after logging in), so there's no need to change anything on Linux. > >Before, on Mac OS X at least, it defaulted to "/". I've changed that to > >"~", which I think is a lot more useful. Perhaps it could be like this: > > > >- if no other patches open, then "~". > >- if other patches are open, then use the folder of the current top window > > Yes, that's better, using "~" as default. And any new patch is most likely > to be saved in the folder of the topmost already-open patch. And the default > directory should also be a specifiable option in the preferences somewhere, > not hard-coded, in the interest of total control. How is it decided what's the topmost patch? Ciao -- Frank Barknecht _ __footils.org__ ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
>>Hans-Christoph Steiner wrote: >What folder were you working in when you create a new patch? What if >there are no other patches open? What if there are many patches open in >many different folders? > I usually open pd from inside ~/pd_patches and have subdirectories in there. If I make a new patch it's often interacting with another patch already in the same folder. >Before, on Mac OS X at least, it defaulted to "/". I've changed that to >"~", which I think is a lot more useful. Perhaps it could be like this: > >- if no other patches open, then "~". >- if other patches are open, then use the folder of the current top window Yes, that's better, using "~" as default. And any new patch is most likely to be saved in the folder of the topmost already-open patch. And the default directory should also be a specifiable option in the preferences somewhere, not hard-coded, in the interest of total control. Martin ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
On May 29, 2008, at 4:48 PM, Martin Peach wrote: > Hans-Christoph Steiner wrote: >> >> Sorry, I should have been clearer. The Save As location for New/ >> Untitled patches is set to $HOME. Save As for existing patches >> remains the current folder. >> > > I can't think of any time this would be useful. Apps that do that > force me > to waste my time drilling back down to the folder I'm working in. > Having > loose patches floating around the home directory is messy as well. What folder were you working in when you create a new patch? What if there are no other patches open? What if there are many patches open in many different folders? Before, on Mac OS X at least, it defaulted to "/". I've changed that to "~", which I think is a lot more useful. Perhaps it could be like this: - if no other patches open, then "~". - if other patches are open, then use the folder of the current top window .hc > > Martin > > > > ___ > PD-list@iem.at mailing list > UNSUBSCRIBE and account-management -> http://lists.puredata.info/ > listinfo/pd-list As we enjoy great advantages from inventions of others, we should be glad of an opportunity to serve others by any invention of ours; and this we should do freely and generously. - Benjamin Franklin ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel]directory, [cd])
Hans-Christoph Steiner wrote: > >Sorry, I should have been clearer. The Save As location for New/ >Untitled patches is set to $HOME. Save As for existing patches >remains the current folder. > I can't think of any time this would be useful. Apps that do that force me to waste my time drilling back down to the folder I'm working in. Having loose patches floating around the home directory is messy as well. Martin ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Re: [PD] default Save As location (was: [openpanel]/[savepanel] directory, [cd])
On May 29, 2008, at 1:42 PM, Roman Haefeli wrote: > On Thu, 2008-05-29 at 13:29 +0200, Hans-Christoph Steiner wrote: > >> >> On a related note, for this release, I made Save As default to the >> Home folder (~/), what do people think about that? > > personally, i sometimes used the fact, that pd writes patches per > default to the start location by cd-ing to the directory first, before > starting pd, when i knew, i am going to write a new patch. at same > time > i wouldn't mind, if the default directory would be ~/. this makes > sense > for me. Sorry, I should have been clearer. The Save As location for New/ Untitled patches is set to $HOME. Save As for existing patches remains the current folder. .hc > > roman > > > > > > ___ > Telefonate ohne weitere Kosten vom PC zum PC: http:// > messenger.yahoo.de Access to computers should be unlimited and total. - the hacker ethic ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
[PD] default Save As location (was: [openpanel]/[savepanel] directory, [cd])
On Thu, 2008-05-29 at 13:29 +0200, Hans-Christoph Steiner wrote: > > On a related note, for this release, I made Save As default to the > Home folder (~/), what do people think about that? personally, i sometimes used the fact, that pd writes patches per default to the start location by cd-ing to the directory first, before starting pd, when i knew, i am going to write a new patch. at same time i wouldn't mind, if the default directory would be ~/. this makes sense for me. roman ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list