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

:spelldump not working

Expand Messages
  • Dimitar DIMITROV
    Test done with the latest version from Mercurial Hi, ... then ... and all I get is an empty window local is the issue, with a simple :set it all works. I
    Message 1 of 7 , Sep 23, 2013
    • 0 Attachment
      Test done with the latest version from Mercurial

      Hi,

      Here is what I tried:
      :setlocal spelllang=bg spell
      then
      :spelldump
      and all I get is an empty window

      'local' is the issue, with a simple :set it all works.
      I reckon the solution would be to take the settings from the current window and use them in the new results window.

      Regards
       
      Dimitar


      ---
      GPG Key: 2048R/160C6FA8 2012-10-11 Dimitar Dimitrov (kurkale6ka) <mitkofr@...>

      --
      --
      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.
    • Christian Brabandt
      Hi Dimitar! ... This patch fixes it: diff --git a/src/spell.c b/src/spell.c ... +++ b/src/spell.c @@ -15585,6 +15585,8 @@ /* Create a new empty buffer by
      Message 2 of 7 , Sep 23, 2013
      • 0 Attachment
        Hi Dimitar!

        On Mo, 23 Sep 2013, Dimitar DIMITROV wrote:

        > Hi,
        >
        > Here is what I tried:
        > :setlocal spelllang=bg spell
        > then
        > :spelldump
        > and all I get is an empty window
        > 'local' is the issue, with a simple :set it all works.
        > I reckon the solution would be to take the settings from the current window and use them in the new results window.

        This patch fixes it:

        diff --git a/src/spell.c b/src/spell.c
        --- a/src/spell.c
        +++ b/src/spell.c
        @@ -15585,6 +15585,8 @@

        /* Create a new empty buffer by splitting the window. */
        do_cmdline_cmd((char_u *)"new");
        + /* enable spelling */
        + set_option_value((char_u*)"spell", TRUE, (char_u*)"", OPT_LOCAL);
        if (!bufempty() || !buf_valid(curbuf))
        return;


        regards,
        Christian
        --
        Nichts macht die Frauen heutzutage so altern wie die
        Anhänglichkeit ihrer Bewunderer.
        -- Oscar Wilde

        --
        --
        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.
      • Bram Moolenaar
        ... I can reproduce it. -- If VIM were a woman, I d marry her. Slim, organized, helpful and beautiful; what s not to like? --David A. Rogers /// Bram
        Message 3 of 7 , Sep 23, 2013
        • 0 Attachment
          Dimitar Dimitrov wrote:

          > Test done with the latest version from Mercurial
          >
          >
          > Hi,
          >
          > Here is what I tried:
          > :setlocal spelllang=bg spell
          > then
          > :spelldump
          > and all I get is an empty window
          > 'local' is the issue, with a simple :set it all works.
          > I reckon the solution would be to take the settings from the current
          > window and use them in the new results window.

          I can reproduce it.

          --
          If VIM were a woman, I'd marry her. Slim, organized, helpful
          and beautiful; what's not to like? --David A. Rogers

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

          ---
          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.
        • Bram Moolenaar
          ... Looks like this doesn t take care of spelllang when it was set local to the window. -- hundred-and-one symptoms of being an internet addict: 255. You
          Message 4 of 7 , Sep 23, 2013
          • 0 Attachment
            Christian Brabandt wrote:

            > Hi Dimitar!
            >
            > On Mo, 23 Sep 2013, Dimitar DIMITROV wrote:
            >
            > > Hi,
            > >
            > > Here is what I tried:
            > > :setlocal spelllang=bg spell
            > > then
            > > :spelldump
            > > and all I get is an empty window
            > > 'local' is the issue, with a simple :set it all works.
            > > I reckon the solution would be to take the settings from the current window and use them in the new results window.
            >
            > This patch fixes it:
            >
            > diff --git a/src/spell.c b/src/spell.c
            > --- a/src/spell.c
            > +++ b/src/spell.c
            > @@ -15585,6 +15585,8 @@
            >
            > /* Create a new empty buffer by splitting the window. */
            > do_cmdline_cmd((char_u *)"new");
            > + /* enable spelling */
            > + set_option_value((char_u*)"spell", TRUE, (char_u*)"", OPT_LOCAL);
            > if (!bufempty() || !buf_valid(curbuf))
            > return;

            Looks like this doesn't take care of 'spelllang' when it was set local
            to the window.

            --
            hundred-and-one symptoms of being an internet addict:
            255. You work for a newspaper and your editor asks you to write an
            article about Internet addiction...in the "first person."

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

            ---
            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.
          • Christian Brabandt
            ... [...] ... Indeed. Here is an updated patch: diff --git a/src/spell.c b/src/spell.c ... +++ b/src/spell.c @@ -15580,11 +15580,20 @@ ex_spelldump(eap)
            Message 5 of 7 , Sep 23, 2013
            • 0 Attachment
              On Mo, 23 Sep 2013, Bram Moolenaar wrote:

              > Christian Brabandt wrote:
              >
              > > Hi Dimitar!
              > >
              > > On Mo, 23 Sep 2013, Dimitar DIMITROV wrote:
              > >
              > > > Hi,
              > > >
              > > > Here is what I tried:
              > > > :setlocal spelllang=bg spell
              > > > then
              > > > :spelldump
              > > > and all I get is an empty window
              > > > 'local' is the issue, with a simple :set it all works.
              > > > I reckon the solution would be to take the settings from the current window and use them in the new results window.
              > >
              > > This patch fixes it:
              > >
              [...]
              >
              > Looks like this doesn't take care of 'spelllang' when it was set local
              > to the window.

              Indeed. Here is an updated patch:

              diff --git a/src/spell.c b/src/spell.c
              --- a/src/spell.c
              +++ b/src/spell.c
              @@ -15580,11 +15580,20 @@
              ex_spelldump(eap)
              exarg_T *eap;
              {
              + char_u *spl;
              + long dummy;
              +
              if (no_spell_checking(curwin))
              return;

              /* Create a new empty buffer by splitting the window. */
              + get_option_value((char_u*)"spl", &dummy, &spl, OPT_LOCAL);
              do_cmdline_cmd((char_u *)"new");
              +
              + /* enable spelling locally */
              + set_option_value((char_u*)"spell", TRUE, (char_u*)"", OPT_LOCAL);
              + set_option_value((char_u*)"spl", dummy, spl, OPT_LOCAL);
              +
              if (!bufempty() || !buf_valid(curbuf))
              return;


              regards,
              Christian
              --
              Wer keine Liebe fühlt, muss schmeicheln lernen, sonst kommt er
              nicht aus.
              -- Goethe, Maximen und Reflektionen, Nr. 317

              --
              --
              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.
            • Christian Brabandt
              ... Sorry, one more update to free the allocated memory: diff --git a/src/spell.c b/src/spell.c ... +++ b/src/spell.c @@ -15580,11 +15580,21 @@
              Message 6 of 7 , Sep 23, 2013
              • 0 Attachment
                On Mo, 23 Sep 2013, Christian Brabandt wrote:

                > On Mo, 23 Sep 2013, Bram Moolenaar wrote:
                >
                > > Christian Brabandt wrote:
                > >
                > > > Hi Dimitar!
                > > >
                > > > On Mo, 23 Sep 2013, Dimitar DIMITROV wrote:
                > > >
                > > > > Hi,
                > > > >
                > > > > Here is what I tried:
                > > > > :setlocal spelllang=bg spell
                > > > > then
                > > > > :spelldump
                > > > > and all I get is an empty window
                > > > > 'local' is the issue, with a simple :set it all works.
                > > > > I reckon the solution would be to take the settings from the current window and use them in the new results window.
                > > >
                > > > This patch fixes it:
                > > >
                > [...]
                > >
                > > Looks like this doesn't take care of 'spelllang' when it was set local
                > > to the window.
                >
                > Indeed. Here is an updated patch:

                Sorry, one more update to free the allocated memory:

                diff --git a/src/spell.c b/src/spell.c
                --- a/src/spell.c
                +++ b/src/spell.c
                @@ -15580,11 +15580,21 @@
                ex_spelldump(eap)
                exarg_T *eap;
                {
                + char_u *spl;
                + long dummy;
                +
                if (no_spell_checking(curwin))
                return;

                /* Create a new empty buffer by splitting the window. */
                + get_option_value((char_u*)"spl", &dummy, &spl, OPT_LOCAL);
                do_cmdline_cmd((char_u *)"new");
                +
                + /* enable spelling locally */
                + set_option_value((char_u*)"spell", TRUE, (char_u*)"", OPT_LOCAL);
                + set_option_value((char_u*)"spl", dummy, spl, OPT_LOCAL);
                + vim_free(spl);
                +
                if (!bufempty() || !buf_valid(curbuf))
                return;


                Mit freundlichen Grüßen
                Christian
                --
                Jeder Mensch hat seinen individuellen Aberglauben, der ihn bald im
                Scherz, bald im Ernst leitet.
                -- Georg Christoph Lichtenberg, Sudelbücher

                --
                --
                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.
              • Dimitar DIMITROV
                ... Hi Bram, Just wanted to make sure this path hadn t gone unnoticed, Cheers Dimitar Dimitrov -- -- You received this message from the vim_dev maillist. Do
                Message 7 of 7 , Sep 28, 2013
                • 0 Attachment
                  >> On Mo, 23 Sep 2013, Bram Moolenaar wrote:
                  >>
                  >> > Christian Brabandt wrote:
                  >> >
                  >> > > Hi Dimitar!
                  >> > >
                  >> > > On Mo, 23 Sep 2013, Dimitar DIMITROV wrote:
                  >> > >
                  >> > > > Hi,
                  >> > > >
                  >> > > > Here is what I tried:
                  >> > > > :setlocal spelllang=bg spell
                  >> > > > then
                  >> > > > :spelldump
                  >> > > > and all I get is an empty window
                  >> > > > 'local' is the issue, with a simple :set it all works.
                  >> > > > I reckon the solution would be to take the settings from the current window and use them in the new results window.
                  >> > >
                  >> > > This patch
                  fixes it:
                  >> > >
                  >> [...]
                  >> >
                  >> > Looks like this doesn't take care of 'spelllang' when it was set local
                  >> > to the window.
                  >>
                  >> Indeed. Here is an updated patch:
                  >
                  >Sorry, one more update to free the allocated memory:
                  >
                  >diff --git a/src/spell.c b/src/spell.c
                  >--- a/src/spell.c
                  >+++ b/src/spell.c
                  >@@ -15580,11 +15580,21 @@
                  >ex_spelldump(eap)
                  >    exarg_T *eap;
                  >{
                  >+    char_u *spl;
                  >+    long dummy;
                  >+
                  >    if (no_spell_checking(curwin))
                  >        return;
                  >
                  >    /* Create a new empty buffer by splitting the window. */
                  >+    get_option_value((char_u*)"spl", &dummy, &spl, OPT_LOCAL);
                  >    do_cmdline_cmd((char_u
                  *)"new");
                  >+
                  >+    /* enable spelling locally */
                  >+    set_option_value((char_u*)"spell", TRUE, (char_u*)"", OPT_LOCAL);
                  >+    set_option_value((char_u*)"spl",  dummy,        spl, OPT_LOCAL);
                  >+    vim_free(spl);
                  >+
                  >    if (!bufempty() || !buf_valid(curbuf))
                  >        return;
                  >
                  >
                  >Mit freundlichen Grüßen
                  >Christian

                  Hi Bram,

                  Just wanted to make sure this path hadn't gone unnoticed,

                  Cheers

                  Dimitar Dimitrov

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