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

Netrw failure with latest Vim

Expand Messages
  • François Ingelrest
    Hi all, I ve updated Vim to 7.3.744 (features=big) and now netrw fails the second time I try to open a file using :Explore 1. Start vim 2. :E and open a file
    Message 1 of 13 , Nov 30, 2012
    • 0 Attachment
      Hi all,

      I've updated Vim to 7.3.744 (features=big) and now netrw fails the
      second time I try to open a file using :Explore

      1. Start vim
      2. :E and open a file
      3. :E fails

      At step 3 I get a blank screen with no listing. This seems to be
      caused by this line in my .vimrc:

      let g:netrw_liststyle=3

      If I comment this line, everything works as expected.

      This is on a Debian Squeeze with netrw v146.

      --
      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
      ... So do I. On Kubuntu 12.10, vim 7.3.742, Huge version with GTK2-GNOME, starting vim with vim -u NONE -N -c let g:netrw_liststyle=3 -c so
      Message 2 of 13 , Nov 30, 2012
      • 0 Attachment
        On Saturday, December 1, 2012 7:42:54 PM UTC+13, François Ingelrest wrote:
        > At step 3 I get a blank screen with no listing.

        So do I.

        On Kubuntu 12.10, vim 7.3.742, Huge version with GTK2-GNOME, starting vim with

        vim -u NONE -N -c 'let g:netrw_liststyle=3' \
        -c 'so $VIMRUNTIME/plugin/netrwPlugin.vim'

        on step 3 I get an empty screen, like that of an empty buffer, tildes down the left. Press i, and the next type of netrw listing is displayed correctly. Cycling through them with i, the tree listing screen is empty and the others ok.

        Attempting to install the latest netrw...

        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
      • John Little
        ... 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,
        Message 3 of 13 , Dec 1, 2012
        • 0 Attachment
          On Saturday, December 1, 2012 8:54:16 PM UTC+13, John Little wrote:
          > Attempting to install the latest netrw...

          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).

          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 E Campbell
          ... I see this problem, too (on a Scientific Linux box). Note the following: 1. start vim 2. :Ex . 3. Pick some file ... You ll see something like 4u# -
          Message 4 of 13 , Dec 1, 2012
          • 0 Attachment
            François Ingelrest wrote:
            > Hi all,
            >
            > I've updated Vim to 7.3.744 (features=big) and now netrw fails the
            > second time I try to open a file using :Explore
            >
            > 1. Start vim
            > 2. :E and open a file
            > 3. :E fails
            >
            > At step 3 I get a blank screen with no listing. This seems to be
            > caused by this line in my .vimrc:
            >
            > let g:netrw_liststyle=3
            >
            > If I comment this line, everything works as expected.
            >
            > This is on a Debian Squeeze with netrw v146.
            >
            I see this problem, too (on a Scientific Linux box).

            Note the following:

            1. start vim

            2. :Ex .

            3. Pick some file
            :ls!

            You'll see something like

            4u# - "NetrwTreeListing 1" line 17

            (the line number is showing the line number of the file you selected in
            the NetrwTreeListing buffer)
            So, the NetrwTreeListing buffer is unlisted, is an alternate buffer (for
            :e #), and the current line number is 17.

            4. :b 4
            The NetrwTreeListing buffer is now empty. This is what is
            happening, essentially, to netrw when it tries to bring up the
            NetrwTreeListing buffer.

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

            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
          • Charles E Campbell
            ... I haven t been able to duplicate this behavior. Any hints? (like netrw settings, etc?) Regards, Chip Campbell -- You received this message from the
            Message 5 of 13 , Dec 1, 2012
            • 0 Attachment
              John Little wrote:
              > On Saturday, December 1, 2012 8:54:16 PM UTC+13, John Little wrote:
              >> Attempting to install the latest netrw...
              > 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).
              >
              I haven't been able to duplicate this behavior. Any hints? (like netrw
              settings, etc?)

              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
            • Charles Cooper
              Confirming problem tied to setting liststyle in vimrc; problem disappears when set line commented. -- You received this message from the vim_dev maillist. Do
              Message 6 of 13 , Dec 1, 2012
              • 0 Attachment
                Confirming problem tied to setting liststyle in vimrc; problem disappears when set line commented.

                --
                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
                ... Does it with vim -u NONE -N, :runtime plugin/netrwPlugin.vim, :E, whether installed to ~/.vim or $VIMRUNTIME. v146 is ok. Regards, John Little -- You
                Message 7 of 13 , Dec 1, 2012
                • 0 Attachment
                  > 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.

                  Regards, John Little

                  --
                  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 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 8 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 9 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 10 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 11 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 12 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 13 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.