I'm quite inexperienced in Emacs and Elisp, but I've already made some good shameful things happen.

So I'm able to resize the Calculator App Window Size by setting the calculator-mode window-resize to a different value.

I also know that the calculator app without the calculator-electric-mode set to true the app will split the selected window below with minimum height of 2.

My question is, without changing the calculator.el file how do I set that minimum value to another value or how do I run a function to resize the window every time the calculator starts.

  • I think perhaps you want (setq calc-window-height 20) (or whatever value) in your init file? See also C-h v calc-window-height.
    – phils
    Oct 19, 2023 at 23:10
  • I couldn't tell what you were referring to by "calculator-mode window-resize" though, so I'm not 100% sure.
    – phils
    Oct 19, 2023 at 23:10
  • I can't find that variable. I think I might have generated more confusion here. When I run the calculator app it opens on a new frame but the height is too low for my modeline so I need it to open on a bigger window. I also tried to add an hook for the creation of the buffer but no success. Oct 20, 2023 at 12:57
  • Oh, sorry, you're talking about calculator.el rather than calc.el. The latter is rather more famous, and I jumped to the wrong conclusion.
    – phils
    Oct 20, 2023 at 13:11

1 Answer 1


You could simply enlarge the window by using enlarge-window from the calculator-mode-hook as follows:

(add-hook 'calculator-mode-hook (lambda () (enlarge-window 5)))

of course for the enlarge-window you can use any number you prefer.

  • Yes this hook works correctly. I was not aware of enlarge-window function! Oct 21, 2023 at 15:59
  • Great! FYI, the enlarge-window function I found in the docs here. Oct 21, 2023 at 16:11
  • 1
    Tiago: stackoverflow.com/a/4988206/324105 might be valuable to you, in that case.
    – phils
    Oct 24, 2023 at 23:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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