Bug: Emacs mode indentation bug

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug: Emacs mode indentation bug

Aidan Gauland-2
The GNU Smalltalk mode for Emacs doesn't seem to like matching
brackets (and possibly parentheses) to be in different columns.

Example:

Object subclass: Foo [

                aMethod [
                                ^self
                ]

anotherMethod
             ^Try to type colon (':') here, and it prints the
             following error message and refuses to insert a colon.
forward-sexp: Scan error: "Unbalanced parentheses", 49, 41

49 and 41 seem to refer to the brackets around the body of #aMethod.

If I reformat the file like this...

Object subclass: Foo [

                aMethod
                                [
                                                ^self
                                ]

anotherMethod:

...it stops complaining and lets me type a colon.

I know the first way I had it formatted is valid, because I've seen
GNU Smalltalk packages formatted with the brackets in different
columns.

The thing I don't get is how this behaviour even exists, since,
presumably, some of the GST developers use Emacs, so how can I, a
total noob, have encountered this almost right away without any of the
developers noticing it?  I see either two possibilities: 1) My Emacs
installation or configuration is causing the bug to show up, or 2)
smalltalk-mode was not written for the devs, but for users.

Either way, can anyone help me?

Thanks,
Aidan



_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Bug: Emacs mode indentation bug

Aidan Gauland-2
Erm, sorry.  Those examples again without tabs...

Object subclass: Foo [

    aMethod [
        ^self
    ]

                anotherMethod

----------------------------------------

Object subclass: Foo [

    aMethod
        [
            ^self
        ]

        anotherMethod:

You can also see that, even though it lets me type a colon,
#anotherMethod is intented further than #aMethod, when they should,
obviously, be indented the same level.



_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Bug: Emacs mode indentation bug

Mathieu Suen-2
Which version of gst are you using? (git(which one), 3.2.3?)
        Mth




On Dec 25, 2010, at 4:55 AM, Aidan Gauland wrote:

> Erm, sorry.  Those examples again without tabs...
>
> Object subclass: Foo [
>
>    aMethod [
>        ^self
>    ]
>
> anotherMethod
>
> ----------------------------------------
>
> Object subclass: Foo [
>
>    aMethod
>        [
>            ^self
>        ]
>
>        anotherMethod:
>
> You can also see that, even though it lets me type a colon,
> #anotherMethod is intented further than #aMethod, when they should,
> obviously, be indented the same level.
>
>
>
> _______________________________________________
> help-smalltalk mailing list
> [hidden email]
> http://lists.gnu.org/mailman/listinfo/help-smalltalk

__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités
http://mail.yahoo.fr Yahoo! Mail

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Bug: Emacs mode indentation bug

Aidan Gauland-2
On Mon, Dec 27, 2010 at 07:42:14PM +0100, Mathieu Suen wrote:
> Which version of gst are you using? (git(which one), 3.2.3?)
> Mth

GST 3.2.3 on Debian squeeze GNU/Linux (Linux kernel 2.6.32-3-amd64).

--Aidan

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Bug: Emacs mode indentation bug

Paolo Bonzini-2
On Mon, Dec 27, 2010 at 20:05, Aidan Gauland <[hidden email]> wrote:
> On Mon, Dec 27, 2010 at 07:42:14PM +0100, Mathieu Suen wrote:
>> Which version of gst are you using? (git(which one), 3.2.3?)
>>       Mth
>
> GST 3.2.3 on Debian squeeze GNU/Linux (Linux kernel 2.6.32-3-amd64).

I think your changes didn't make it into 3.2.3.  So it is fixed with
your latest .el files?

Paolo

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Bug: Emacs mode indentation bug

Paolo Bonzini-2
In reply to this post by Aidan Gauland-2
On Sat, Dec 25, 2010 at 04:40, Aidan Gauland <[hidden email]> wrote:
> how can I, a
> total noob, have encountered this almost right away without any of the
> developers noticing it?

This happens much more often than you'd think (and not just with
gst!).  That's why new users are as important as "mavens"!

Paolo

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Bug: Emacs mode indentation bug

Mathieu Suen-2
Yeap :) And that is a good way to build good software.
Using the tool we are building is the best way to have it correctly.

Paolo  you can take the latest smalltalk-mode.el file in my git repository:
https://github.com/mathk/smalltalk.

I have revert the fix I have made for Nicolas because that was ugly
and it make things worst then it fix things. I will find an other
way to fix the bug.

Be aware that the latest revision contain also the find-tag function
(it have some bug but work for most of the case, I am fixing it bit by bit).

 
        Mth




On Dec 29, 2010, at 8:40 PM, Paolo Bonzini wrote:

> On Sat, Dec 25, 2010 at 04:40, Aidan Gauland <[hidden email]> wrote:
>> how can I, a
>> total noob, have encountered this almost right away without any of the
>> developers noticing it?
>
> This happens much more often than you'd think (and not just with
> gst!).  That's why new users are as important as "mavens"!
>
> Paolo
>
> _______________________________________________
> help-smalltalk mailing list
> [hidden email]
> http://lists.gnu.org/mailman/listinfo/help-smalltalk

__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités
http://mail.yahoo.fr Yahoo! Mail

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re : [Help-smalltalk] Bug: Emacs mode indentation bug

Mathieu Suen-2


> De : Mathieu Suen <[hidden email]>

>
> Yeap :) And that is a good way to build good software.
> Using the tool we are  building is the best way to have it correctly.
>
> Paolo  you can take  the latest smalltalk-mode.el file in my git repository:
> https://github.com/mathk/smalltalk.
>
> I have revert the fix I have  made for Nicolas because that was ugly
> and it make things worst then it fix  things. I will find an other
> way to fix the bug.

Paolo Bug is fixed you can take the latest version :)

>
> Be aware that the  latest revision contain also the find-tag function
> (it have some bug but  work for most of the case, I am fixing it bit by bit).
>
>
>     Mth
>
>
>
>
> On Dec 29, 2010, at 8:40 PM, Paolo  Bonzini wrote:
>
> > On Sat, Dec 25, 2010 at 04:40, Aidan Gauland <[hidden email]>  
>wrote:
> >> how can I, a
> >> total noob, have encountered this  almost right away without any of the
> >> developers noticing it?
> >
> > This happens much more often than you'd think (and not just  with
> > gst!).  That's why new users are as important as  "mavens"!
> >
> > Paolo
> >
> >  _______________________________________________
> > help-smalltalk mailing  list
> > [hidden email]
> > http://lists.gnu.org/mailman/listinfo/help-smalltalk
>
> _______________________________________________
> help-smalltalk  mailing list
> [hidden email]
> http://lists.gnu.org/mailman/listinfo/help-smalltalk
>




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk