On 4/25/07, Nikolai Weibull <[EMAIL PROTECTED]> wrote:

OK, I guess then I don't understand your todo entry and Yakov's need for it.

I should clarify, it is my need, and I have no idea who added the
todo.  I found it while trying to discern if the functionality I
needed was provided already.

The todo entry is

   There is no way to change directory and go back without changing the local
   and/or global directory.  Add a way to find out if the current window uses
   a local directory.  Add cdcmd() that returns ":cd" or ":lcd"?

I guess I'm just confused about how the first two sentences relate.
Ah, the first sentence is simply a statement that really has very
little to do with the actual todo entry.

True.

Either way, wouldn't it be more useful to alter getcwd() to take an
optional argument stating whether we want the local or global cwd?

The problem is that my plugin needs to change the current working
directory, perform an action, and then restore the previous working
directory.  I need to know whether to use :lcd or :cd to do that.  If
I use :cd in a window that had previously used :lcd, then I clobbered
the :lcd usage and that window is now stuck to the global directory;
additionally, the global directory is changed to whatever the prior
value.  If I instead use :lcd always, and the window wasn't previously
using a local directory, it now is.

In either case, I have adversely and unexpectedly altered the environment.

The patch as it stands lets me check to see if the current window has
a local directory, and therefore which version of the change directory
command to use.

Thank you,

bob

Reply via email to