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

:preserve and :previous don't work anymore (was: almost-2.2_1)

Expand Messages
  • Georg Neis
    ... [...] -/*p */{ print , [...] -/*pre */{ previous , [...] +/*nu */{ number , [...] +/*o */{ open , [...] +/*on */{ only , [...] +/*p
    Message 1 of 6 , Apr 2, 2004
      * Steve Kirkendall <skirkendall@...> wrote:
      > :suspend didn't work
      > It wasn't in Elvis' internal command list correctly. The :stop
      > equivalent has always worked though.

      [...]
      -/*p */{"print", [...]
      -/*pre */{"previous", [...]
      +/*nu */{"number", [...]
      +/*o */{"open", [...]
      +/*on */{"only", [...]
      +/*p */{"print", [...]
      +/*ph */{"phelp", [...]
      +/*pre */{"previous", [...]
      /*pres*/{"preserve", [...]
      [...]

      These changes broke the :previous and :preserve commands.

      Gruß, Georg
    • Georg Neis
      The :help command no longer knows the :s command, i.e. :h :s will list groups of all ex commands rather than take you to the specific command
      Message 2 of 6 , Apr 5, 2004
        The :help command no longer knows the :s command, i.e. ":h :s"
        "will list groups of all ex commands" rather than take you to the
        specific command documentation.

        Gruß, Georg
      • Georg Neis
        ... I discovered that modelines don t work in almost-2.2_1. Maybe that s caused by the quoted changes. I could trace it back to the following difference
        Message 3 of 6 , Apr 6, 2004
          * Steve Kirkendall <skirkendall@...> wrote:
          > :eval does not compute
          > The :eval command could get confused if the command that it runs
          > needs to evaluate an expression. This was because a static
          > buffer is used to return the results of evaluations, and :eval
          > didn't copy the result into a local buffer before trying to
          > execute it.

          I discovered that modelines don't work in almost-2.2_1. Maybe that's
          caused by the quoted changes.

          I could trace it back to the following difference between 2.2_0 and
          2.2_1. Assume that we have a file that consists of the line
          "ex:foo:" (without the quotation marks).

          2.2_0:
          ":eval s/\V[ev][xi]:\\\(.*\\\):/\1/" successfully changes the line
          into "foo".

          2.2_1:
          ":eval s/\V[ev][xi]:\\\(.*\\\):/\1/" fails, whereas
          ":eval s/\V[ev][xi]:\\(.*\\):/\1/" works.

          Gruß, Georg
        • Georg Neis
          $ pwd /home/georg/src/elvis-2.2_1 $ cat ~/.elvisrc au BufReadPost * try 1,15g/^Subject: /s/ (was: . +)$// $ ELVISPATH=data:doc:~/.elvis gdb ./elvis GNU gdb
          Message 4 of 6 , Apr 7, 2004
            $ pwd
            /home/georg/src/elvis-2.2_1
            $ cat ~/.elvisrc
            au BufReadPost * try 1,15g/^Subject: /s/ (was: .\+)$//
            $ ELVISPATH=data:doc:~/.elvis gdb ./elvis
            GNU gdb 2002-04-01-cvs
            [...]
            This GDB was configured as "i386-linux"...
            (gdb) set width 70
            (gdb) run ~/foo
            Starting program: /home/georg/src/elvis-2.2_1/elvis ~/foo
            skipping 4 old session files
            reading /home/georg/foo

            Program received signal SIGSEGV, Segmentation fault.
            0x0807e820 in ex_global (xinf=0xbffff164) at exedit.c:91
            91 if (xinf->window->state->acton)
            (gdb) break ex_global
            Breakpoint 1 at 0x807e7f8: file exedit.c, line 78.
            (gdb) run ~/foo
            The program being debugged has been started already.
            Start it from the beginning? (y or n) y

            Starting program: /home/georg/src/elvis-2.2_1/elvis ~/foo
            skipping 5 old session files
            reading /home/georg/foo

            Breakpoint 1, ex_global (xinf=0xbffff164) at exedit.c:78
            78 if (!xinf->rhs)
            (gdb) s
            82 if (xinf->bang)
            (gdb) s
            91 if (xinf->window->state->acton)
            (gdb) s

            Program received signal SIGSEGV, Segmentation fault.
            0x0807e820 in ex_global (xinf=0xbffff164) at exedit.c:91
            91 if (xinf->window->state->acton)
            (gdb) bt
            #0 0x0807e820 in ex_global (xinf=0xbffff164) at exedit.c:91
            #1 0x08077550 in execute (xinf=0xbffff164) at ex.c:2787
            #2 0x08077c22 in exstring (win=0x0,
            str=0x80da6b0 "1,15g/^Subject: /s/ (was: .\\+)$//\n", name=0x0)
            at ex.c:3097
            #3 0x0807cd86 in ex_then (xinf=0xbffff3b4) at exconfig.c:1452
            #4 0x08077550 in execute (xinf=0xbffff3b4) at ex.c:2787
            #5 0x08077c22 in exstring (win=0x0,
            str=0x80dc0b8 "try 1,15g/^Subject: /s/ (was: .\\+)$//\n",
            name=0x0) at ex.c:3097
            #6 0x0806d4f7 in auperform (win=0x0, bang=ElvFalse, groupname=0x0,
            event=176, filename=0x0) at autocmd.c:973
            #7 0x08053e9f in bufload (bufname=0x0,
            filename=0x80de290 "/home/georg/foo", reload=ElvTrue)
            at buffer.c:1907
            #8 0x0804c3cb in startfirst () at main.c:695
            #9 0x0804c6d6 in init (argc=2, argv=0xbffff684) at main.c:846
            #10 0x0804c798 in main (argc=2, argv=0xbffff684) at main.c:920


            The file "foo" is an email. But here's a simpler file that causes
            Elvis to crash:

            $ cat empty
            foo
            foo
            foo
            foo
            foo
            foo
            foo
            foo
            foo
            foo
            foo
            foo
            foo
            foo
            foo
            $ wc -l <empty
            15

            When I remove one line, Elvis won't segfault.

            Gruß, Georg
          Your message has been successfully submitted and would be delivered to recipients shortly.