emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Automatically shrink-wrapping frames to fit their selected window


From: Drew Adams
Subject: RE: Automatically shrink-wrapping frames to fit their selected window
Date: Tue, 11 May 2004 08:57:10 -0700

Resending, since I got no response.

Thanks,

   Drew


-----Original Message-----
From: Drew Adams [mailto:address@hidden
Sent: Friday, May 07, 2004 3:49 PM
To: address@hidden
Subject: Automatically shrink-wrapping frames to fit their selected window


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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]