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

Re: Netrw failure with latest Vim

Expand Messages
  • Charles E Campbell
    ... I tried it with the commands you gave above; I m afraid that its still it worked for me . Try :set verbose=20 before you do the :runtime command and see
    Message 1 of 13 , Dec 1, 2012
    • 0 Attachment
      John Little wrote:
      >> John Little wrote:
      >>
      >>> I downloaded netrw 147b from
      >>> http://www.drchip.org/astronaut/vim/index.html#NETRW
      >>> but it didn't work at all, "home/john/" was prepended to every filename, note no leading "/" (yes, my home directory is /home/john).
      > and DrChip replied:
      >
      >> I haven't been able to duplicate this behavior. Any hints? (like netrw
      >> settings, etc?)
      > Does it with vim -u NONE -N, :runtime plugin/netrwPlugin.vim, :E, whether installed to ~/.vim or $VIMRUNTIME. v146 is ok.
      >
      I tried it with the commands you gave above; I'm afraid that its still
      "it worked for me". Try :set verbose=20 before you do the :runtime
      command and see if netrwPlugin.vim actually gets loaded (without running
      into the finish).

      Regards,
      Chip Campbell

      --
      You received this message from the "vim_dev" 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
    • John Little
      I ve just spent a few hours trying to track this down. It was very frustrating as vim s behaviour became unpredictable, though I think I know the cause. Using
      Message 2 of 13 , Dec 2, 2012
      • 0 Attachment
        I've just spent a few hours trying to track this down. It was very frustrating as vim's behaviour became unpredictable, though I think I know the cause. Using :Decho went bananas until I found the comment that explained that DechoTabOn was necessary, but even that was subject to weirdness caused by the autocommands running the code being debugged, which interacted with the problem I was trying to find.

        Anyway, to cut a long story short, in V147b the variable g:netrw_xstrlen is used when it doesn't exist in the function s:Strlen in autoload/netrw.vim, when it is called in s:LocalListing. Maybe there's :silent on the way to that point, but s:Strlen's execution is abandoned; trace statements towards the end (such at the call Dret) are not executed, and the listing code uses a directory length of 0. If g:netrw_xstrlen or g:Align_xstrlen or g:drawit_xstrlen is defined, the problem does not occur. Perhaps Dr Chip you have one of those set.

        I'm not sure, but I think the code that checks the existence of g:netrw_xstrlen should look like

        if !exists("g:netrw_xstrlen")
        if exists("g:Align_xstrlen")
        let g:netrw_xstrlen= g:Align_xstrlen
        else
        if !exists("g:drawit_xstrlen")
        if &enc == "latin1" || !has("multi_byte")
        let g:drawit_xstrlen= 0
        else
        let g:drawit_xstrlen= 1
        endif
        endif
        let g:netrw_xstrlen= g:drawit_xstrlen
        endif
        endif

        Regards, John

        --
        You received this message from the "vim_dev" 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
      • Charles Campbell
        ... Good catch -- I do have one of those set , but the vim -u NONE -N shouldn t have loaded my .vimrc, and so I m mystified as to why I didn t run into the
        Message 3 of 13 , Dec 3, 2012
        • 0 Attachment
          John Little wrote:
          > I've just spent a few hours trying to track this down. It was very frustrating as vim's behaviour became unpredictable, though I think I know the cause. Using :Decho went bananas until I found the comment that explained that DechoTabOn was necessary, but even that was subject to weirdness caused by the autocommands running the code being debugged, which interacted with the problem I was trying to find.
          >
          > Anyway, to cut a long story short, in V147b the variable g:netrw_xstrlen is used when it doesn't exist in the function s:Strlen in autoload/netrw.vim, when it is called in s:LocalListing. Maybe there's :silent on the way to that point, but s:Strlen's execution is abandoned; trace statements towards the end (such at the call Dret) are not executed, and the listing code uses a directory length of 0. If g:netrw_xstrlen or g:Align_xstrlen or g:drawit_xstrlen is defined, the problem does not occur. Perhaps Dr Chip you have one of those set.
          >
          > I'm not sure, but I think the code that checks the existence of g:netrw_xstrlen should look like
          >
          > if !exists("g:netrw_xstrlen")
          > if exists("g:Align_xstrlen")
          > let g:netrw_xstrlen= g:Align_xstrlen
          > else
          > if !exists("g:drawit_xstrlen")
          > if &enc == "latin1" || !has("multi_byte")
          > let g:drawit_xstrlen= 0
          > else
          > let g:drawit_xstrlen= 1
          > endif
          > endif
          > let g:netrw_xstrlen= g:drawit_xstrlen
          > endif
          > endif
          >
          Good catch -- I do have "one of those set", but the vim -u NONE -N
          shouldn't have loaded my .vimrc, and so I'm mystified as to why I didn't
          run into the problem you were having. I've made a related fix for this
          issue. Thanks!

          I'm going to try to work on or find a way to simply duplicate the other
          problem on this thread awhile before I update netrw on my website.

          Regards,
          Chip Campbell

          --
          You received this message from the "vim_dev" 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
        • John Little
          ... I can reproduce it with vim -u NONE -N -c so $VIMRUNTIME/plugin/netrwPlugin.vim ... iiiiiii Maybe your .vim/.netrwhist needs to be set aside. Regards,
          Message 4 of 13 , Dec 3, 2012
          • 0 Attachment
            On Sunday, December 2, 2012 4:31:43 AM UTC+13, DrChip wrote:

            > Unfortunately, I haven't been able to duplicate this loss of buffer with
            > a simpler example as yet.

            I can reproduce it with

            vim -u NONE -N -c 'so $VIMRUNTIME/plugin/netrwPlugin.vim'
            :e .
            iiiiiii

            Maybe your .vim/.netrwhist needs to be set aside.

            Regards, John

            --
            You received this message from the "vim_dev" 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
          • Charles Campbell
            ... Hello, John: I know its been awhile ... but I think I ve got the problem solved. Please try the attached netrw. Regards, C Campbell -- -- You received this
            Message 5 of 13 , Apr 15, 2013
            • 0 Attachment
              John Little wrote:
              > On Sunday, December 2, 2012 4:31:43 AM UTC+13, DrChip wrote:
              >
              >> Unfortunately, I haven't been able to duplicate this loss of buffer with
              >> a simpler example as yet.
              > I can reproduce it with
              >
              > vim -u NONE -N -c 'so $VIMRUNTIME/plugin/netrwPlugin.vim'
              > :e .
              > iiiiiii
              >
              > Maybe your .vim/.netrwhist needs to be set aside.
              >
              > Regards, John
              >
              Hello, John:

              I know its been awhile ... but I think I've got the problem solved.
              Please try the attached netrw.

              Regards,
              C Campbell

              --
              --
              You received this message from the "vim_dev" 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_dev" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            • Charles Campbell
              ... Sorry, listers -- I didn t intend for this message with its attachment to go to the entire list. Regards, C Campbell -- -- You received this message from
              Message 6 of 13 , Apr 15, 2013
              • 0 Attachment
                Charles Campbell wrote:
                > Hello, John:
                >
                > I know its been awhile ... but I think I've got the problem solved.
                > Please try the attached netrw.
                >
                >
                Sorry, listers -- I didn't intend for this message with its attachment
                to go to the entire list.

                Regards,
                C Campbell

                --
                --
                You received this message from the "vim_dev" 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_dev" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+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.