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

[zipPlugin] Can't open README.ja

Expand Messages
  • Ken Takata
    Hi Charles, After updating Vim to 7.3.919 or later, I can t open *.ja including README.ja (a README file written in Japanese). When I try to open *.ja, I get
    Message 1 of 12 , May 31, 2013
    • 0 Attachment
      Hi Charles,

      After updating Vim to 7.3.919 or later, I can't open *.ja including
      README.ja (a README file written in Japanese).
      When I try to open *.ja, I get the following message:

      ***error*** (zip#Browse) unzip not available on your system

      (I haven't installed unzip command on my Windows system.)
      I'm annoyed by this behavior.

      The file name *.ja is sometime used for Japanese text,
      because "ja" is defined as Japanese language code by ISO 639-1.
      E.g. Ruby's source code: https://github.com/ruby/ruby

      Please consider adding a way to open *.ja as a plain text
      even if unzip isn't available. I think one of the following will do:

      1. Remove "*.ja" from runtime/plugin/zipPlugin.vim.
      2. Add a setting for which file should be handled by zipPlugin.
      3. Open *.ja as a plain text and do not display the error,
      if unzip isn't available.

      Best regards,
      Ken Takata

      --
      --
      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.
    • Dominique Pellé
      ... Another possibility would be to check the magic number at the start of the file. A ZIP file must begin with PK . Dominique -- -- You received this
      Message 2 of 12 , May 31, 2013
      • 0 Attachment
        Ken Takata <kentkt@...> wrote:

        > Hi Charles,
        >
        > After updating Vim to 7.3.919 or later, I can't open *.ja including
        > README.ja (a README file written in Japanese).
        > When I try to open *.ja, I get the following message:
        >
        > ***error*** (zip#Browse) unzip not available on your system
        >
        > (I haven't installed unzip command on my Windows system.)
        > I'm annoyed by this behavior.
        >
        > The file name *.ja is sometime used for Japanese text,
        > because "ja" is defined as Japanese language code by ISO 639-1.
        > E.g. Ruby's source code: https://github.com/ruby/ruby
        >
        > Please consider adding a way to open *.ja as a plain text
        > even if unzip isn't available. I think one of the following will do:
        >
        > 1. Remove "*.ja" from runtime/plugin/zipPlugin.vim.
        > 2. Add a setting for which file should be handled by zipPlugin.
        > 3. Open *.ja as a plain text and do not display the error,
        > if unzip isn't available.

        Another possibility would be to check the magic number
        at the start of the file. A ZIP file must begin with "PK".

        Dominique

        --
        --
        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.
      • Ken Takata
        Hi Charles, ... I wrote a patch for this problem using the method 3. I m not sure this is the best solution. Thanks, Ken Takata -- -- You received this message
        Message 3 of 12 , Jun 6, 2013
        • 0 Attachment
          Hi Charles,

          2013/06/01 Sat 15:25:15 UTC+9 Dominique Pelle wrote:
          > Ken Takata <kentkt@...> wrote:
          >
          > > Hi Charles,
          > >
          > > After updating Vim to 7.3.919 or later, I can't open *.ja including
          > > README.ja (a README file written in Japanese).
          > > When I try to open *.ja, I get the following message:
          > >
          > > ***error*** (zip#Browse) unzip not available on your system
          > >
          > > (I haven't installed unzip command on my Windows system.)
          > > I'm annoyed by this behavior.
          > >
          > > The file name *.ja is sometime used for Japanese text,
          > > because "ja" is defined as Japanese language code by ISO 639-1.
          > > E.g. Ruby's source code: https://github.com/ruby/ruby
          > >
          > > Please consider adding a way to open *.ja as a plain text
          > > even if unzip isn't available. I think one of the following will do:
          > >
          > > 1. Remove "*.ja" from runtime/plugin/zipPlugin.vim.
          > > 2. Add a setting for which file should be handled by zipPlugin.
          > > 3. Open *.ja as a plain text and do not display the error,
          > > if unzip isn't available.
          >
          > Another possibility would be to check the magic number
          > at the start of the file. A ZIP file must begin with "PK".

          I wrote a patch for this problem using the method 3.
          I'm not sure this is the best solution.

          Thanks,
          Ken Takata

          --
          --
          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.
        • Gary Johnson
          ... It s not. The availability of unzip has absolutely nothing to do with the filetype of a .ja file. Dominique s suggestion is the best so far. The test
          Message 4 of 12 , Jun 6, 2013
          • 0 Attachment
            On 2013-06-06, Ken Takata wrote:
            > Hi Charles,
            >
            > 2013/06/01 Sat 15:25:15 UTC+9 Dominique Pelle wrote:
            > > Ken Takata <kentkt@...> wrote:
            > >
            > > > Hi Charles,
            > > >
            > > > After updating Vim to 7.3.919 or later, I can't open *.ja including
            > > > README.ja (a README file written in Japanese).
            > > > When I try to open *.ja, I get the following message:
            > > >
            > > > ***error*** (zip#Browse) unzip not available on your system
            > > >
            > > > (I haven't installed unzip command on my Windows system.)
            > > > I'm annoyed by this behavior.
            > > >
            > > > The file name *.ja is sometime used for Japanese text,
            > > > because "ja" is defined as Japanese language code by ISO 639-1.
            > > > E.g. Ruby's source code: https://github.com/ruby/ruby
            > > >
            > > > Please consider adding a way to open *.ja as a plain text
            > > > even if unzip isn't available. I think one of the following will do:
            > > >
            > > > 1. Remove "*.ja" from runtime/plugin/zipPlugin.vim.
            > > > 2. Add a setting for which file should be handled by zipPlugin.
            > > > 3. Open *.ja as a plain text and do not display the error,
            > > > if unzip isn't available.
            > >
            > > Another possibility would be to check the magic number
            > > at the start of the file. A ZIP file must begin with "PK".
            >
            > I wrote a patch for this problem using the method 3.
            > I'm not sure this is the best solution.

            It's not. The availability of unzip has absolutely nothing to do
            with the filetype of a .ja file.

            Dominique's suggestion is the best so far. The test could be as
            simple as this:

            readfile(filename, "", 1)[0]=~"^PK"

            Regards,
            Gary

            --
            --
            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.
          • Yasuhiro MATSUMOTO
            No. In japanese, many users uses *.ja file extention. And they may start to write the text with leading letter PK . For example, abbreviation of Penalty
            Message 5 of 12 , Jun 6, 2013
            • 0 Attachment
              No.

              In japanese, many users uses *.ja file extention. And they may start
              to write the text with leading letter 'PK'. For example, abbreviation
              of 'Penalty Kick'.
              Please don't use workarround.


              On 6/7/13, Gary Johnson <garyjohn@...> wrote:
              > On 2013-06-06, Ken Takata wrote:
              >> Hi Charles,
              >>
              >> 2013/06/01 Sat 15:25:15 UTC+9 Dominique Pelle wrote:
              >> > Ken Takata <kentkt@...> wrote:
              >> >
              >> > > Hi Charles,
              >> > >
              >> > > After updating Vim to 7.3.919 or later, I can't open *.ja including
              >> > > README.ja (a README file written in Japanese).
              >> > > When I try to open *.ja, I get the following message:
              >> > >
              >> > > ***error*** (zip#Browse) unzip not available on your system
              >> > >
              >> > > (I haven't installed unzip command on my Windows system.)
              >> > > I'm annoyed by this behavior.
              >> > >
              >> > > The file name *.ja is sometime used for Japanese text,
              >> > > because "ja" is defined as Japanese language code by ISO 639-1.
              >> > > E.g. Ruby's source code: https://github.com/ruby/ruby
              >> > >
              >> > > Please consider adding a way to open *.ja as a plain text
              >> > > even if unzip isn't available. I think one of the following will do:
              >> > >
              >> > > 1. Remove "*.ja" from runtime/plugin/zipPlugin.vim.
              >> > > 2. Add a setting for which file should be handled by zipPlugin.
              >> > > 3. Open *.ja as a plain text and do not display the error,
              >> > > if unzip isn't available.
              >> >
              >> > Another possibility would be to check the magic number
              >> > at the start of the file. A ZIP file must begin with "PK".
              >>
              >> I wrote a patch for this problem using the method 3.
              >> I'm not sure this is the best solution.
              >
              > It's not. The availability of unzip has absolutely nothing to do
              > with the filetype of a .ja file.
              >
              > Dominique's suggestion is the best so far. The test could be as
              > simple as this:
              >
              > readfile(filename, "", 1)[0]=~"^PK"
              >
              > Regards,
              > Gary
              >
              > --
              > --
              > 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.
              >
              >
              >


              --
              - Yasuhiro Matsumoto

              --
              --
              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.
            • Gary Johnson
              ... What do you suggest as a solution then? Regards, Gary -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below
              Message 6 of 12 , Jun 6, 2013
              • 0 Attachment
                On 2013-06-07, Yasuhiro MATSUMOTO wrote:
                > No.
                >
                > In japanese, many users uses *.ja file extention. And they may start
                > to write the text with leading letter 'PK'. For example, abbreviation
                > of 'Penalty Kick'.
                > Please don't use workarround.

                What do you suggest as a solution then?

                Regards,
                Gary

                --
                --
                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.
              • mattn
                ... Remove *.ja from the extension list, and add new option to know which the file extensions are zip or not. -- -- You received this message from the
                Message 7 of 12 , Jun 6, 2013
                • 0 Attachment
                  On Friday, June 7, 2013 8:38:02 AM UTC+9, Gary Johnson wrote:
                  > On 2013-06-07, Yasuhiro MATSUMOTO wrote:
                  >
                  > > No.
                  >
                  > >
                  >
                  > > In japanese, many users uses *.ja file extention. And they may start
                  >
                  > > to write the text with leading letter 'PK'. For example, abbreviation
                  >
                  > > of 'Penalty Kick'.
                  >
                  > > Please don't use workarround.
                  >
                  >
                  >
                  > What do you suggest as a solution then?
                  >
                  >
                  >
                  > Regards,
                  >
                  > Gary

                  Remove *.ja from the extension list, and add new option to know which the file extensions are zip or not.

                  --
                  --
                  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.
                • lilydjwg
                  ... What about only opening known file names (e.g. omni.ja) as zip? That one is the only zipped *.ja file I can find, and I don t think there are many others.
                  Message 8 of 12 , Jun 7, 2013
                  • 0 Attachment
                    On Thu, Jun 06, 2013 at 04:38:02PM -0700, Gary Johnson wrote:
                    > On 2013-06-07, Yasuhiro MATSUMOTO wrote:
                    > > No.
                    > >
                    > > In japanese, many users uses *.ja file extention. And they may start
                    > > to write the text with leading letter 'PK'. For example, abbreviation
                    > > of 'Penalty Kick'.
                    > > Please don't use workarround.
                    >
                    > What do you suggest as a solution then?

                    What about only opening known file names (e.g. omni.ja) as zip?

                    That one is the only zipped *.ja file I can find, and I don't think
                    there are many others.

                    --
                    Best regards,
                    lilydjwg

                    Linux Vim Python 我的博客:
                    http://lilydjwg.is-programmer.com/
                    --
                    A: Because it obfuscates the reading.
                    Q: Why is top posting so bad?

                    --
                    --
                    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
                    ... v27a of the zip plugin (http://www.drchip.org/astronaut/vim/index.html#ZIP) incorporates both methods: * checks that the first line of zip files starts
                    Message 9 of 12 , Jun 7, 2013
                    • 0 Attachment
                      mattn wrote:
                      > Remove *.ja from the extension list, and add new option to know which
                      > the file extensions are zip or not.

                      v27a of the zip plugin
                      (http://www.drchip.org/astronaut/vim/index.html#ZIP) incorporates both
                      methods:

                      * checks that the first line of zip files starts with "PK"
                      * sets up a default value for a variable: g:zipPlugin_ext which
                      incorporates all the currently supported synonyms for zip. The user may
                      change that list at his/her whim prior to invocation of the zip plugin.

                      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.
                    • Ken Takata
                      Hi, ... Thank you for updating the zip plugin, but checking PK doesn t work well. When I try to open a file which matches g:zipPlugin_ext but doesn t start
                      Message 10 of 12 , Jun 7, 2013
                      • 0 Attachment
                        Hi,

                        2013/06/08 Sat 0:05:47 UTC+9 Charles Campbell wrote:
                        > mattn wrote:
                        > > Remove *.ja from the extension list, and add new option to know which
                        > > the file extensions are zip or not.
                        >
                        > v27a of the zip plugin
                        > (http://www.drchip.org/astronaut/vim/index.html#ZIP) incorporates both
                        > methods:
                        >
                        > * checks that the first line of zip files starts with "PK"
                        > * sets up a default value for a variable: g:zipPlugin_ext which
                        > incorporates all the currently supported synonyms for zip. The user may
                        > change that list at his/her whim prior to invocation of the zip plugin.

                        Thank you for updating the zip plugin, but checking "PK" doesn't work well.
                        When I try to open a file which matches g:zipPlugin_ext but doesn't start
                        with "PK", an empty buffer is opened. I think the file should be read
                        by the plugin as same as unzip command returns an error.

                        diff --git a/runtime/autoload/zip.vim b/runtime/autoload/zip.vim
                        --- a/runtime/autoload/zip.vim
                        +++ b/runtime/autoload/zip.vim
                        @@ -63,6 +63,12 @@
                        " sanity check: insure that the zipfile has "PK" as its first two letters
                        " (required for proper zip file format)
                        if readfile(a:zipfile, "", 1)[0] !~ '^PK'
                        + keepj sil! %d
                        + let eikeep= &ei
                        + set ei=BufReadCmd,FileReadCmd
                        + exe "keepj r ".fnameescape(a:zipfile)
                        + let &ei= eikeep
                        + keepj 1d
                        " call Dret("zip#Browse : not a zipfile<".a:zipfile.">")
                        return
                        endif

                        Thanks,
                        Ken Takata

                        --
                        --
                        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
                        ... Hello! Please try v27c -- it works for an empty buffer .ja file, too. Available at http;//www.drchip.org/astronaut/vim/index.html#ZIP Regards, C Campbell
                        Message 11 of 12 , Jun 21, 2013
                        • 0 Attachment
                          Ken Takata wrote:
                          > Thank you for updating the zip plugin, but checking "PK" doesn't work well.
                          > When I try to open a file which matches g:zipPlugin_ext but doesn't start
                          > with "PK", an empty buffer is opened. I think the file should be read
                          > by the plugin as same as unzip command returns an error.

                          Hello!

                          Please try v27c -- it works for an empty buffer .ja file, too.
                          Available at http;//www.drchip.org/astronaut/vim/index.html#ZIP

                          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.
                        • Ken Takata
                          Hi, ... Thank you! v27c works fine. Best regards, Ken Takata -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply
                          Message 12 of 12 , Jun 21, 2013
                          • 0 Attachment
                            Hi,

                            2013/06/21 Fri 22:54:48 UTC+9 Charles Campbell wrote:
                            > Hello!
                            >
                            > Please try v27c -- it works for an empty buffer .ja file, too.
                            > Available at http;//www.drchip.org/astronaut/vim/index.html#ZIP

                            Thank you!
                            v27c works fine.

                            Best regards,
                            Ken Takata

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