Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Shrinking Windows Horizontally

3 views
Skip to first unread message

Eric James Michael Ritz

unread,
Feb 11, 2010, 4:30:45 PM2/11/10
to help-gn...@gnu.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hello my fellow Emacs users. Is there a command similar to
shrink-window-if-larger-than-buffer which will shrink horizontally
instead of vertically? I often find myself bringing up a window that
I want to shrink horizontally as much as possible—usually a side-bar
with some information about some code I am working on. Does anything
like this already exist in Emacs? Or if not, any tips to point me in
a good direction for writing the command myself?

Thanks in advance for any help!

- --
Eric James Michael Ritz
Cyber Sprocket Labs

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJLdHcEAAoJEEHUZXw5hMWsgCAIAJ7ZgeLOurXZ3urXrLB92TRD
yGMT6yewDv9S/jlvmhgu87xxVh6Glqfjc5oLVHYFE0DXXQgCfCPPUEtMoLSH2J8P
5+PFJ/zgAUC6X734zF3EG2EULtzH+/j3DufOlSDs87vuAiDz6LEVPpesGB1rlB7n
ijorjSX5e42eo7+VO977oeZHi+UgrtT0CMT3k6IRioOfOxTrcT8X98mxS/zSd2yH
YKnmUKjDVj28jOE4eXGl3BLtaUthRQNqZYTwyTIc6/uqtqhnZ0yXNV8Ow2UfAk2W
zLF41cuQ5rkoMaL9hmiPM3iHJl7bynkPCyxxV1JSWTKSISLpfQGE+kBW49HwV/s=
=fRc8
-----END PGP SIGNATURE-----


Drew Adams

unread,
Feb 11, 2010, 5:18:21 PM2/11/10
to Eric James Michael Ritz, help-gn...@gnu.org
> Is there a command similar to shrink-window-if-larger-than-buffer
> which will shrink horizontally instead of vertically?
> I often find myself bringing up a window that
> I want to shrink horizontally as much as possible-usually a side-bar

> with some information about some code I am working on. Does anything
> like this already exist in Emacs? Or if not, any tips to point me in
> a good direction for writing the command myself?

I don't know of anything analogous to `shrink-window-if-larger-than-buffer'.

However, you can use `C-x {' (`shrink-window-horizontally').

To repeat it (to use it incrementally), either bind the command to a repeatable
key or use `C-x { C-x z z z z z'...

You might also be interested in `face-remap+.el'. It recuperates wasted
horizontal whitespace that results from shrinking text, by shrinking the window.
(It can also do the same thing for wasted vertical space.)
http://www.emacswiki.org/emacs/SetFonts#ZoomBuffer

Bastien

unread,
Feb 16, 2010, 10:16:58 AM2/16/10
to Eric James Michael Ritz, help-gn...@gnu.org
Eric James Michael Ritz <Er...@cybersprocket.com> writes:

> Hello my fellow Emacs users. Is there a command similar to


> shrink-window-if-larger-than-buffer which will shrink horizontally
> instead of vertically?

You might find this library useful:

http://lumiere.ens.fr/~guerry/u/windresize.el

It allows you to resize windows interactively.

--
Bastien


Lennart Borgman

unread,
Feb 16, 2010, 11:54:23 AM2/16/10
to Bastien, Eric James Michael Ritz, help-gn...@gnu.org


There is a couple of alternatives here:

http://www.emacswiki.org/emacs/WindowResize#toc3


0 new messages