I have set up Emacs daemon on Windows 10. My Emacs version is GNU Emacs 25.3.1
I have some code in my
init.el which resizes the frame size automatically when Emacs starts up. The code is
;; Select a desirable font-size, frame position and frame size when Emacs starts up (defun originalPosition () (interactive) (set-frame-font "Courier New-14" t t) (set-frame-position (selected-frame) 100 50) (when window-system (set-frame-size (selected-frame) 82 28)) ) (originalPosition)
This code used to work perfectly when I launched Emacs normally (not as daemon). However, emacsclient does not accept these settings.
Searching around for a solution, I realised that I need to use
after-make-frame-functions . So I added an extra line to my
(add-hook 'after-make-frame-functions (lambda (frame)(when (display-graphic-p frame)(originalPosition))))
After adding this line, every instance of emacsclient has different frame sizes (but uses the correct font size).
How can I get emacsclient to use the correct frame size for every instance?