I have such a function hooked into ediff. Rather than just doubling
the width, however, I check the current display resolution and resize
the emacs window to fill a percentage of that screen, width and height.
It comes in quite handy for ediff (I always split the windows to be
I can post the code again if anyone's interested.
> This sounds like a good ediff-mode-hook to write:
> If the desktop is at least 160 columns wide, then do a
> side-by-side ediff.
> Else, perform the default.
> I've been busy with EMacro, which has a
> desktop-height-approx() defun, which should be easy to
> adapt; I'll have to see, when I can get around to this.
> The rest calls for User Opinions:
> I'd be satisfied with side-by-side comparisons, with as
> few as 140 columns, which means most GUI desktops.
> How about you?
> Does it make sense to temporarily enable horizontal scrollbars
> for the lifetime of the compare?
> I'm not sure, how one writes code, which detects that an ediff
> session has closed, to return horizontal scrollbars to their
> previous or default state (likely off)?
> Perhaps this ediff-mode-hook is as simple as defaulting to
> the horizontal compare Customize option, when run in a
> windowing system, and expanding up to 163 columns, or the width
> of the desktop, whichever is smaller?
Chris McMahan | cmcmahan-AT-one.net