* Can't set font & frame properly in .emacs @ 2008-12-27 15:02 Joe Fineman 2008-12-28 20:06 ` Joe Fineman 0 siblings, 1 reply; 3+ messages in thread From: Joe Fineman @ 2008-12-27 15:02 UTC (permalink / raw) To: help-gnu-emacs I run Emacs under (sigh) Windows XP. Before I upgraded to Emacs 22.3.1, the following near the beginning of my .emacs file always had the right effect: ---------------------------------------------------------------------- ;;;;INITIAL SETUP (setq inhibit-default-init t) (defun minimize-frame () (interactive) (w32-send-sys-command #xf020)) (defun maximize-frame () (interactive) (w32-send-sys-command #xf030)) (defun restore-frame () (interactive) (w32-send-sys-command #xf120)) (defun screen-saver () (interactive) (w32-send-sys-command #xf140)) ;; start Emacs maximized (maximize-frame) ;; Font ;; For a list of available Fonts, eval ;; (insert (prin1-to-string (x-list-fonts "*"))) (set-default-font "-outline-Courier New-normal-r-normal-normal-*-*-96-96-c-*-iso8859-13") ;; Set rows and columns correctly (set-frame-width (selected-frame) 155) ;; This is where height on screen is finally set: (set-frame-height (selected-frame) 63) ;changed from 62 07oc08 ---------------------------------------------------------------------- Now, however, the startup seems to skip it. The defuns are not evaluated (tho I can eval them by hand & they work). The frame does not come up maximized, and the point size is too big. I added the first line in case there was a default-init lurking somewhere. I tried repeating this section at the end of .emacs in case something in between was undoing it. I could find nothing about this aspect initialization using info, and I cannot remember where I got the present code -- probably from some long-departed helpful soul on a newsgroup. What has changed? Thank you for your attention. -- --- Joe Fineman joe_f@verizon.net ||: War propaganda always makes intelligent people sympathize :|| ||: with the enemy. :|| ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can't set font & frame properly in .emacs 2008-12-27 15:02 Can't set font & frame properly in .emacs Joe Fineman @ 2008-12-28 20:06 ` Joe Fineman 2008-12-30 16:21 ` Can't set font & frame properly in .emacs: some answers Joe Fineman 0 siblings, 1 reply; 3+ messages in thread From: Joe Fineman @ 2008-12-28 20:06 UTC (permalink / raw) To: help-gnu-emacs Some further data: Joe Fineman <joe_f@verizon.net> writes: > I run Emacs under (sigh) Windows XP. Before I upgraded to Emacs > 22.3.1, the following near the beginning of my .emacs file always had > the right effect: > > ---------------------------------------------------------------------- > ;;;;INITIAL SETUP > > (setq inhibit-default-init t) > > (defun minimize-frame () > (interactive) > (w32-send-sys-command #xf020)) > > (defun maximize-frame () > (interactive) > (w32-send-sys-command #xf030)) > > (defun restore-frame () > (interactive) > (w32-send-sys-command #xf120)) > > (defun screen-saver () > (interactive) > (w32-send-sys-command #xf140)) > > ;; start Emacs maximized > (maximize-frame) > > ;; Font > ;; For a list of available Fonts, eval > ;; (insert (prin1-to-string (x-list-fonts "*"))) > (set-default-font "-outline-Courier New-normal-r-normal-normal-*-*-96-96-c-*-iso8859-13") > > ;; Set rows and columns correctly > (set-frame-width (selected-frame) 155) > ;; This is where height on screen is finally set: > (set-frame-height (selected-frame) 63) ;changed from 62 07oc08 > ---------------------------------------------------------------------- > > Now, however, the startup seems to skip it. The defuns are not > evaluated (tho I can eval them by hand & they work). This, for some reason, is no longer true. They are in fact evaluated. > The frame does not come up maximized, Nor does it come up in the default size that "restore" restores to, but in a squarish shape, from which it is impossible to maximize it either with the mouse (no button) or with maximize-frame (name recognized & completed under M-x, but has no effect). Using restore-frame makes it smaller, and from that state it is possible to maximize it. Sporadically, tho, restore-frame gives a very tall rectangle, spilling off the bottom of the screen so that the minibuffer is invisible. I have not been able to reproduce this. Also, if I minimize the frame, and bring it back with the mouse, it comes up maximized. > and the point size is too big. I added the first line in case there > was a default-init lurking somewhere. I tried repeating this > section at the end of .emacs in case something in between was > undoing it. I could find nothing about this aspect initialization > using info, and I cannot remember where I got the present code -- > probably from some long-departed helpful soul on a newsgroup. > What has changed? > > Thank you for your attention. -- --- Joe Fineman joe_f@verizon.net ||: In damp heat, learn from the Pygmies. In dry heat, learn :|| ||: from the Arabs. :|| ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can't set font & frame properly in .emacs: some answers 2008-12-28 20:06 ` Joe Fineman @ 2008-12-30 16:21 ` Joe Fineman 0 siblings, 0 replies; 3+ messages in thread From: Joe Fineman @ 2008-12-30 16:21 UTC (permalink / raw) To: help-gnu-emacs Joe Fineman <joe_f@verizon.net> writes: > Some further data: > > Joe Fineman <joe_f@verizon.net> writes: > >> I run Emacs under (sigh) Windows XP. Before I upgraded to Emacs >> 22.3.1, the following near the beginning of my .emacs file always had >> the right effect: >> >> ---------------------------------------------------------------------- >> ;;;;INITIAL SETUP >> >> (setq inhibit-default-init t) >> >> (defun minimize-frame () >> (interactive) >> (w32-send-sys-command #xf020)) >> >> (defun maximize-frame () >> (interactive) >> (w32-send-sys-command #xf030)) >> >> (defun restore-frame () >> (interactive) >> (w32-send-sys-command #xf120)) >> >> (defun screen-saver () >> (interactive) >> (w32-send-sys-command #xf140)) >> >> ;; start Emacs maximized >> (maximize-frame) >> >> ;; Font >> ;; For a list of available Fonts, eval >> ;; (insert (prin1-to-string (x-list-fonts "*"))) >> (set-default-font "-outline-Courier New-normal-r-normal-normal-*-*-96-96-c-*-iso8859-13") >> >> ;; Set rows and columns correctly >> (set-frame-width (selected-frame) 155) >> ;; This is where height on screen is finally set: >> (set-frame-height (selected-frame) 63) ;changed from 62 07oc08 >> ---------------------------------------------------------------------- >> >> Now, however, the startup seems to skip it. The defuns are not >> evaluated (tho I can eval them by hand & they work). > > This, for some reason, is no longer true. They are in fact > evaluated. > >> The frame does not come up maximized, > > Nor does it come up in the default size that "restore" restores to, > but in a squarish shape, from which it is impossible to maximize it > either with the mouse (no button) or with maximize-frame (name > recognized & completed under M-x, but has no effect). Using > restore-frame makes it smaller, and from that state it is possible to > maximize it. > > Sporadically, tho, restore-frame gives a very tall rectangle, spilling > off the bottom of the screen so that the minibuffer is invisible. I > have not been able to reproduce this. > > Also, if I minimize the frame, and bring it back with the mouse, it > comes up maximized. > >> and the point size is too big. I added the first line in case there >> was a default-init lurking somewhere. I tried repeating this >> section at the end of .emacs in case something in between was >> undoing it. I could find nothing about this aspect initialization >> using info, and I cannot remember where I got the present code -- >> probably from some long-departed helpful soul on a newsgroup. > >> What has changed? I still don't know, but have found the following workarounds. The failure to maximize the frame and the failure to adjust the point size appear to be two independent problems. info provides advice on both with respect to Emacs running under X-windows or Mac OS, but not under Windows XP. However, for maximizing the frame the advice provided under X, to add -fs to the command line, turns out to work. For changing the point size, the X advice is not useful, because the notation for fonts is different. However, I have found experimentally that changing the first asterisk to 14 in the font name, and the 13 at the end to 1, viz., (set-default-font "-outline-Courier New-normal-r-normal-normal-14-*-96-96-c-*-iso8859-1") does the job, near enough. Fortunately, a good friend who is a real programmer was at hand to encourage me in the necessary diddling. I hope these results will be useful to others. -- --- Joe Fineman joe_f@verizon.net ||: We are both unbelievers. I just believe in one fewer god :|| ||: than you do. :|| ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-30 16:21 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-12-27 15:02 Can't set font & frame properly in .emacs Joe Fineman 2008-12-28 20:06 ` Joe Fineman 2008-12-30 16:21 ` Can't set font & frame properly in .emacs: some answers Joe Fineman
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.