emacs-devel
[Top][All Lists]
Advanced

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

Re: Note on e65c307 breaks font-height


From: martin rudalics
Subject: Re: Note on e65c307 breaks font-height
Date: Sat, 04 Jun 2016 11:48:10 +0200

>> But it's easier to look at all of them in one and the same customization
>> buffer.  At least that's what a beginner would do IMO.
>
> Not sure about beginners (as this is not newbie stuff at all).  I
> agree that it would be more convenient to specify them all, but we
> don't have such a facility.  What you did instead is instruct the font
> selection process about some of your preferences.  Try stepping
> through the code which implements font/fontset selection, and if you
> don't get lost immediately, you will see how many semi-arbitrary
> decisions that code makes.
>
> IOW, the font selection code was not designed to support what you'd
> like, not in general.  That is why I strongly recommend to just state
> a specific font of your liking, and move on.

What I did (in the previous century, IIRC) was to select the procedure
that I then considered best supported by the customization interface.
Can you point me to a similar interface for the step you propose?  IOW,
I still think that mine is the way a newbie would use.

>>   > I'm not sure I follow: isn't the default face supposed to be per
>>   > frame?
>>
>> That's the way it's implemented.  But where do we tell that in our
>> documentations?
>
>   -- Function: face-attribute face attribute &optional frame inherit
>       This function returns the value of the ATTRIBUTE attribute for FACE
>       on FRAME.
>
> And all the other functions in that node accept the FRAME argument.

IIUC none of these bear any relation to the customization interface.
When someone wants to save a face attribute in her .emacs, she usually
wants to do that for "all frames created in the future".  There's no
specific frame at that time.  And I still don't see where the
customization framework allows or suggests to specifiy a face for a
frame or for "any" frame.

> It will do no harm, though, to say that explicitly at the beginning of
> the chapter; patches welcome.

I don't want to talk you into anything.  But I think that this part of
the customization interface is still missing something important.  Till
then, the documentation should describe how to achieve the desired
setting.

>>   >> Lisp Backtrace:
>>   >> "internal-set-lisp-face-attribute" (0xffffb4f0)
>>   >> "set-face-attribute" (0xffffbd70)
>>   >> "font-setting-change-default-font" (0xffffc620)
>>   >> "dynamic-setting-handle-config-changed-event" (0xffffcfb0)
>>   >> "funcall-interactively" (0xffffcfa8)
>>   >> "call-interactively" (0xffffd460)
>>   >> "command-execute" (0xffffdd28)
>>   >
>>   > Hmm... why is command-execute in the backtrace?  Isn't this Emacs
>>   > starting up?
>>
>> Apparently we get a config-changed-event during start-up.  Does anyone
>> know how these get injected?
>
> I'm not sure I follow: command-execute is called by startup.el only
> once: if there's a -f SOMETHING command-line argument.  Is that what
> happened in your case?

No.  The event is stored there by apply_xft_settings in that line

      store_config_changed_event (Qfont_render,
                                  XCAR (dpyinfo->name_list_element));

All this is severely underdocumented and undercommented :-(

> Thanks, I will look into that and see what it tells.

Currently, I defalias ‘dynamic-setting-handle-config-changed-event’ to
‘ignore’.  I don't think we can recommend that to users.  Maybe we
should invent a new option like ‘x-handle-configuration-changes’ which
defaults to t.  Users encoutering problems like me could then set it to
nil in their .emacs.  In any case, I think that this part has not been
given much testing due to the bug Paul uncovered.

martin




reply via email to

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