unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Automatically shrink-wrapping frames to fit their selected window
@ 2004-05-07 22:48 Drew Adams
  2004-05-11 15:57 ` Drew Adams
  0 siblings, 1 reply; 2+ messages in thread
From: Drew Adams @ 2004-05-07 22:48 UTC (permalink / 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: Automatically shrink-wrapping frames to fit their selected window
  2004-05-07 22:48 Automatically shrink-wrapping frames to fit their selected window Drew Adams
@ 2004-05-11 15:57 ` Drew Adams
  0 siblings, 0 replies; 2+ messages in thread
From: Drew Adams @ 2004-05-11 15:57 UTC (permalink / raw)


Resending, since I got no response.

Thanks,

   Drew


-----Original Message-----
From: Drew Adams [mailto:drew.adams@oracle.com]
Sent: Friday, May 07, 2004 3:49 PM
To: emacs-devel@gnu.org
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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-11 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-07 22:48 Automatically shrink-wrapping frames to fit their selected window Drew Adams
2004-05-11 15:57 ` Drew Adams

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).