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

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

Expand Messages
  • Srinath
    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
    Message 1 of 6 , Jan 29, 2002
    • 0 Attachment
      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)

      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.

      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.

      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!

      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.

      thanks!

      srinath

      --
      Srinath
      srinath@...
    • Michael Brailsford
      Will it open the file if you do :e . and then select the file in question? -Michael
      Message 2 of 6 , Jan 29, 2002
      • 0 Attachment
        Will it open the file if you do ":e ." and then select the file in
        question?

        -Michael

        On Wed, Jan 30, 2002 at 02:56:44AM +0000, Srinath wrote:
        >
        > 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)
        >
        > 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.
        >
        > 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.
        >
        > 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!
        >
        > 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.
        >
        > thanks!
        >
        > srinath
        >
        > --
        > Srinath
        > srinath@...
      • Srinath Avadhanula
        hello! ... the point is, [asdf] actually doesnt exist in the current directory, only a does. i want to create a new file called [asdf] in the current
        Message 3 of 6 , Jan 29, 2002
        • 0 Attachment
          hello!

          In our last exciting episode, on Wed, 30 Jan 2002, Michael Brailsford said:
          > Will it open the file if you do ":e ." and then select the file in
          > question?
          >
          > -Michael
          >
          the point is, '[asdf]' actually doesnt exist in the current
          directory, only 'a' does. i want to create a new file called '[asdf]' in
          the current directory using the "e " command...

          however, it is a valid question and unfortunately, the answer is *still*
          no. and the reason is clear if you look at explorer.vim, which actually
          just does ":e [asdf]" when you hit return on a file name "[asdf]". so
          this brings up another important point. even if a file called "[asdf]"
          exists in the current directory, only "a" will be opened.

          but as i was saying, the problem for me is really the first case, when i
          want to create a _new_ file called "[asdf]" in the current directory.

          thanks!

          srinath

          --
          Srinath Avadhanula
          Jan 29 11:45pm
          "I thought you were trying to get into shape."
          "I am. The shape I've selected is a triangle."
        • Srinath Avadhanula
          hello all! the problem still remains unsolved, but Michael Brailsford had a few ... should have mentioned this in the original mail. i did try this. and it
          Message 4 of 6 , Jan 30, 2002
          • 0 Attachment
            hello all!

            the problem still remains unsolved, but Michael Brailsford had a few
            suggestions which are i think worth noting:

            > Have you tried using single quotes like ":e '[asdm]'"?
            >
            should have mentioned this in the original mail. i did try this. and it
            opens up a file called "'[asdf]'" (i.e it includes the quotes.)

            > somewhere that you need to escape chars twice for somethings in vim.
            > Maybe this is a similar case. Maybe, ":e "\\\[asdm\\\]" will work.
            >
            you have led me to another wierd behavioural problem!!! this seems to
            *hang* vim! completely. when i try to close it, i get the familiar
            windows message "this program is not responding. blah...". this happens
            consistently.

            > can you open a file called "[asdm]" from the command line?
            >
            this *still* opens up "a".
            i.e the 2 cases
            1. vim '[asdf]'
            2. vim [asdf]
            both open a file called "a". same whether or not isfname contains [,].

            > Also what happens if you try to save a file with ":w [asdm]"?

            this says "error! file exists. use w! to overwrite". again its trying to
            get to "a".

            > Does the same problem occur with ":sp [asdm]" or ":vs [asdm]"?

            same as before. it opens up a file called "a".

            > I wonder if ":exec 'e \[asdm\]'" might work...?
            >
            no. with the exec, i open up simply a. without the exec, i will be
            trying to open a file called C:\[asdm\] because as we discussed before,
            "\" is taken as a path seperator, not an escape character in windows.

            thanks!

            Srinath
          • Walter Briscoe
            In article of Wed, 30 Jan 2002 02:56:44 in , Srinath writes ... I checked this on vim6.0 without
            Message 5 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 6 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.