Loading ...
Sorry, an error occurred while loading the content.

9934Re: mvim on file with path

Expand Messages
  • björn
    Feb 9, 2009
    • 0 Attachment
      2009/2/9 Nico Weber:
      >> > The best fix I can think of is to store the original directory during
      >> > vim startup chdir() back to that in the child process before calling
      >> > exec(). Any better suggestions?
      >> This sounds a bit too hacked together, but the only other solution I
      >> can think of is to fork earlier.
      >> At the moment (as far as I can understand) we only fork after reading
      >> the rc-files because a user may add "f" to 'guioptions'. Now, my
      >> question is: does anybody really _need_ this functionality? If we
      >> crippled this option we could fork right after parsing the command
      >> line arguments and it would fix the above problems and potentially
      >> others (that we do not yet know about) as well. Another side-effect
      >> of this is that we don't have to perform initializations twice which
      >> would cut down on startup times.
      >> I would be much more comfortable with this solution. Comments?
      > Here's what I wrote a year ago on this subject:
      > http://groups.google.com/group/vim_mac/browse_thread/thread/9fcc068f20e82942/b009aced253e89ad
      > In short, forking earlier has its problems too. You probably don't
      > want to do command line flag handling yourself (so that things like "-
      > gf" vs "-fg" and "-f" after "--remote" etc are handled correctly). But
      > vim might already modify the environment when parsing command line
      > flags, so parts of the environment might need to be restored even if
      > forking earlier.
      > To me, this sound like trading one can of worms for another.

      Hmmm...let me be a bit more precise: I suggest forking right after
      command_line_scan(). This way we don't need to parse any command line
      flags ourselves. Isn't this easier than fixing every problem such as
      the one with 'autochdir' each time they pop up?

      What parts of the environment may have changed before that? I had a
      quick look but couldn't see any problems.

      Sure this may be "trading one can of worms for another", but I would
      like to understand the two alternatives better than I do now so that I
      can make up my own mind as to which is the lesser of the two evils.
      Also, it seems we now have new problems (i.e. 'autochdir') that we
      were unaware of when you wrote that other post regarding forking.


      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 21 messages in this topic