Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!g19g2000yqo.googlegroups.com!not-for-mail
From: ImageAnalyst <imageanalyst@mailinator.com>
Newsgroups: comp.soft-sys.matlab
Subject: Name of m-file currently being edited (not run)
Date: Fri, 16 Oct 2009 09:07:50 -0700 (PDT)
Organization: http://groups.google.com
Lines: 15
Message-ID: <a07292bf-2896-4c96-9127-5af7788c524f@g19g2000yqo.googlegroups.com>
NNTP-Posting-Host: 192.44.136.113
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1255709270 24129 127.0.0.1 (16 Oct 2009 16:07:50 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 16 Oct 2009 16:07:50 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: g19g2000yqo.googlegroups.com; posting-host=192.44.136.113; 
	posting-account=0rLUzAkAAABojYSRC64DkTbtiSCX77HH
User-Agent: G2/1.0
X-HTTP-Via: 1.1 bdci2px (NetCache NetApp/6.0.7)
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; 
	CyberSafe-IWA-Enable; .NET CLR 1.1.4322; .NET CLR 2.0.50727; MS-RTC LM 8; 
	.NET CLR 3.0.04506.648; .NET CLR 3.5.21022),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:577883


Does anyone know how to detect what the filename of the m-file that
currently has focus in the editor?  (It's not mfilename - that's only
the name of the currently RUNNING file.)  What I would like to do is
to have a shortcut button on my toolbar that changes to the folder
containing this m-file when I click on that shortcut button.  I think
this would be easier than to find the folder in the history drop down
list of 20 different Current Folders, and way easier than having to
browse to the folder via the "..." button.  I could be wrong, but I
bet it's not a standard thing and it will probably have to be a Yair
Altman undocumented hack (http://undocumentedmatlab.com/#)

Currently, if I have 10 different m-files open in the editor and I
click on one, then I need to do the extra step of changing the current
folder to the folder containing that file.  I'd like to simplify that
step.