Sunday, October 30, 2011

Emacs goes Too Far

I like emacs.  I will learn to like the latest release.  Given my thoughts on the source of it all, I should expect some surprise in every release, and so far I've been lucky.  Colour me surprised at the emacs 23.1 which we get with RHEL6 and Centos6.  Its new features and updated lisp parts falls flat on its face the first time I load two files at invocation (or hit'o' in a dired):
It splits the window horizontally.
I don't know who thought that was a great idea, but it's got two problems:  First, it's going to turn off emacs noobs who wonder what the hell happened to their editor and how to make it stop, which is something the anti-emacs crowd has been pushing as a theme the whole time.  The second part, much like the first, is that is makes the editor look like ass and work like crap.  So we're also looking to make it fucking stop.

The popular fix is to tune the criteria for auto-splitting windows out of whack.

--- .emacs~     2011-09-11 16:15:56.000000000 -0700
+++ .emacs      2011-10-30 05:01:43.000000000 -0700
@@ -367,3 +367,7 @@
  '(font-lock-builtin-face ((((type tty) (class color)) (:foreground "light blue" :weight light))))
  '(nxml-attribute-value-face ((t (:inherit nxml-delimited-data-face))))
  '(nxml-delimited-data-face ((((class color) (background light)) (:foreground "LightBlue")))))
+
+;; witty and biting comment about sudden feature changes that look like
+;; broken parts that frighten noobs here.  I probably said Fuck again.
+(setq split-height-threshold 0)
+(setq split-width-threshold nil)

Instead of saying "don't ever split the window horizontally, you whackjob app," we just say "sorry you can't split the window horizontally because our criteria is now impossible to match."  That's the fix.  Now, your fancy old Emacs does exactly what it used to, and you don't have to worry about it looking bad and scaring the officemates back into the 1960s with vi.

I should roll a fix for it on the system level, so that it avoids it for all users of a particular system.  Stay tuned and, if it doesn't appear soon, beat me.

Labels: , , , ,