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

Re: unable to open a file called [asdf] if the current directory contains a file called 'a'.

Expand Messages
  • Walter Briscoe
    In article of Wed, 30 Jan 2002 02:56:44 in , Srinath writes ... I checked this on vim6.0 without
    Message 1 of 6 , Feb 1, 2002
    • 0 Attachment
      In article <20020130025644.648AD3940A9@...> of Wed, 30 Jan 2002
      02:56:44 in , Srinath <srinath@...> writes
      >
      >Hello!
      >
      >Hate to bring up an old topic again, but it was unsolved the last time I
      >asked...
      >
      >The problem (only seems to occur for vim on windows XP and windows 2000,
      >not on unix or previous windows such as winME)
      I checked this on vim6.0 without patches and find the same behaviour on
      windows 2000 - I don't support windows XP yet -, winMe, win98SE and AIX
      4.2.1

      >
      >if the current directory contains a file called "a" (the single letter),
      >then there is *no* way to open a file called "[asdf]" in that directory.
      Do you have a REAL need to do this or are you merely exercising the
      design?

      >
      >To reproduce: on windows XP, open vim and cd to a directory which
      >contains
      >a file called "b". the following solutions do NOT work:
      >
      >1. ":e [asdf]" : opens up "a" instead.
      >
      >2. ":e \[asdf]" : opens up a file called "[asdf]" in the root directory,
      > NOT in the current directory. ofcourse if the root directory contains
      > a
      > file called "a", then that will be opened instead.
      >
      >3. ":e [[]asdf]" : opens a file called "[[]asdf]" not "[asdf]".
      > on windows ME, a poster reported that this does open up "[asdf]".
      >
      >4. ":e c:\full\path\to\[asdf]" : also doesnt work. again opens up "a".
      >
      >whether or not the characters "[" or "]" are present in the 'isfname'
      >option does not make any difference at all to the above attempts.
      isfname is irrelevant here. [asdf] is a meta-expression for any of the
      files: a; s; d; or f.

      >
      >the alarming conclusion seems to be that on winXP(2K), if vim's pwd
      >contains a file called "a", then there is no way at all to open a new
      >file
      >called "[asdf]". i guess i could use some external commands to do this,
      >but
      >it seems vim should provide some easier way to do this!
      What vim does is reasonable and consistent with its specification when
      asked to open a [asdf] in a directory containing a; it may not be
      reasonable in opening a file called [asdf] in a directory containing no
      such file. Both are traditional vi behaviour.

      I think you raise an issue which may be interesting for which there is
      no current solution. I hate to propose a wider interface but suggest
      that a boolean option glob might provide a means to a solution.
      glob=glob would provide the current behaviour and be the default;
      glob=noglob would do as you want.

      If Bram approves this suggestion, I suggest you code it. I imagine this
      is of little interest.
      >
      >i verified this behavior with another person who uses gvim/winXP. if
      >there
      >are others who are in the same situation, it would be great if you
      >reported
      >whether this problem exists or not for you. i admit this is not exactly a
      >problem which would occur in real life, but it would be nice if it were
      >solved nevertheless.
      Aah! Now we come to it! A troll! A veritable troll and I fell for it. :)

      >
      >thanks!
      >
      >srinath
      >

      --
      Walter Briscoe
    • Srinath Avadhanula
      ... I hope this is a joke :) (i see the smiley and am releived). actually this is not exactly completely out of the real world. what happened was that in
      Message 2 of 6 , Feb 1, 2002
      • 0 Attachment
        In our last exciting episode, on Fri, 1 Feb 2002, Walter Briscoe said:
        > >i verified this behavior with another person who uses gvim/winXP. if
        > >there are others who are in the same situation, it would be great if
        > >you reported whether this problem exists or not for you. i admit this
        > >is not exactly a problem which would occur in real life, but it would
        > >be nice if it were solved nevertheless.
        > Aah! Now we come to it! A troll! A veritable troll and I fell for it. :)
        >
        I hope this is a joke :) (i see the smiley and am releived). actually
        this is not exactly completely out of the real world. what happened was
        that in winmanager (a plugin on vim.sf.net), the explorer buffers are
        called '[Buf List]', '[File List]' etc. what happened was that someone
        did have a file called 'l' in the current directory due to which the
        whole plugin crashed mysteriously. (not so mysterious now of course).

        i do admit that since absolutely no one else amongst all the 1000 other
        users gave this error, this is a pretty negligible artifact. its just
        that vim is so nice and stable, that one tends sometimes to get a bit
        nit-picky and less than appropriately grateful :)

        if ever i am able to get down into the code, i will try to implement a
        patch where an option "regexpopen" (for instance) which might
        temporarily toggle regexp like behavior in ":e ", as you suggest. since
        i am absolutely unfamiliar with the code, this will take a whole lot of
        time and will most probably not get accepted anyway.

        thanks!

        srinath

        --
        Srinath Avadhanula
        Feb 1 10:25am
        There are two kinds of solar-heat systems: "passive" systems collect
        the sunlight that hits your home, and "active" systems collect the
        sunlight that hits your neighbors' homes, too.
        -- Dave Barry, "Postpetroleum Guzzler"
      Your message has been successfully submitted and would be delivered to recipients shortly.