elisp - How to maximize Emacs on Windows at startup? -
This is driving me crazy: I just want MXS to maximize the screen resolution at startup. Ideally I like a cross-platform (Windows and Linux) solution that works on any screen resolution, but I can not even get it to work with hard-coded sizes on window XP.
Here's what I tried:
- Setting the initial frame-ulst with the appropriate height / width
- Default-Frame-Alst Settings <
(w32-send-sys-command 61488)Try to maximize it through sending messages to emacs windows (Windows specific Content) This function that I found somewhere:
(Toggles defun defun) "Toggles that the currently selected frame is full Use a display or a window border "(interactive) (two (f (selected-frame)) (modified frame-parameters F) ((fullscreen., (If (eq zero (frame-parameter f 'fullscreen)) 'Fullboth Nile))))))- To try to eliminate interference with other init things, both the start and end of the init file have the above methods Have tried. Unfortunately, none of the above works !! For some of the above, I can see that my MACAC Windows replaces the original size of a small size correctly for a second partition. And if I run the above methods after initialization, emacs windows correctly resizes what is happening in the world?
P.s. There are other questions but no one in the answer)
Update:
Answer me It seems that my init file is causing some more problems. And in fact it is! After some effort and error, I found the culprit. If I comment on the following line, then everything works perfectly:
(tool bar-mode-1)What is the toolbar doing in the world with maximizing windows?
So the question is now: how can I disable the toolbar (after all, the AMAX toolbar is ugly and takes the precious screen real estate) and maximize windows in my input file? This is probably a bug that interferes with Toolbar windows size?
Explanation: (Tool bar-mode-1) closes the toolbar, but this line interferes with MX maximizing windows. So if I try to maximize windows and work to shut down the toolbar, then the maximum part will fail; If part of the toolbar is commented, then the maximum part will work properly. It does not matter what solution I use (out of 4 I listed).
Solution: (or at least what work is now for me)
This is probably one of the MACS The bug is there. The workaround is to disable the toolbar via the registry, not in .emacs. Save the following as a .reg file and execute that file in Explorer:
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER \ Software \ GNU Emacs] "Emacs.Toolbar" = "- 1"(This solution is another working version of Michael's suggestion).
I found out that it tells you to manipulate the registry to work properly:
Your ~ / .emacs file to start MX Max:
(w32-send-sys-command 61488) If you do not want the Emacs tool bar to include (Tool-Bar-Mode-1) in your ~ / .emacs file [Note: Values can add 0] to the original page but AMACX is completely Iktm will not in this case - the toolbar was occupied by real estate has lost. You need to disable the tool bar in the registry to get it:
[HKEY_LOCAL_MACHINE \ SOFTWARE \ GNU \ Emacs \ Emacs.Toolbar] @ = "0" If you see EmacsWiki below, then you think 61488 is current frame max
Comments
Post a Comment