3

In emacs with ecb running as a minor mode, I would like to set my layout as default. So once emacs starts, I go drag the pane on the left side to change my layout and when I say "Store current window sizes" under "Layout administration" it does correctly write to a file ~/.gnu-emacs-custom. But then when I start emacs again, the default window sizes are back and I have to drag the pane again. However when I do M-x ecb-restore-window-sizes the sizes are set correctly.

So, somehow the default sizes get set. Adding this line at the end of my .emacs file makes it work (run-with-idle-timer 0.2 nil 'ecb-restore-window-sizes) but I don't like it this way, it should be working by default.

Any help would be appreciated.

UPDATE:
I am not very experienced with debugging emacs, but following wvxvw's suggestion below, I found the definition of ecb-restore-window-size and inserted (debug) into it. Then I ran emacs with the --debug-init option and got the following output:
Debugger entered: nil
ecb-restore-window-sizes()
(progn (ecb-restore-window-sizes))
<and a lot of other lines which I believe are statements fired when ecb-restore-window-sizes is referenced>

I think this means that the function runs during init and there are no deaths, right?

Community
  • 1
  • 1
rendekarf
  • 41
  • 4

1 Answers1

1

in your init, try this

(add-hook 'ecb-mode-hook 'ecb-restore-window-sizes)

Andreas Röhler
  • 4,804
  • 14
  • 18
  • sorry about the delay for a feedback. Unfortunately adding `ecb-restore-window-sizes` as a hook as you described above did not work. – rendekarf Nov 23 '12 at 14:47