[Top][All Lists]

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

bug#14233: 24.3; Don't constrain frame size to character multiples

From: Drew Adams
Subject: bug#14233: 24.3; Don't constrain frame size to character multiples
Date: Mon, 29 Apr 2013 13:41:31 -0700

>  > Maybe the logic behind that coupling could be made more 
>  > explicit in the doc?  Or maybe that "enhancement" should
>  > be reverted?
> Did you find out when that enhancement was made?

I think we're talking about this behavior:

 Also, if FRAME is non-nil, alter the user's Customization
 settings as though the font-related attributes of the
 `default' face had been \"set in this session\", so that
 the font is applied to future frames.

Emacs 24.1 added this, AFAICT.  It added optional 3rd arg FRAMES for

But see my earlier msg where I mention that I do not in fact see the
future-changing behavior that is advertised for new frames.  Do you see it?

(Wrt the optional 2nd arg KEEP-SIZE, it was Emacs 22 that added that.)

>  > Why do you suppose that there is an optional parameter 
>  > KEEP-SIZE for `set-frame-font'?
> ... because on 2003-04-09 Ehud Karni added it ...
>  > And why do you suppose it is optional (i.e., the default
>  > behavior does NOT keep the same size)?
> ... because that's how it behaved on the first day.
>  > And now you propose to, in effect, impose KEEP-SIZE 
>  > behavior everywhere, and not even provide a no-keep-size
>  > optional behavior (i.e., traditional Emacs behavior)?
> I did so and still think it's the correct answer in an 
> environment that has to cater for fullscreen and maximized
> frames as well as for tiling window managers.  I don't think
> that zooming the font size in any of these modes should
> change the frame size.

Use `set-frame-font' with non-nil KEEP-SIZE if you do not want the frame to zoom
along with its text and you want to change how much text is visible in the same
frame.  That's what KEEP-SIZE is for.

>  >> Changing the appearance of scrollbars, fringes and sizes or the
>  >> appearance of future frames should be done on top of that,
>  >
>  > You are mixing a lot of things in there.
> Not me.  When you change the font size these are the things Emacs
> changes along with it.

The scrollbars and the fringe are not changed when the frame font size is
changed.  Not on MS Windows, at least.  Prior to Emacs 22, the scrollbars (but
not fringe) were zoomed along with the text.

The big thing that doesn't belong mixed in with the others is changing the
appearance of future frames.  Changing a frame parameter in one frame should not
affect future frames.

>  > Why should `modify-frame-parameters', applied to a single 
>  > frame, affect future frames at all?
> Maybe because when it creates a new frame Emacs has it inherit
> certain things from the selected one?

Certain things are inherited from the selected frame.
But you want to change which things are inherited.

And now you bring in "the selected one".  In the proposal, IIUC, ALL future
frames would have their font size changed, not just those frames created when
the altered frame happens to be selected.

>  > That mistake was already introduced into `set-frame-font' 
>  > (in Emacs 22, I believe).  Such future-changing has no
>  > business being coupled into the behavior of the basic
>  > function for changing a frame's parameters.
> As I said above, that function was probably supposed to set 
> the default value.  In any case, I'm confident/afraid that
> people had good reasons for applying such a change.

I consider it a mistake.  But I'm not trying to fix/change `set-frame-font'
here.  And as I said, I do NOT even SEE the (misguided) future-changing behavior
that its doc claims for it.

My concern is to keep `modify-frame-parameters' doing the right thing wrt
parameter `font'.

If someone wants to get the affect you prefer then s?he can use `set-frame-font'
with non-nil KEEP-SIZE (but I think that function might need to be "fixed" so
that actually works).

There is no good reason to change `modify-frame-parameters' so that such odd
behavior (not even the default for `set-frame-font') becomes the new norm.

> ... my knowledge of frames is slightly above zero ....

I have more experience with my particular use of frames.  You are far more
knowledgable about the frame-affecting code, I'm sure.

>  > One thing that seems unfortunate to me is the coupling of 
>  > (a) changing a parameter value for a single frame with
>  > (b) changing the default value of that parameter for
>  > future frames.  IIUC, that is what `set-frame-font' does
>  > now, and it seems wrong to me.  Are there other
>  > parameter-setting functions that also act like that?
> I have no idea.

I don't think there are.

> And I never managed to understand the interactions of
> initial, default, and actual parameters of frames.


reply via email to

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