Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!g22g2000prf.googlegroups.com!not-for-mail
From: Nathan <ngreco32@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: "Change directory" dialog box
Date: Fri, 9 Oct 2009 12:29:31 -0700 (PDT)
Organization: http://groups.google.com
Lines: 64
Message-ID: <8cbe569f-3f37-4f6a-bb64-f0ae2b1dc9c7@g22g2000prf.googlegroups.com>
References: <haidoe$mjn$1@fred.mathworks.com> <hal2l8$25f$1@fred.mathworks.com> 
	<3b8255ac-f7ba-4247-b877-3a98da564c7d@c3g2000yqd.googlegroups.com> 
	<hao2b7$fc6$1@fred.mathworks.com>
NNTP-Posting-Host: 198.206.219.34
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1255116572 13465 127.0.0.1 (9 Oct 2009 19:29:32 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 9 Oct 2009 19:29:32 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: g22g2000prf.googlegroups.com; posting-host=198.206.219.34; 
	posting-account=_KeVcAoAAAB7j3xn35ujaQ0BoQhuzwJP
User-Agent: G2/1.0
X-HTTP-Via: 1.1 wwwproxy-son-ca-02.ca.sandia.gov:80 (squid/2.5.STABLE14)
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) 
	Gecko/20090824 Firefox/3.5.3,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:576308


On Oct 9, 12:19 pm, "Jan Simon" <matlab.THIS_Y...@nMINUSsimon.de>
wrote:
> Dear ImageAnalyst!
>
> > Well for me, I'd just as soon have it change directory immediately
> > upon selecting the m-file that you're going to work with.  So you
> > click on the filename in the "task bar" (or whatever you call it) and
> > the code window switches to the code for that m-file, and then I'd
> > like it to change the current folder right then - why wait until you
> > run it (by clicking on the green triangle).  If you changed only after
> > you ran it, then you have this intermediate state where the displayed
> > code and the current folder don't match.  Then after you click "run"
> > they do match.  So I don't want the discrepancy of having different
> > current folders when looking at some code, depending on whether I ran
> > the code or not.
>
> There are 2 fundamental concepts for managing paths: the current directory and the "path" mechanism, which means a list of paths in a specific order to look for searches files in.
> They are really good concepts, therefore we find them for a variety of operating systems and development environments. Of course Matlab must be compatible with these established concepts.
>
> 1. If I'm working with an M-file, I absolutely do not want the current folder to be changed. E.g. if I CD to a directory with the data file "TestData.mat" and debug the processing function, it would be a hard nonsense, if the file cannot be found anymore due to a missing absolute path. This would destroy the current directory concept!
>
> 2. When I hit the RUN button, the function should behave exactly as if it is called by a standard function call. Otherwise such difference would make the RUN button useless for me. The message, that a function is not in the current path, is valuable for me! E.g. it helps to detect an incomplete path definition. Neither changing the current path nor appending the current path to the Matlab PATH automatically would satisfy my expectations!
>
> 3. Running a function (from command line, main program or RUN button), path management and the current directory concept are 3 distinct jobs. Mixing them would reduce the power of the these concepts.
>
> I hope the discussion goes on. Perhaps I miss some points in your ideas.
> Kind regards, Jan

What I understood is that they would like to be able to disable that
dialog that pops up so they don't have to repeatedly push the "change
directory" button.
There should be an option that when you click a button (such as change
directory) in that dialog box, that asks you if you would like to keep
this setting for future reference rather than having to do it each and
every time.
For people like you, you could ignore that option and have the dialog
pop up every time.
For people like Image Analyst and Andre, they could select the option
to hide the dialog box and remember their choice the first time they
selected "change directory".
I would assume that you could re-enable the popup dialog through
matlab preferences (if this is ever implemented), so you can see the
annoying (yet sometimes helpful) dialog pop up once again.

I think each of you have valid points, but they can coexist in this
functionality.

-Nathan