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

Re: [patch] allow setting of w:quickfix_title via setqflist()/setloclist() functions

Expand Messages
  • Bram Moolenaar
    ... Thanks. -- MORTICIAN: What? CUSTOMER: Nothing -- here s your nine pence. DEAD PERSON: I m not dead! MORTICIAN: Here -- he says he s not dead!
    Message 1 of 24 , May 11, 2013
    • 0 Attachment
      Christian Brabandt wrote:

      > On Mi, 08 Mai 2013, Christian Brabandt wrote:
      >
      > > Updated patch attached. Includes documentation and fixes the issue=20
      > > mentioned so far plus allows setting the w:quickfix_title using=20
      > > setwinvar().
      >
      > Another update, that fixes failure of test10.

      Thanks.


      --
      MORTICIAN: What?
      CUSTOMER: Nothing -- here's your nine pence.
      DEAD PERSON: I'm not dead!
      MORTICIAN: Here -- he says he's not dead!
      CUSTOMER: Yes, he is.
      DEAD PERSON: I'm not!
      The Quest for the Holy Grail (Monty Python)

      /// 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.
    • Daniel Hahler
      ... This patch changes the default title (?) from :setloclist() to setloclist() . I have no simple test case, and have not investigated further, but I ve
      Message 2 of 24 , Feb 14, 2014
      • 0 Attachment
        > Another update, that fixes failure of test10.

        This patch changes the default title (?) from ":setloclist()" to "setloclist()".

        I have no simple test case, and have not investigated further, but I've noticed this, because Syntastic checks for this, before overwriting it (via "call setwinvar(win, 'quickfix_title', ':SyntasticCheck ' . self._name)").

        The check could get changed to make the ":" optional, but I guess it's better to keep the default.

        I think the following hunk might be involved:

        diff --git a/src/quickfix.c b/src/quickfix.c
        --- a/src/quickfix.c
        +++ b/src/quickfix.c
        @@ -914,13 +914,7 @@
        qi->qf_curlist = qi->qf_listcount++;
        vim_memset(&qi->qf_lists[qi->qf_curlist], 0, (size_t)(sizeof(qf_list_T)));
        if (qf_title != NULL)
        - {
        - char_u *p = alloc((int)STRLEN(qf_title) + 2);
        -
        - qi->qf_lists[qi->qf_curlist].qf_title = p;
        - if (p != NULL)
        - sprintf((char *)p, ":%s", (char *)qf_title);
        - }
        + qi->qf_lists[qi->qf_curlist].qf_title = vim_strsave(qf_title);
        }

        /*


        Regards,
        Daniel.

        --
        --
        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
        ... The reason for leaving out the colon was so that it wouldn t confuse the user and will not leave the impression, that there exists a :setloclist ex
        Message 3 of 24 , Feb 15, 2014
        • 0 Attachment
          On Fr, 14 Feb 2014, Daniel Hahler wrote:

          > > Another update, that fixes failure of test10.
          >
          > This patch changes the default title (?) from ":setloclist()" to
          > "setloclist()".

          The reason for leaving out the colon was so that it wouldn't confuse the
          user and will not leave the impression, that there exists a :setloclist
          ex command. But note, that I don't have a strong feeling about it
          anyhow.

          Best,
          Christian
          --
          "Life is too important to take seriously."
          -- Corky Siegel

          --
          --
          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.
        • Daniel Hahler
          ... I have updated the patch to use the old default titles, as mentioned earlier: diff --git a/src/eval.c b/src/eval.c index 2f7da3d..b366223 100644 ... +++
          Message 4 of 24 , Jul 4 3:22 AM
          • 0 Attachment
            Am Samstag, 15. Februar 2014 22:48:15 UTC+1 schrieb Christian Brabandt:
            > On Fr, 14 Feb 2014, Daniel Hahler wrote:
            > > > Another update, that fixes failure of test10.

            > > This patch changes the default title (?) from ":setloclist()" to
            > > "setloclist()".

            > The reason for leaving out the colon was so that it wouldn't confuse the
            > user and will not leave the impression, that there exists a :setloclist
            > ex command. But note, that I don't have a strong feeling about it
            > anyhow.


            I have updated the patch to use the old default titles, as mentioned earlier:

            diff --git a/src/eval.c b/src/eval.c
            index 2f7da3d..b366223 100644
            --- a/src/eval.c
            +++ b/src/eval.c
            @@ -16733,7 +16733,7 @@ set_qf_ll_list(wp, list_arg, action_arg, title_arg, rettv)
            return; /* type error; errmsg already given */
            }
            if (title == NULL)
            - title = (char_u*)(wp == NULL ? "setqflist()" : "setloclist()");
            + title = (char_u*)(wp == NULL ? ":setqflist()" : ":setloclist()");

            if (l != NULL && set_errorlist(wp, l, action, title) == OK)
            rettv->vval.v_number = 0;


            FWIW, I have created a branch (based on a Git mirror) to track this patch:
            https://github.com/blueyed/vim/compare/setqflist_title

            The patch can be seen also by adding ".patch" to the URL:
            https://github.com/blueyed/vim/compare/setqflist_title.patch

            It would be nice to get it applied/included finally.


            Regards,
            Daniel.

            --
            --
            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/d/optout.
          • Daniel Hahler
            I have updated the patch to work with current master/tip: https://github.com/blueyed/vim/compare/setqflist_title_2 The patch can be seen also by adding
            Message 5 of 24 , Aug 14, 2014
            • 0 Attachment
              I have updated the patch to work with current master/tip:

              https://github.com/blueyed/vim/compare/setqflist_title_2

              The patch can be seen also by adding ".patch" to the URL:
              https://github.com/blueyed/vim/compare/setqflist_title_2.patch

              It did not apply cleanly anymore and after fixing the conflict, "test10" was failing: there were two colons instead of one in the quickfix title ("::cf" vs. ":cf").

              This patch is shorter than the previous one, mainly because the handling of ":" gets done in a central place now, and it has been removed from `ex_make` etc.


              Regards,
              Daniel.

              Am Freitag, 4. Juli 2014 12:22:39 UTC+2 schrieb Daniel Hahler:
              > Am Samstag, 15. Februar 2014 22:48:15 UTC+1 schrieb Christian Brabandt:
              > > On Fr, 14 Feb 2014, Daniel Hahler wrote:
              > > > > Another update, that fixes failure of test10.
              >
              > > > This patch changes the default title (?) from ":setloclist()" to
              > > > "setloclist()".
              >
              > > The reason for leaving out the colon was so that it wouldn't confuse the
              > > user and will not leave the impression, that there exists a :setloclist
              > > ex command. But note, that I don't have a strong feeling about it
              > > anyhow.
              >
              >
              > I have updated the patch to use the old default titles, as mentioned earlier:
              >
              > diff --git a/src/eval.c b/src/eval.c
              > index 2f7da3d..b366223 100644
              > --- a/src/eval.c
              > +++ b/src/eval.c
              > @@ -16733,7 +16733,7 @@ set_qf_ll_list(wp, list_arg, action_arg, title_arg, rettv)
              > return; /* type error; errmsg already given */
              > }
              > if (title == NULL)
              > - title = (char_u*)(wp == NULL ? "setqflist()" : "setloclist()");
              > + title = (char_u*)(wp == NULL ? ":setqflist()" : ":setloclist()");
              >
              > if (l != NULL && set_errorlist(wp, l, action, title) == OK)
              > rettv->vval.v_number = 0;
              >
              >
              > FWIW, I have created a branch (based on a Git mirror) to track this patch:
              > https://github.com/blueyed/vim/compare/setqflist_title
              >
              > The patch can be seen also by adding ".patch" to the URL:
              > https://github.com/blueyed/vim/compare/setqflist_title.patch
              >
              > It would be nice to get it applied/included finally.
              >
              >
              > Regards,
              > Daniel.

              --
              --
              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/d/optout.
            • Bram Moolenaar
              ... Thanks for the update. You did fix the failing test, right? -- How To Keep A Healthy Level Of Insanity: 14. Put mosquito netting around your work area.
              Message 6 of 24 , Aug 14, 2014
              • 0 Attachment
                Daniel Hahler wrote:

                > I have updated the patch to work with current master/tip:
                >
                > https://github.com/blueyed/vim/compare/setqflist_title_2
                >
                > The patch can be seen also by adding ".patch" to the URL:
                > https://github.com/blueyed/vim/compare/setqflist_title_2.patch
                >
                > It did not apply cleanly anymore and after fixing the conflict,
                > "test10" was failing: there were two colons instead of one in the
                > quickfix title ("::cf" vs. ":cf").
                >
                > This patch is shorter than the previous one, mainly because the
                > handling of ":" gets done in a central place now, and it has been
                > removed from `ex_make` etc.

                Thanks for the update. You did fix the failing test, right?


                --
                How To Keep A Healthy Level Of Insanity:
                14. Put mosquito netting around your work area. Play a tape of jungle
                sounds all day.

                /// 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/d/optout.
              • Daniel Hahler
                ... Yes, although I did not fix the failing test, but the patch. I would appreciate to get feedback from Christian on this new patch. Regards, Daniel. -- --
                Message 7 of 24 , Aug 17, 2014
                • 0 Attachment
                  Am Donnerstag, 14. August 2014 20:46:23 UTC+2 schrieb Bram Moolenaar:
                  > Daniel Hahler wrote:
                  >
                  > > I have updated the patch to work with current master/tip:
                  > > https://github.com/blueyed/vim/compare/setqflist_title_2
                  >
                  > > The patch can be seen also by adding ".patch" to the URL:
                  > > https://github.com/blueyed/vim/compare/setqflist_title_2.patch
                  >
                  > > It did not apply cleanly anymore and after fixing the conflict,
                  > > "test10" was failing: there were two colons instead of one in the
                  > > quickfix title ("::cf" vs. ":cf").
                  >
                  > > This patch is shorter than the previous one, mainly because the
                  > > handling of ":" gets done in a central place now, and it has been
                  > > removed from `ex_make` etc.

                  > Thanks for the update. You did fix the failing test, right?

                  Yes, although I did not fix the failing test, but the patch.

                  I would appreciate to get feedback from Christian on this new patch.


                  Regards,
                  Daniel.

                  --
                  --
                  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/d/optout.
                • Christian Brabandt
                  ... Looks good for me. Best, Christian -- Alle schaffen hart für Knete, nur nicht Otto, der spielt Lotto. -- -- You received this message from the vim_dev
                  Message 8 of 24 , Aug 17, 2014
                  • 0 Attachment
                    On So, 17 Aug 2014, Daniel Hahler wrote:

                    > Am Donnerstag, 14. August 2014 20:46:23 UTC+2 schrieb Bram Moolenaar:
                    > > Daniel Hahler wrote:
                    > >
                    > > > I have updated the patch to work with current master/tip:
                    > > > https://github.com/blueyed/vim/compare/setqflist_title_2
                    > >
                    > > > The patch can be seen also by adding ".patch" to the URL:
                    > > > https://github.com/blueyed/vim/compare/setqflist_title_2.patch
                    > >
                    > > > It did not apply cleanly anymore and after fixing the conflict,
                    > > > "test10" was failing: there were two colons instead of one in the
                    > > > quickfix title ("::cf" vs. ":cf").
                    > >
                    > > > This patch is shorter than the previous one, mainly because the
                    > > > handling of ":" gets done in a central place now, and it has been
                    > > > removed from `ex_make` etc.
                    >
                    > > Thanks for the update. You did fix the failing test, right?
                    >
                    > Yes, although I did not fix the failing test, but the patch.
                    >
                    > I would appreciate to get feedback from Christian on this new patch.

                    Looks good for me.

                    Best,
                    Christian
                    --
                    Alle schaffen hart für Knete, nur nicht Otto, der spielt Lotto.

                    --
                    --
                    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/d/optout.
                  • Daniel Hahler
                    There was a problem with the previous patch, which should have used the new save_curwin variable. I ve also moved the handling of quickfix_title to the
                    Message 9 of 24 , Oct 14, 2014
                    • 0 Attachment
                      There was a problem with the previous patch, which should have used the new "save_curwin" variable.

                      I've also moved the handling of "quickfix_title" to the bottom of "setwinvar", to also handle cases where "&foo" gets set - I am not sure if that makes sense.

                      I am attaching the refreshed patch again.

                      --
                      --
                      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/d/optout.
                    • Daniel Hahler
                      Another refresh: the previous patch had a wrong `vim_free(v)`, which could cause a segfault. -- -- You received this message from the vim_dev maillist. Do
                      Message 10 of 24 , Oct 15, 2014
                      • 0 Attachment
                        Another refresh: the previous patch had a wrong `vim_free(v)`, which could cause a segfault.

                        --
                        --
                        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/d/optout.
                      • Daniel Hahler
                        @Bram, what do you think about the patch? I have not checked if it still applies (I have it in my local branch), but came across it being missing a few times
                        Message 11 of 24 , May 7
                        • 0 Attachment
                          @Bram,

                          what do you think about the patch?

                          I have not checked if it still applies (I have it in my local branch), but came across it being missing a few times recently.

                          It's very useful, so please consider applying it.


                          Thanks,
                          Daniel.

                          --
                          --
                          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/d/optout.
                        • Bram Moolenaar
                          ... It s in the todo list. -- If you put 7 of the most talented OSS developers in a room for a week and asked them to fix a bug in a spreadsheet program, in 1
                          Message 12 of 24 , May 10
                          • 0 Attachment
                            Daniel Hahler wrote:

                            > @Bram,
                            >
                            > what do you think about the patch?
                            >
                            > I have not checked if it still applies (I have it in my local branch), but came across it being missing a few times recently.
                            >
                            > It's very useful, so please consider applying it.

                            It's in the todo list.

                            --
                            If you put 7 of the most talented OSS developers in a room for a week
                            and asked them to fix a bug in a spreadsheet program, in 1 week
                            you'd have 2 new mail readers and a text-based web browser.

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