Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Emacs, if I split the frame (C-x 2), each window has a status bar. Historically, I could drag the status bar to resize them.

Unfortunately, with Emacs these days and just a few modes (for version control, line/col number, abbrevs, my programming language, etc.), pretty much the entire bar has remapped mouse-1 to something other than letting me drag the bar!

Is there any way to turn the status bar back into something I can drag, without losing all of my modes?

share|improve this question

1 Answer 1

You can still drag on the whitespace between status bar components, for example on the 2 spaces before the buffer name.

You can also resize windows with the keyboard: C-x ^ (enlarge-window), the prefix argument is the number of lines to add.

EDIT:

Each mode line element may have a local-map property which is a keymap that applies when you click on that element. The mouse bindings for the standard mode line elements are defined in bindings.el. You can loop over the various keymaps you find in there; the key to remap is [mode-line mouse-1]. You may have to also deal with modes that add their own components to the mode line.

A mode line element that has a local keymap looks like this: (:propertize ELEMENT ... local-map (keymap ...) ...). You can iterate over mode-line-format and detect and modify all such keymaps. It's more code than I care to write in this answer because elements can be symbols, which you have to follow, and lists, which you have to recurse into if their car is right. Unfortunately for you, when :propertize elements are nested, it looks like the deepest property applies, so you can't just override all local-map propertize by wrapping the whole mode line in a propertize. Again you'll have to deal with modes that add their own components separately.

share|improve this answer
    
Right, and I do use C-x ^, C-x +, etc., but sometimes the mouse is more convenient. And if I'm visiting a version-controlled file from an untrusted mount point, the entire right half of the status bar is un-draggable. I don't want to have to think about where to drag. I just want it to work like Emacs 19 did. :-) –  Ken Aug 11 '10 at 20:28
    
@Ken: Emacs being Emacs, there is a way to do it. Unfortunately I don't see an easy way to do it. –  Gilles Aug 11 '10 at 21:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.