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

:help! makes E478

Expand Messages
  • thinca
    Hi list. ... [subject] is omitable. But, :help! makes E478. I think :help! should open help.txt with the same language as the current file. I wrote a
    Message 1 of 3 , Apr 1 3:51 AM
    • 0 Attachment
      Hi list.

      The document of ":help!" says:

      > :h[elp]! [subject] Like ":help", but in non-English help files prefer to
      > find a tag in a file with the same language as the
      > current file. See |help-translated|.

      [subject] is omitable. But, ":help!" makes E478.
      I think ":help!" should open help.txt with the same language as the
      current file.

      I wrote a patch for this.

      ------------------------------------------------------------------------------
      diff -r 2cfb68fa26cd src/ex_cmds.c
      --- a/src/ex_cmds.c Wed Mar 28 20:51:51 2012 +0200
      +++ b/src/ex_cmds.c Sun Apr 01 19:37:13 2012 +0900
      @@ -5546,12 +5546,6 @@
      }
      arg = eap->arg;

      - if (eap->forceit && *arg == NUL)
      - {
      - EMSG(_("E478: Don't panic!"));
      - return;
      - }
      -
      if (eap->skip) /* not executing commands */
      return;
      }
      ------------------------------------------------------------------------------


      Otherwise, the document should be fixed.

      ------------------------------------------------------------------------------
      diff -r 2cfb68fa26cd runtime/doc/helphelp.txt
      --- a/runtime/doc/helphelp.txt Wed Mar 28 20:51:51 2012 +0200
      +++ b/runtime/doc/helphelp.txt Sun Apr 01 19:39:06 2012 +0900
      @@ -92,7 +92,7 @@
      :help so<C-V><CR>only
      < {not in Vi}

      -:h[elp]! [subject] Like ":help", but in non-English help files prefer to
      +:h[elp]! {subject} Like ":help", but in non-English help files prefer to
      find a tag in a file with the same language as the
      current file. See |help-translated|.
      ------------------------------------------------------------------------------


      Furthermore, as another proposal, :help behaves like this only when current
      buffer is a help buffer.

      ------------------------------------------------------------------------------
      diff -r 2cfb68fa26cd src/ex_cmds.c
      --- a/src/ex_cmds.c Wed Mar 28 20:51:51 2012 +0200
      +++ b/src/ex_cmds.c Sun Apr 01 19:41:19 2012 +0900
      @@ -5546,7 +5546,7 @@
      }
      arg = eap->arg;

      - if (eap->forceit && *arg == NUL)
      + if (eap->forceit && *arg == NUL && !curbuf->b_help)
      {
      EMSG(_("E478: Don't panic!"));
      return;
      ------------------------------------------------------------------------------


      Which do you like?

      --
      thinca <thinca@...>

      --
      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
    • Tony Mechelynck
      ... [...] I confirm that :help! gives E478 Don t panic! but only when used with a bang but no argument. I tested it in a help file, in a plain (non-help)
      Message 2 of 3 , Apr 1 4:56 AM
      • 0 Attachment
        On 01/04/12 12:51, thinca wrote:
        > Hi list.
        >
        > The document of ":help!" says:
        >
        >> :h[elp]! [subject] Like ":help", but in non-English help files prefer to
        >> find a tag in a file with the same language as the
        >> current file. See |help-translated|.
        >
        > [subject] is omitable. But, ":help!" makes E478.
        > I think ":help!" should open help.txt with the same language as the
        > current file.
        >
        > I wrote a patch for this.
        [...]

        I confirm that :help! gives "E478 Don't panic!" but only when used with
        a bang but no argument. I tested it in a help file, in a plain
        (non-help) *.txt file, in an HTML file and in my ~/.vimrc, and I get it
        in all four: IOW for me it isn't limited to when viewing help files.

        Using gvim 7.3.487 (Huge) with GTK2/Gnome2 GUI (and, among others,
        +multi_byte +multi_lang).

        FWIW, my :lang is set to en_US.UTF-8 but :lang mess to C, $LC_PAPER and
        $LC_TIME to en_GB, as follows:

        Current language:
        "LC_CTYPE=en_US.UTF-8;LC_NUMERIC=en_US.UTF-8;LC_TIME=en_GB;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=C;LC_PAPER=en_GB;LC_NAME=en_US.UTF-8;LC_ADDRESS=en_US.UTF-8;LC_TELEPHONE=en_US.UTF-8;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=en_US.UTF-8"


        Best regards,
        Tony.
        --
        Any fool can paint a picture, but it takes a wise person to be able to
        sell it.

        --
        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
      • Bram Moolenaar
        ... [...] ... [...] ... The last one should be the best solution. -- They now pass three KNIGHTS impaled to a tree. With their feet off the ground, with one
        Message 3 of 3 , Apr 1 5:27 AM
        • 0 Attachment
          Thinca wrote:

          > The document of ":help!" says:
          >
          > > :h[elp]! [subject] Like ":help", but in non-English help files prefer to
          > > find a tag in a file with the same language as the
          > > current file. See |help-translated|.
          >
          > [subject] is omitable. But, ":help!" makes E478.
          > I think ":help!" should open help.txt with the same language as the
          > current file.
          >
          > I wrote a patch for this.

          [...]

          > Furthermore, as another proposal, :help behaves like this only when current
          > buffer is a help buffer.

          [...]

          > Which do you like?

          The last one should be the best solution.

          --
          They now pass three KNIGHTS impaled to a tree. With their feet off the
          ground, with one lance through the lot of them, they are skewered up
          like a barbecue.
          "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

          /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
          /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
          \\\ an exciting new programming language -- http://www.Zimbu.org ///
          \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

          --
          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
        Your message has been successfully submitted and would be delivered to recipients shortly.