Hi all,
I noticed the nice, new feature in [openpanel] and [savepanel] to specify a directory to open in. This saves much, much time navigating to the right directory. But it seems to only work if you specify the full path or the directly lays in the relative path of where pd was opened from (which is almost never the case on Mac, and hardly ever on other systems). It should open from anything within the relative path of where the patch is.
Which brought me to another question; is there any way currently to do a 'cd' or 'pwd' in pd? I tried:
[pwd ( | [shell]
but this has the same problem of openpanel and savepaned; it gives you the path that pd was opened from.
[cd /home/full/path/to/patch ( | [shell]
doesn't seem to do anything, and would be a workaround if it did.
regards, Rich
Quoting Rich E reakinator@gmail.com:
Which brought me to another question; is there any way currently to do a 'cd' or 'pwd' in pd? I tried:
[pwd ( | [shell]
but this has the same problem of openpanel and savepaned; it gives you the path that pd was opened from.
seems to be what i would have expected...if [openpanel] thinks that
the pwd is X, why should $(pwd) think it differently.
[cd /home/full/path/to/patch ( | [shell]
doesn't seem to do anything, and would be a workaround if it did.
it does and it has been discussed multiple times on this list:
sending a command to the [shell] will start a new process (shell), run
the command and quit. like it should be, child processes do not modify
parent processes and siblings.
you could as well do: start a new xterm; notice that you are in
${HOME}; run "cd /tmp"; close the xterm; start another xterm, notice
that you are still in ${HOME}
i am not sure what you would like to achieve with [pwd] or [cd]
that is: if you could manage with [pwd] and [cd], why can't you do so
with the current absolute/relative path in [openpanel]?
fmgads. IOhannes
This message was sent using IMP, the Internet Messaging Program.
it does and it has been discussed multiple times on this list: sending a command to the [shell] will start a new process (shell), run the command and quit. like it should be, child processes do not modify parent processes and siblings.
Ah. This makes sense.
i am not sure what you would like to achieve with [pwd] or [cd] that is: if you could manage with [pwd] and [cd], why can't you do so with the current absolute/relative path in [openpanel]?
I was just looking for a quick hack to get my patches working that try to open up a specific directory using [openpanel]. But I guess the real solution is making [openpanel]/[savepanel] relative to the patch it they live in. I don't really know how this would work for an [openpanel]/[savepanel] within an abstraction.
-rich
On Wed, 2008-05-28 at 23:57 -0700, Rich E wrote:
it does and it has been discussed multiple times on this list: sending a command to the [shell] will start a new process (shell), run the command and quit. like it should be, child processes do not modify parent processes and siblings.
Ah. This makes sense.
i am not sure what you would like to achieve with [pwd] or [cd] that is: if you could manage with [pwd] and [cd], why can't you do so with the current absolute/relative path in [openpanel]?
I was just looking for a quick hack to get my patches working that try to open up a specific directory using [openpanel]. But I guess the real solution is making [openpanel]/[savepanel] relative to the patch it they live in. I don't really know how this would work for an [openpanel]/[savepanel] within an abstraction.
i agree with you, that this new feature of [openpanel] and [savepanel] is kind of bogus the way it is implemented now. in so many cases you rather would want to set a path relative to the patch instead of relative to pd start location.
i personally think, that [[open][save]panel]s within abstractions should behave accordingly: path should be relative to the file location (the path that is written in the window title, when you open the window).
the same goes for the 'open' message to pd: i can't think of a good reason for the actual behaviour. relative to the patch would make much more sense, IMO.
i stop saying this over and over again, as soon as someone comes up with a really good explanation for the current implementation(sorry for being so strongheaded).
roman
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
i agree with roman,
but as was mentioned before, the [getdir] external is good if you need to find the directory of the current patch.
On May 29, 2008, at 10:04 AM, Roman Haefeli wrote:
On Wed, 2008-05-28 at 23:57 -0700, Rich E wrote:
it does and it has been discussed multiple times on this
list: sending a command to the [shell] will start a new process (shell), run the command and quit. like it should be, child processes do not modify parent processes and siblings.
Ah. This makes sense.
i am not sure what you would like to achieve with [pwd] or [cd] that is: if you could manage with [pwd] and [cd], why can't you do so with the current absolute/relative path in [openpanel]?
I was just looking for a quick hack to get my patches working that
try to open up a specific directory using [openpanel]. But I guess the real solution is making [openpanel]/[savepanel] relative to the patch it they live in. I don't really know how this would work for an [openpanel]/[savepanel] within an abstraction.i agree with you, that this new feature of [openpanel] and [savepanel] is kind of bogus the way it is implemented now. in so many cases you rather would want to set a path relative to the patch instead of relative to pd start location.
i personally think, that [[open][save]panel]s within abstractions
should behave accordingly: path should be relative to the file location (the path that is written in the window title, when you open the window).the same goes for the 'open' message to pd: i can't think of a good reason for the actual behaviour. relative to the patch would make much more sense, IMO.
i stop saying this over and over again, as soon as someone comes up
with a really good explanation for the current implementation(sorry for
being so strongheaded).
I also think the default should be relative to the patch. I am not
quite sure now to handle abstractions, that's worth discussing more.
I don't have time to work on it now, but if someone posts a bug in
the tracker (or feature request, if you think that's better), I'll
try my hand at it later.
It's always useful to include a link to web archive to related
discussions like this in the bug tracker.
On a related note, for this release, I made Save As default to the
Home folder (~/), what do people think about that?
.hc
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
http://at.or.at/hans/
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?
i would prefer it to be the directory where the original patch lives in. i hardly ever put any patches into my home directory (apart from ominous delme.pd's that keep popping up...:-))
fgmasdr IOhannes
IOhannes m zmoelnig a écrit :
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?i would prefer it to be the directory where the original patch lives in. i hardly ever put any patches into my home directory (apart from ominous delme.pd's that keep popping up...:-))
same here. vincent
fgmasdr IOhannes
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hello Hans and list, using Pd-0.40.3-extended-rc1-ubuntu-hardy-i386.deb, if i launch a patch (from the command line) in a directory say /data/dir1 where belong my_patch1.pd and my_patch2.pd : cd /data/dir1 pd my_patch1.pd
if i /save as/ my_patch1.pd , pd automatically starts browsing from /data/dir1 but as for the creation of a new patch or the opening of a previous patch, pd will start browsing from the home repertory. i know that there have been a lengthy discussion on this subject but still, i am a bit puzzled by this choice. is there a way to set with the command line, the start directory (open/save,saveas) to the current directory ?
best regards, vincent
By the way, this should be fixed to make more sense in the latest
builds:
default saveas folder is PWD on GNU/Linux and Windows
default saveas folder is Home folder (~/) on Mac OSX
new patches default to the folder last saved in
.hc
On Jun 10, 2008, at 7:02 PM, Vincent Rioux wrote:
Hello Hans and list, using Pd-0.40.3-extended-rc1-ubuntu-hardy-i386.deb, if i launch a patch (from the command line) in a directory say / data/dir1 where belong my_patch1.pd and my_patch2.pd : cd /data/dir1 pd my_patch1.pd
if i save as my_patch1.pd , pd automatically starts browsing from / data/dir1 but as for the creation of a new patch or the opening of a previous
patch, pd will start browsing from the home repertory. i know that there have been a lengthy discussion on this subject
but still, i am a bit puzzled by this choice. is there a way to set
with the command line, the start directory (open/save,saveas) to
the current directory ?best regards, vincent
Using ReBirth is like trying to play an 808 with a long stick. - David Zicarelli
Hans-Christoph Steiner a écrit :
By the way, this should be fixed to make more sense in the latest builds:
default saveas folder is PWD on GNU/Linux and Windows
default saveas folder is Home folder (~/) on Mac OSX
new patches default to the folder last saved in
.hc
great, thanks a lot Hans!
btw it gave me the occasion to rebuild pd and some extensions from source on hardy...
Actually i am having troubles with Gem, pix_record and libquicktime after some investigations i noticed that libquicktime1 provokes a segfault of pix_record libquicktime1 comes from archive.ubuntu.com hardy/universe
something else which is rather strange: i use pix_record to store as a jpeg mov file 800x600 pictures but once written the movie file actually display 800x608 frames (and a beautiful 8 pixels wide green stuff). I can trim them later on with mencoder so not a big issue, but i wish i could understand why this is happening.
best, Vincent
On Jun 10, 2008, at 7:02 PM, Vincent Rioux wrote:
Hello Hans and list, using Pd-0.40.3-extended-rc1-ubuntu-hardy-i386.deb, if i launch a patch (from the command line) in a directory say /data/dir1 where belong my_patch1.pd and my_patch2.pd : cd /data/dir1 pd my_patch1.pd
if i /save as/ my_patch1.pd , pd automatically starts browsing from /data/dir1 but as for the creation of a new patch or the opening of a previous patch, pd will start browsing from the home repertory. i know that there have been a lengthy discussion on this subject but still, i am a bit puzzled by this choice. is there a way to set with the command line, the start directory (open/save,saveas) to the current directory ?
best regards, vincent
Using ReBirth is like trying to play an 808 with a long stick.
-David Zicarelli
Sounds like it is worth making a bug report to the gem tracker.
.hc
On Jun 24, 2008, at 4:52 PM, Vincent Rioux wrote:
great, thanks a lot Hans!
btw it gave me the occasion to rebuild pd and some extensions from
source on hardy...Actually i am having troubles with Gem, pix_record and libquicktime after some investigations i noticed that libquicktime1 provokes a
segfault of pix_record libquicktime1 comes from archive.ubuntu.com hardy/universesomething else which is rather strange: i use pix_record to store as a jpeg mov file 800x600 pictures but
once written the movie file actually display 800x608 frames (and a
beautiful 8 pixels wide green stuff). I can trim them later on with
mencoder so not a big issue, but i wish i could understand why this
is happening.best, Vincent
Hans-Christoph Steiner a écrit :
By the way, this should be fixed to make more sense in the latest
builds:
default saveas folder is PWD on GNU/Linux and Windows
default saveas folder is Home folder (~/) on Mac OSX
new patches default to the folder last saved in
.hc
On Jun 10, 2008, at 7:02 PM, Vincent Rioux wrote:
Hello Hans and list, using Pd-0.40.3-extended-rc1-ubuntu-hardy-i386.deb, if i launch a patch (from the command line) in a directory say / data/dir1 where belong my_patch1.pd and my_patch2.pd : cd /data/dir1 pd my_patch1.pd
if i save as my_patch1.pd , pd automatically starts browsing
from /data/dir1 but as for the creation of a new patch or the opening of a
previous patch, pd will start browsing from the home repertory. i know that there have been a lengthy discussion on this subject
but still, i am a bit puzzled by this choice. is there a way to
set with the command line, the start directory (open/save,saveas)
to the current directory ?best regards, vincent
Using ReBirth is like trying to play an 808 with a long stick. - David Zicarelli
"[T]he greatest purveyor of violence in the world today [is] my own
government." - Martin Luther King, Jr.
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
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
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
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:
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
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
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?
Frank Barknecht _ ______footils.org__
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:
done before.
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
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.
Frank Barknecht _ ______footils.org__
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 fbar@footils.org 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
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.
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 fbar@footils.org
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
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
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:
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
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?
Frank Barknecht _ ______footils.org__
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.
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 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
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?
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
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
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
On 29/05/2008, at 4.09, Rich E wrote:
Which brought me to another question; is there any way currently to
do a 'cd' or 'pwd' in pd?
Since your already on the external path you could use [getdir] from
ggee.
I tried:
[pwd ( | [shell]
but this has the same problem of openpanel and savepaned; it gives
you the path that pd was opened from.[cd /home/full/path/to/patch ( | [shell]
doesn't seem to do anything, and would be a workaround if it did.
When using a [shell] object you'd really wanna run a script. Since
it's a new shell that's opened each time you query it.
So when you do [cd /to/som/dir(/[shell] and then after wards to [pwd(/
[shell] then you'r no longer cd'ed to /to/some/dir but get the root
dir. You can make a simple shell-script that both cd and pwd and then
run that script. That is if you want to use a [shell] object.