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

[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: martin rudalics
Subject: bug#14233: 24.3; Don't constrain frame size to character multiples
Date: Mon, 29 Apr 2013 18:48:34 +0200

> You would have the same surprise with separate calls to parameter-setting
> functions: the order matters.

Only if I do not redraw the frame in between.

> Someone who is not aware that a few frame
> parameters are not independent of each other will be in for a surprise no 
matter
> how s?he sets them, if not paying attention to the order of setting.

That someone might be a person who wants to do two things at the same
time in her Emacs: Use a specific font size and a specific frame size.

> If you think the doc of `modify-frame-parameters' is not sufficiently clear 
wrt
> its alist argument (and the same likely applies to other functions or 
variables,
> such as `default-frame-alist'), then please add to the doc to make this 
clearer.
>
> Do we even make explicit in the doc which parameters depend on which other
> parameters?  That would be the place to start wrt this problem, not some
> specific function that sets parameters.

I'm afraid that nobody will do that.  Some of these dependencies are
platform specific, other are encrusted since the early days of Emacs.
Moreover alist elements get reversed, processed out of order, ...

>> Maybe because they would tell you to select the frame first and then
>> call it with FRAME nil.
>
> They who?  Sorry, I don't understand.  Why does `set-frame-font' not let you 
act
> on a given frame (any frame), without also changing face `default' for future
> frames?  That makes no sense to me.

"They" are those who programmed it that way.  IIUC `set-frame-font' was
called `set-default-font' before and maybe didn't even pay attention to
frames at that time.

> 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?

>> IMO `modify-frame-parameters' should keep the frame size and
>> everything else unchanged when changing the font.
>
> IMO, it should not.  Such an incompatible change will break all of the code I
> mentioned, for one thing.

I understand that meanwhile.

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

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

> 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?

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

> The non-independence of some frame parameters is a general condition - not
> specific to `modify-frame-parameters' at all.

Yes.  But I would remove such interdependence wherever possible.

> And I trust you and your knowledge of windows and frames,

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

> which is certainly far
> beyond mine.  It's possible for your knowledge and my particular experience to
> work together.
>
> I know that because it has happened before.  You have fixed badly broken frame
> behavior several times now, working with info about my particular experience. 
 I
> thank you again for all that patient and careful work.
>
> 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.  And I never managed to understand the interactions of
initial, default, and actual parameters of frames.

martin





reply via email to

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