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

Re: Rgrep not working on vim 64-bit, win7

Expand Messages
  • Ben Fritz
    ... Probably creating the temp file is failing, not reading it. Since this works in 32-bit Vim but not 64-bit Vim, I suspect it s a path problem. Probably it
    Message 1 of 6 , Apr 15, 2013
    • 0 Attachment
      On Monday, April 15, 2013 3:55:14 AM UTC-5, Darek wrote:
      > The problem is when I use a
      >
      > 64-bit build of vim (I need it to have YouCompleteMe running):
      >
      > Error detected while processing function
      >
      > <SNR>61_RunGrepRecursive..<SNR>61_RunGrepCmd:
      >
      > line 1:
      >
      > E484: Can't open file C:\Users\<MyUser>\AppData\Local\Temp\VIo2E04.tmp
      >
      >
      >
      > The temporary file is not there, the location is accessible (since it
      >
      > works for 32-bit version).
      >

      Probably creating the temp file is failing, not reading it. Since this works in 32-bit Vim but not 64-bit Vim, I suspect it's a path problem. Probably it is related to the filesystem redirection/WOW64 feature in Windows. 64-bit applications see a completely different folder for C:\Windows\System32 and some other folders than 32-bit applications, so if your external command depends on anything in these folders it will fail on one but not the other.

      >
      > I have did some debugging and looks like the error appears on the
      >
      > system() call in grep.vim:407, when I copy-n-paste system()'s argument
      >
      > to cmd.exe - it works as expected.
      >

      What command is it?

      --
      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Dariusz Gadomski
      In both cases it s the same 32-bit find/grep binaries set from msys package. The call to execute is something like that: C: msys bin find.exe
      Message 2 of 6 , Apr 15, 2013
      • 0 Attachment
        In both cases it's the same 32-bit find/grep binaries set from msys
        package. The call to execute is something like that:
        C:\msys\bin\find.exe C:\dev\<my-source-dir> -type d ( -name .SVN -o
        -name CVS - ) -prune -o -type f ( -name *.h -o -name *.cpp ) -exec
        C:\msys\bin\grep.exe -s -n -- TODO {} ;

        On Mon, Apr 15, 2013 at 4:49 PM, Ben Fritz <fritzophrenic@...> wrote:
        > On Monday, April 15, 2013 3:55:14 AM UTC-5, Darek wrote:
        >> The problem is when I use a
        >>
        >> 64-bit build of vim (I need it to have YouCompleteMe running):
        >>
        >> Error detected while processing function
        >>
        >> <SNR>61_RunGrepRecursive..<SNR>61_RunGrepCmd:
        >>
        >> line 1:
        >>
        >> E484: Can't open file C:\Users\<MyUser>\AppData\Local\Temp\VIo2E04.tmp
        >>
        >>
        >>
        >> The temporary file is not there, the location is accessible (since it
        >>
        >> works for 32-bit version).
        >>
        >
        > Probably creating the temp file is failing, not reading it. Since this works in 32-bit Vim but not 64-bit Vim, I suspect it's a path problem. Probably it is related to the filesystem redirection/WOW64 feature in Windows. 64-bit applications see a completely different folder for C:\Windows\System32 and some other folders than 32-bit applications, so if your external command depends on anything in these folders it will fail on one but not the other.
        >
        >>
        >> I have did some debugging and looks like the error appears on the
        >>
        >> system() call in grep.vim:407, when I copy-n-paste system()'s argument
        >>
        >> to cmd.exe - it works as expected.
        >>
        >
        > What command is it?
        >
        > --
        > --
        > You received this message from the "vim_use" maillist.
        > Do not top-post! Type your reply below the text you are replying to.
        > For more information, visit http://www.vim.org/maillist.php
        >
        > ---
        > You received this message because you are subscribed to the Google Groups "vim_use" group.
        > To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        > For more options, visit https://groups.google.com/groups/opt_out.
        >
        >

        --
        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php

        ---
        You received this message because you are subscribed to the Google Groups "vim_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Ben Fritz
        ... From the vim_dev thread¹ on this topic, it looks like the problem was with shell quoting in the plugin. I don t know why this would affect 64-bit Vim but
        Message 3 of 6 , Apr 16, 2013
        • 0 Attachment
          On Monday, April 15, 2013 9:49:52 AM UTC-5, Ben Fritz wrote:
          >
          >
          > Probably creating the temp file is failing, not reading it. Since this works in 32-bit Vim but not 64-bit Vim, I suspect it's a path problem. Probably it is related to the filesystem redirection/WOW64 feature in Windows. 64-bit applications see a completely different folder for C:\Windows\System32 and some other folders than 32-bit applications, so if your external command depends on anything in these folders it will fail on one but not the other.
          >

          From the vim_dev thread¹ on this topic, it looks like the problem was with shell quoting in the plugin. I don't know why this would affect 64-bit Vim but not 32-bit but it sounds like the cause is known.

          ¹ https://groups.google.com/d/topic/vim_dev/UaIhGf7-sak/discussion

          --
          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php

          ---
          You received this message because you are subscribed to the Google Groups "vim_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        • Yegappan Lakshmanan
          Hi, ... You have set both the quote and escape characters to single quote ( ). For Unix, the shell escape character should be set to backslash. The plugin sets
          Message 4 of 6 , Jan 14, 2014
          • 0 Attachment
            Hi,

            On Tue, Jan 14, 2014 at 5:17 AM, lazureus <lazureus86@...> wrote:
            > W dniu wtorek, 14 stycznia 2014 11:03:04 UTC+1 użytkownik JohnBeckett napisał:
            >> It looks like the wiki has had the answer since March 2013:
            >>
            >> http://vim.wikia.com/wiki/Script:311
            >>
            >> That is linked in the top line at:
            >>
            >> http://www.vim.org/scripts/script.php?script_id=311
            >>
            >> I have not used the plugin, but what is written at the above
            >>
            >> looks exactly what is needed to fix the error quoted earlier.
            >>
            >> John
            >
            > I found the reason of the problems, the problem was that in my .vimrc I added settings as follows:
            >
            > let Grep_Shell_Quoute_Char = "'"
            > let Grep_Shell_Escape_Char = "'"
            >
            > This was causing that :Rgrep, right now everything is just fine. However I don't
            > understand why it causes problems, maybe you can explain me this?
            >

            You have set both the quote and escape characters to single quote (').
            For Unix, the shell escape character should be set to backslash. The plugin
            sets these variables by default to the correct values. You don't need to change
            this in your .vimrc file.

            - Yegappan

            --
            --
            You received this message from the "vim_use" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php

            ---
            You received this message because you are subscribed to the Google Groups "vim_use" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • lazureus
            ... I see, thanks a lot for your help, I really appreciate it. -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply
            Message 5 of 6 , Jan 14, 2014
            • 0 Attachment
              W dniu wtorek, 14 stycznia 2014 17:17:57 UTC+1 użytkownik yega...@... napisał:
              > Hi,
              >
              >
              >
              > On Tue, Jan 14, 2014 at 5:17 AM, lazureus <lazureus86@...> wrote:
              >
              > > W dniu wtorek, 14 stycznia 2014 11:03:04 UTC+1 użytkownik JohnBeckett napisał:
              >
              > >> It looks like the wiki has had the answer since March 2013:
              >
              > >>
              >
              > >> http://vim.wikia.com/wiki/Script:311
              >
              > >>
              >
              > >> That is linked in the top line at:
              >
              > >>
              >
              > >> http://www.vim.org/scripts/script.php?script_id=311
              >
              > >>
              >
              > >> I have not used the plugin, but what is written at the above
              >
              > >>
              >
              > >> looks exactly what is needed to fix the error quoted earlier.
              >
              > >>
              >
              > >> John
              >
              > >
              >
              > > I found the reason of the problems, the problem was that in my .vimrc I added settings as follows:
              >
              > >
              >
              > > let Grep_Shell_Quoute_Char = "'"
              >
              > > let Grep_Shell_Escape_Char = "'"
              >
              > >
              >
              > > This was causing that :Rgrep, right now everything is just fine. However I don't
              >
              > > understand why it causes problems, maybe you can explain me this?
              >
              > >
              >
              >
              >
              > You have set both the quote and escape characters to single quote (').
              >
              > For Unix, the shell escape character should be set to backslash. The plugin
              >
              > sets these variables by default to the correct values. You don't need to change
              >
              > this in your .vimrc file.
              >
              >
              >
              > - Yegappan

              I see, thanks a lot for your help, I really appreciate it.

              --
              --
              You received this message from the "vim_use" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php

              ---
              You received this message because you are subscribed to the Google Groups "vim_use" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            Your message has been successfully submitted and would be delivered to recipients shortly.