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

RE: racket (:mz) SEGV's vim

Expand Messages
  • Tim Brown
    I don t know where the configure part of the earlier patch came from --probably my experimentation on some source I found somewhere :-] The patch I submitted
    Message 1 of 29 , Oct 5, 2011
    • 0 Attachment
      I don't know where the configure part of the earlier patch came from --probably my experimentation on some source I found somewhere :-]

      The patch I submitted was against a Mercurial clone that I made this morning. The last patch submitted is the nescessary and sufficient.

      Tim


      -----Original Message-----
      From: Bram Moolenaar <Bram@...>
      Sent: 05 October 2011 19-31
      To: Tim Brown <tim.brown@...>
      Cc: vim_dev@...
      Subject: Re: racket (:mz) SEGV's vim


      Tim Brown wrote:

      > Please find attached a patch for the following issue:
      >
      > :mzscheme could be invoked before the mzscheme/racket libraries were
      > initialised, e.g. in startup scripts and on the command line.
      >
      > Therefore the following would SEGV:
      > vim +':mz 1'
      >
      > Even though:
      > :mz 1
      > works when editing a file.
      >
      > mzscheme expects to be invoked by a "trampoline" that wraps around the
      > main() of the embedding environment -- and this trampoline is around
      > main_loop().
      >
      > exe_pre_commands() and source_startup_scripts() are outside the scope
      > of the trampoline.
      >
      > This patch causes main() to be called in two parts. The first part
      > sets up vim's environment and globals, but does not execute any vim
      > commands (as far as I can tell). It then calls to mzscheme_init, which
      > eventually recurs into main(); which skips the initialisation, and
      > proceeds with anything that may perform commands.
      >
      > Notes:
      > * I pass fname and params between invocations of main() through the
      > static variables save_mz_fname and save_mz_params. There is
      > justification at the top of main() for doing so. I'm not so keen on
      > statics, myself -- so I've not re-declared fname and params
      > themselves.
      > * The other option would be to split main into two parts -- an
      > "initialisation" and a "commands" part. Then start up vim with:
      > main(argc, argv)
      > calls mzscheme_init(argc, argv, fname, params)
      > calls ... main_part2(argc, argv, fname, params)
      >
      > [or, in the case of !FEAT_MZSCHEME: main(argc,argv) calls
      > main_part2(argc, argv, fname, params)]
      >
      > I think I've done enough in main already! And, unless there is more
      > general merit in such a refactoring, this is as much disruption as I
      > need to cause :-)
      >
      > Thanks Sergey and Bram for your help!

      Thanks for the patch, I'll put it on the todo list.

      Is the configure change that was previously send also needed?

      --
      Don't read everything you believe.

      /// 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 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
    • Sergey Khorev
      ... Cool, I will play with it on the weekend. ... refacator must be an interesting concept ;) -- You received this message from the vim_dev maillist. Do not
      Message 2 of 29 , Oct 5, 2011
      • 0 Attachment
        > Here's the patch in a legible format:

        Cool, I will play with it on the weekend.

        > +     * We trampoline back into main -- to avoid a complete refacator.

        refacator must be an interesting concept ;)

        --
        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
      • Tim Brown
        ... It s all the rage here! -- ... -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying
        Message 3 of 29 , Oct 6, 2011
        • 0 Attachment
          On 6 October 2011 04:13, Sergey Khorev <sergey.khorev@...> wrote:
          > refacator must be an interesting concept ;)

          It's all the rage here!

          --
          | Tim Brown <tim.brown@...> | M:+44(0)7771714159 | H:01372747875 |

          --
          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
        • Tim Brown
          ... Apologies for the top-post, I forgot that my windows phone has that as its habit. I ll take more care next time! -- ... -- You received this message from
          Message 4 of 29 , Oct 6, 2011
          • 0 Attachment
            On 5 October 2011 21:27, Tim Brown <mightyfoo@...> wrote:
            > ...
            > -----Original Message-----
            > From: Bram Moolenaar <Bram@...>
            > Sent: 05 October 2011 19-31
            > To: Tim Brown <tim.brown@...>
            > Cc: vim_dev@...
            > Subject: Re: racket (:mz) SEGV's vim
            > ...

            Apologies for the top-post, I forgot that my windows phone has that as
            its habit. I'll take more care next time!

            --
            | Tim Brown <tim.brown@...> | M:+44(0)7771714159 | H:01372747875 |

            --
            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
          • Tim Brown
            Bram, I ve not seen this patch go into vim yet. Did I miss it? ... Is this still on your todo list? Is there a problem with the patch, or are you waiting on
            Message 5 of 29 , Dec 10, 2011
            • 0 Attachment
              Bram,

              I've not seen this patch go into vim yet.
              Did I miss it?

              On Oct 5, 6:31 pm, Bram Moolenaar <B...@...> wrote:
              > Thanks for the patch, I'll put it on the todo list.

              Is this still on your todo list?
              Is there a problem with the patch,
              or are you waiting on some input from Sergey or me?

              Tim

              --
              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
              ... I think it s this note: Other way to start Mzscheme. Tim Brown, 2011 Oct 5: change main call. Later patch by Sergey Khorev, 2011 Oct 9. I haven t looked at
              Message 6 of 29 , Dec 10, 2011
              • 0 Attachment
                Tim Brown wrote:

                > I've not seen this patch go into vim yet.
                > Did I miss it?
                >
                > On Oct 5, 6:31 pm, Bram Moolenaar <B...@...> wrote:
                > > Thanks for the patch, I'll put it on the todo list.
                >
                > Is this still on your todo list?
                > Is there a problem with the patch,
                > or are you waiting on some input from Sergey or me?

                I think it's this note:

                Other way to start Mzscheme. Tim Brown, 2011 Oct 5: change main call.
                Later patch by Sergey Khorev, 2011 Oct 9.

                I haven't looked at it yet, are you OK with Sergey's patch that he sent
                Oct 9?

                --
                There is a fine line between courage and foolishness.
                Unfortunately, it's not a fence.

                /// 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
              • Tim Brown
                Bram, ... Sorry - took my eye off the ball here. I ve been working fine with this patch applied since October. I d be happy for it to be merged. Tim -- ... --
                Message 7 of 29 , Mar 28, 2012
                • 0 Attachment
                  Bram,

                  On 10 December 2011 20:20, Bram Moolenaar <Bram@...> wrote:
                  I think it's this note:

                  Other way to start Mzscheme. Tim Brown, 2011 Oct 5: change main call.
                  Later patch by Sergey Khorev, 2011 Oct 9.

                  I haven't looked at it yet, are you OK with Sergey's patch that he sent
                  Oct 9?

                  Sorry - took my eye off the ball here.

                  I've been working fine with this patch applied since October. I'd be happy for it to be merged.

                  Tim

                   
                  --
                  | Tim Brown <tim.brown@...> | M:+44(0)7771714159 | H:+44(0)1372747875 |

                  --
                  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
                • Sergey Khorev
                  ... It s in Vim Mercurial repository already :) -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you
                  Message 8 of 29 , Mar 28, 2012
                  • 0 Attachment
                    >> I haven't looked at it yet, are you OK with Sergey's patch that he sent
                    >> Oct 9?
                    >
                    >
                    > Sorry - took my eye off the ball here.
                    >
                    > I've been working fine with this patch applied since October. I'd be happy
                    > for it to be merged.

                    It's in Vim Mercurial repository already :)

                    --
                    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
                    ... If I m not mistaken this was included with patch 7.3.441. So, unless there is something wrong, there nothing more to do. -- Edison s greatest achievement
                    Message 9 of 29 , Mar 28, 2012
                    • 0 Attachment
                      Tim Brown wrote:

                      > On 10 December 2011 20:20, Bram Moolenaar <Bram@...> wrote:
                      >
                      > > I think it's this note:
                      > >
                      > > Other way to start Mzscheme. Tim Brown, 2011 Oct 5: change main call.
                      > > Later patch by Sergey Khorev, 2011 Oct 9.
                      > >
                      > > I haven't looked at it yet, are you OK with Sergey's patch that he sent
                      > > Oct 9?
                      > >
                      >
                      > Sorry - took my eye off the ball here.
                      >
                      > I've been working fine with this patch applied since October. I'd be happy
                      > for it to be merged.

                      If I'm not mistaken this was included with patch 7.3.441. So, unless
                      there is something wrong, there nothing more to do.

                      --
                      Edison's greatest achievement came in 1879, when he invented the
                      electric company. Edison's design was a brilliant adaptation of the
                      simple electrical circuit: the electric company sends electricity
                      through a wire to a customer, then immediately gets the electricity
                      back through another wire

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