By default, even if I text-scale-decrease in some frames before I desktop-save-in-desktop-dir, when I restart Emacs and desktop-read, all frames show in the default text-scale.

How can I save the text-scale info for each frame every time I evoke desktop-save-in-desktop-dir command?

1 Answer 1


Variable text-scale-mode-amount is what you want to save. But it is buffer-local. I don't think Desktop restores buffer-local variables, but if it does then it should already be working for you, I would think.

You can of course set the default text-scale value, i.e., for all buffers, to some value in your init file, if you want:

(setq-default text-scale-mode-amount  1) ; Or 2 or whatever.

But that's not the same thing as saving, for each buffer, its last value.

Another approach, since you mentioned frames, is to zoom the frames, not buffers.

You can zoom either frames or buffers using the commands in library zoom-frm.el. You can in fact use the same commands to zoom either a frame or a buffer. You can use mouse buttons (e.g. with a modifier), keyboard keys, or the mouse wheel.

When you zoom a frame the font frame parameter changes to have a larger or smaller size.

Dunno whether Desktop saves all frame parameters. I believe it saves some, at least. If it saves the font parameter (and I think it does) then all of your zoomed frames should be restored at their last zoom levels in your next Emacs session.

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.