Bug with Emacs mode for Ruby

Discussion in 'Ruby' started by hemant, Oct 23, 2006.

  1. hemant

    hemant Guest

    There seems to be a bug with Emacs mode of Ruby:

    For example:
    I have following three statements and Emacs behaves quite differently
    with each of them

    # this work pretty fine actually
    return 1 if @chunked_data !~ /SESSID/


    # indentation is pretty screwed up actually
    return $& if @chunked_data !~ /SESSID/
    # Emacs thinks this as the beginning of the next statement

    #again indentation of subsequent lines get screwed up
    return "hi" if @chunked_data =~ /(?:SESSID=)(\w+)(?:,|\#\#)/
    # Emacs thinks this as the beginning of the next statement




    --
    There was only one Road; that it was like a great river: its springs
    were at every doorstep, and every path was its tributary.
     
    hemant, Oct 23, 2006
    #1
    1. Advertising

  2. hemant

    Kevin Olemoh Guest

    Could you post a link to a screenshot of the behavior of Emacs on your
    machine? I think I may have experienced something simillar but I am
    not entirely sure.

    On 10/23/06, hemant <> wrote:
    > There seems to be a bug with Emacs mode of Ruby:
    >
    > For example:
    > I have following three statements and Emacs behaves quite differently
    > with each of them
    >
    > # this work pretty fine actually
    > return 1 if @chunked_data !~ /SESSID/
    >
    >
    > # indentation is pretty screwed up actually
    > return $& if @chunked_data !~ /SESSID/
    > # Emacs thinks this as the beginning of the next statement
    >
    > #again indentation of subsequent lines get screwed up
    > return "hi" if @chunked_data =~ /(?:SESSID=)(\w+)(?:,|\#\#)/
    > # Emacs thinks this as the beginning of the next statement
    >
    >
    >
    >
    > --
    > There was only one Road; that it was like a great river: its springs
    > were at every doorstep, and every path was its tributary.
    >
    >
     
    Kevin Olemoh, Oct 24, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Moritz Bunkus
    Replies:
    4
    Views:
    309
    Moritz Bunkus
    Jun 17, 2004
  2. Jeffrey Moss

    eruby mode emacs with mmm-mode

    Jeffrey Moss, Jul 6, 2005, in forum: Ruby
    Replies:
    1
    Views:
    188
    Alan Chen
    Jul 6, 2005
  3. Jonathan Bale

    Emacs Ruby mode bug

    Jonathan Bale, Jul 22, 2010, in forum: Ruby
    Replies:
    1
    Views:
    165
    Ryan Davis
    Jul 22, 2010
  4. PerlFAQ Server
    Replies:
    1
    Views:
    221
    Marc Girod
    Jan 8, 2011
  5. PerlFAQ Server
    Replies:
    0
    Views:
    181
    PerlFAQ Server
    Apr 12, 2011
Loading...

Share This Page