Building on Török Gábor's answer, you can use any of a number of packages to store and restore window/frame configurations, many are listed here. The various window layout packages all have their quirks, so you'll have to find which one you like (there are so many packages b/c everyone finds something they don't like about the existing packages and roll their own).
With respect to fonts and colors, some can be customized on a frame-by-frame basis, see the info page for frame parameters.
With respect to how to hook it to the function 'wl
, you can use advice if you want (I love using it), but it might be much more straight-forward to just either customize 'wl
itself, or write a wrapper which does the frame/window configuration loading and then calls 'wl
. Then your invocation might have to change to:
emacs -f wlwrapper
The way your emacsclient is configured (or, for older Emacsen, gnuclient) may be what's causing TG's solution not work. I'd probably use the 'wlwrapper
solution, customizing emacsclient
to re-use an existing frame, then inside 'wlwrapper
modify the 'default-frame-parameters
and then call 'wl
. That way you ensure you create the frame after the parameters are set.
Something like this untested:
(defun wlwrapper ()
"wrapper for 'wl which sets up window/frame configurations"
(let ((default-frame-alist (append
'((width . 82) (height . 36)
(cursor-color . "#ffa200")
(tool-bar-lines . 0)
;; ...
)
default-frame-alist)))
;; if 'wl doesn't create a frame
(select-frame (make-frame))
(wl)
;; now use which ever window saving package you want
))