help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Making windows have same number of columns


From: daniela-spit
Subject: Re: Making windows have same number of columns
Date: Thu, 26 Nov 2020 21:22:28 +0100


> Sent: Thursday, November 26, 2020 at 8:41 PM
> From: "Stephen Berman" <stephen.berman@gmx.net>
> To: daniela-spit@gmx.it
> Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> Subject: Re: Making windows have same number of columns
>
> On Thu, 26 Nov 2020 20:30:46 +0100 daniela-spit@gmx.it wrote:
>
> >> Sent: Thursday, November 26, 2020 at 8:21 PM
> >> From: "Stephen Berman" <stephen.berman@gmx.net>
> >> To: daniela-spit@gmx.it
> >> Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> >> Subject: Re: Making windows have same number of columns
> >>
> >> On Thu, 26 Nov 2020 20:01:24 +0100 daniela-spit@gmx.it wrote:
> >>
> >> >> Sent: Thursday, November 26, 2020 at 7:55 PM
> >> >> From: "Stephen Berman" <stephen.berman@gmx.net>
> >> >> To: daniela-spit@gmx.it
> >> >> Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> >> >> Subject: Re: Making windows have same number of columns
> >> >>
> >> >> On Thu, 26 Nov 2020 19:26:39 +0100 daniela-spit@gmx.it wrote:
> >> >>
> >> >> > Is there a command to make zoom in and out a window to a specific
> >> >> > number of columns?
> >> >>
> >> >> If you mean widen or narrow the selected window, there's
> >> >> enlarge-window-horizontally and shrink-window-horizontally, bound
> >> >> respectively to `C-x }' and `C-x {'.  They both take a numeric prefix
> >> >> argument, so e.g. `C-u 10 C-x }' widens the selected window by 10
> >> >> columns.
> >> >
> >> > I would like that the window stays the same size, but with the size
> >> > of the text in the window to be such that the window displays a specific
> >> > number of columns.
> >>
> >> I'm not aware of any command or function in Emacs that adjusts text size
> >> according to number of columns.  You've mentioned zooming in and out, by
> >> which I assume you mean either `C-x C-+' and `C-x C-' or the
> >> corresponding mouse binding <C-mouse-4> (i.e., holding down the Control
> >> key while scrolling the mouse wheel).  But that command is
> >> text-scale-adjust, which actually changes the height of the font, and
> >> correspondingly the width, but AFAIK you cannot make it adjust the font
> >> size by a specific number of columns.
> >
> > Yes, but when you use the scroll wheel you have no real control, one wheel
> > scroll down could get the text too small.  I would like a way that stops
> > me fidgeting with the controls and lets me do what I want with simply
> > pressing a key sequence.
>
> As noted, you can use the key sequences `C-x C-+' and `C-x C-' instead
> of the mouse scroll wheel.
>
> On Thu, 26 Nov 2020 20:33:32 +0100 daniela-spit@gmx.it wrote:
>
> > No, you can't.  But that not what I am after.  What I need is 
> > text-scale-adjust
> > that gets as close as possible to fitting n characters, 55 say.
>
> You can try customizing text-scale-mode-step to a smaller value, though
> there's not a great deal of leeway, since its default value is 1.2 and
> it has to be >1.0 to have an effect.  You might try 1.1 or even a bit
> less and see if that gives you more control.

Have tried it out and things are a bit better as it does not scale too much.
Once I do the scaling, is there a way to determine now many columns are visible
in a buffer?


> Steve Berman
>
>
>



reply via email to

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