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: Drew Adams
Subject: bug#14233: 24.3; Don't constrain frame size to character multiples
Date: Mon, 29 Apr 2013 07:10:28 -0700

>  > Either way, you still have to take into account any 
>  > interdependence among parameters.
> 
> As someone who used this for the first time I'd be surely surprised if
> interchanging the order of two alist elements would have any such
> consequences.  But maybe `modify-frame-parameters' isn't intended for
> less experienced users.

You would have the same surprise with separate calls to parameter-setting
functions: the order matters.  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.

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.

>  > 1. `set-frame-font' apparently has this side effect, which 
>  > is not appropriate here:
>  >
>  >   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.
>  >
>  > (It should say FRAMES, not FRAME, BTW.)
>  >
>  > Why does `set-frame-font' not allow you to change the font 
>  > for a given frame (besides the selected frame), without also
>  > changing face `default' for future frames?
> 
> 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.

Maybe the logic behind that coupling could be made more explicit in the doc?  Or
maybe that "enhancement" should be reverted?

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

Why do you suppose that there is an optional parameter KEEP-SIZE for
`set-frame-font'?  And why do you suppose it is optional (i.e., the default
behavior does NOT keep the same size)?

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

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

Why should `modify-frame-parameters', applied to a single frame, affect future
frames at all?

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.

> for example, by `set-frame-font' albeit in a
> more transparent fashion than currently.
> 
>  > 2. `modify-frame-parameters' is the basic, general, 
>  > workhorse function for frames.  It lets you set any number
>  > of frame parameters in any order.  Yes, I would very much
>  > like it to continue working in the same, straightforward
>  > manner, including for parameter `font'.
> 
> When setting one frame parameter can implicitly change another one, I
> wouldn't consider that as "straightforward".

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

> But since I never tried to customize my emacs in this area
> I trust you.  Maybe someone who both uses frame parameters
> and knows how they should work can eventually fix
> the problems in this area then.

And I trust you and your knowledge of windows and frames, 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?






reply via email to

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