From: Oleksandr Gavenko <gavenkoa@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: maximizing window for MacOSX
Date: Tue, 28 Feb 2012 21:01:05 +0200 [thread overview]
Message-ID: <8762eqaiku.fsf@desktop.home.int> (raw)
In-Reply-To: CAEjRLuTFt2B0WG9yhyZnyVgRxYM25r5nvkTOu8jeZmFJRw9wmg@mail.gmail.com
On 2012-02-03, ishi soichi wrote:
> I am trying to develop an Emacs Lisp program that maximizes the window.
> I found and modified the following code, which was originally for Carbon
> Emacs.
Personally I use such bunch of code:
(when window-system
(let (
(px (display-pixel-width))
(py (display-pixel-height))
(fx (frame-char-width))
(fy (frame-char-height))
tx ty
)
;; Next formulas discovered empiric on Windows/Linux host
;; with default font (7x13).
(setq tx (- (/ px fx) 7))
(setq ty (- (/ py fy) 4))
(setq initial-frame-alist '((top . 2) (left . 2)))
(add-to-list 'initial-frame-alist (cons 'width tx))
(add-to-list 'initial-frame-alist (cons 'height ty))
) )
It does not fully maximise Emacs but make this close to good solution in
portable way and does not too depended on screen resolution.
--
Best regards!
next prev parent reply other threads:[~2012-02-28 19:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-03 7:50 maximizing window for MacOSX ishi soichi
2012-02-03 10:25 ` Peter Dyballa
2012-02-03 14:49 ` Drew Adams
2012-02-05 8:02 ` ishi soichi
2012-02-28 19:01 ` Oleksandr Gavenko [this message]
2012-02-28 19:25 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8762eqaiku.fsf@desktop.home.int \
--to=gavenkoa@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.