# XEmacs Indentation Broken?

**URL:** <https://www.ruby-forum.com/t/xemacs-indentation-broken/52026>\
**Category:** Ruby\
**Created:** [January 10, 2006, 6:58am UTC](https://www.ruby-forum.com/t/xemacs-indentation-broken/52026 "2006-01-10T06:58:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ecc23a/32.png) [@alexg](https://www.ruby-forum.com/u/alexg)\
**Post date:** [January 10, 2006, 6:58am UTC](https://www.ruby-forum.com/t/xemacs-indentation-broken/52026/1 "2006-01-10T06:58:56Z")

</div>

Hi,

Just started working with a new Ubuntu box and something wierd is going  
on with XEmacs ruby support. The automatic indentation (hitting tab on  
the line I want indented or selecting by region) works right up till I  
put in a statement using the =~ operator and a regular expression and  
then it fails for every line afterwards (just using a regular  
expression doesn’t break it nor does something like ‘foo =~ bar’).  
E.g.:

`
class Foo #auto-identation works here
  "OK!"
end
class Bar #And here
  /^(\S+)/
end
class Utterly
  foo =~ /bar/ #but not after this line
end
foo.each do |loop_var|
loop #no autoidentation here
end
`

My XEmacs version is:

XEmacs 21.4 (patch 17) “Jumbo Shrimp” [Lucid] (i386-debian-linux, Mule)  
of Sun Oct 9 2005 on rothera

With ruby-mode-el Revision: 1.74.2.11

It works fine on my OSX laptop which has XEmacs 21.4 (patch 15) and  
ruby-mode revision 1.25.2.11. I tried moving the ruby-mode.el file from  
the laptop to the Ubuntu box but it makes no difference. I was hoping  
to avoid having to downgrade XEmacs itself. Any (X)Emacs gurus out  
there can advise?

Thanks

Alex G.

---

<div class="post-metadata">

**Author:** ![alexg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ecc23a/32.png) [@alexg](https://www.ruby-forum.com/u/alexg)\
**Post date:** [January 10, 2006, 1:10pm UTC](https://www.ruby-forum.com/t/xemacs-indentation-broken/52026/2 "2006-01-10T13:10:04Z")

</div>

“AlexG” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> Just started working with a new Ubuntu box and something wierd is going  
> on with XEmacs ruby support. The automatic indentation (hitting tab on  
> the line I want indented or selecting by region) works right up till I  
> put in a statement using the =~ operator and a regular expression and  
> then it fails for every line afterwards (just using a regular  
> expression doesn’t break it nor does something like ‘foo =~ bar’).

I can’t duplicate this problem on my machine. I am using

XEmacs 21.4 (patch 18) “Social Property” [Lucid]  
(x86\_64-redhat-linux, Mule) of Mon Dec 5 2005 on  
[hammer3.fedora.redhat.com](http://hammer3.fedora.redhat.com)

with ruby-mode 1.25.2.11. Both tab and C-M-\ indented your example.

> It works fine on my OSX laptop which has XEmacs 21.4 (patch 15) and  
> ruby-mode revision 1.25.2.11. I tried moving the ruby-mode.el file from  
> the laptop to the Ubuntu box but it makes no difference. I was hoping  
> to avoid having to downgrade XEmacs itself.

Perhaps an upgrade to 21.4 (patch 18) instead?

Tim

---

<div class="post-metadata">

**Author:** ![alexg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ecc23a/32.png) [@alexg](https://www.ruby-forum.com/u/alexg)\
**Post date:** [January 11, 2006, 1:38am UTC](https://www.ruby-forum.com/t/xemacs-indentation-broken/52026/3 "2006-01-11T01:38:54Z")

</div>

Thanks for checking. It looks like it must be something odd in my  
setup. I’ll investigate further…

---

<div class="post-metadata">

**Author:** ![alexg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ecc23a/32.png) [@alexg](https://www.ruby-forum.com/u/alexg)\
**Post date:** [January 11, 2006, 8:51am UTC](https://www.ruby-forum.com/t/xemacs-indentation-broken/52026/4 "2006-01-11T08:51:51Z")

</div>

On Wed, 2006-01-11 at 09:38 +0900, AlexG wrote:

> Thanks for checking. It looks like it must be something odd in my  
> setup. I’ll investigate further…

No it happens to me too (has for a long while) on numerous boxes and  
versions of Emacs.

I run GNU Emacs 21.4.1 and cvs HEAD. I don’t believe it has anything to  
do with Emacs but with the version of ruby-mode.

I also run Breezy Ubuntu GNU/Linux and the version of the deb containing  
ruby-mode is: ruby1.8-elisp\_1.8.2-9ubuntu1\_all.deb

I will try with other versions of ruby-mode and see if they fix the  
problem.

---

<div class="post-metadata">

**Author:** ![alexg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ecc23a/32.png) [@alexg](https://www.ruby-forum.com/u/alexg)\
**Post date:** [January 11, 2006, 6:19am UTC](https://www.ruby-forum.com/t/xemacs-indentation-broken/52026/5 "2006-01-11T06:19:18Z")

</div>

AlexG wrote:

> Thanks for checking. It looks like it must be something odd in my  
> setup. I’ll investigate further…

Happens, check your init files.

I’m currently in the process of commenting out single lines of those  
between XEmacs restarts to hunt down whatever causes XEmacs open each  
new buffer in silent overwrite mode (nothing shown in that bar thingie  
above the minibuffer). _bangs head against wall to switch sources of  
pain_

David V.
