From: "Drew Adams" <drew.adams@oracle.com>
Subject: Automatically shrink-wrapping frames to fit their selected window
Date: Fri, 7 May 2004 15:48:40 -0700 [thread overview]
Message-ID: <MEEKKIABFKKDFJMPIOEBMEPGCDAA.drew.adams@oracle.com> (raw)
I have some elisp code that does the following:
- Library shrink-fit.el lets you shrink-wrap (enlarge or shrink) a frame on
demand, to fit the content of its selected window (within user-defined
limits).
- Library shrink-fit-all.el provides automatic shrink-wrapping of
one-window frames (one-window-p).
The latter redefines pop-to-buffer, display-buffer, and switch-to-buffer to
call a shrink-wrap function at the end. User variables control whether each
of these low-level functions, separately, should in fact resize frames.
I've updated the code so that it works in Emacs 21 (21.3.50.1
i386-mingw-nt5.1.2600), as well as Emacs 20.
The code and documentation are available here:
- code: http://www.emacswiki.org/elisp/shrink-fit.el,
http://www.emacswiki.org/elisp/shrink-fit-all.el
- doc:
http://www.emacswiki.org/cgi-bin/wiki/OneOnOneEmacs#Shrink-Wrapping_Frames
Please try it out, and consider incorporating it into Emacs at some point. I
believe it would help make Emacs more frame-oriented.
Thanks,
Drew
P.S. I have not tried this code with images or a mixture of font sizes. I
imagine that some tweaking might be necessary to accomodate these (?). The
current resizing code uses set-frame-size. It counts lines and measures
maximum line-width (in characters) to determine the needed frame height
(lines) and width (cols). Suggestions are welcome.
next reply other threads:[~2004-05-07 22:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-07 22:48 Drew Adams [this message]
2004-05-11 15:57 ` Automatically shrink-wrapping frames to fit their selected window 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=MEEKKIABFKKDFJMPIOEBMEPGCDAA.drew.adams@oracle.com \
--to=drew.adams@oracle.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).