GNU bug report logs - #48408
BUGFIX: window-default-font-height: check for nil string

Previous Next

Package: emacs;

Reported by: Boruch Baum <boruch_baum <at> gmx.com>

Date: Fri, 14 May 2021 01:16:02 UTC

Severity: normal

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 48408 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Boruch Baum <boruch_baum <at> gmx.com>
Cc: 48408 <at> debbugs.gnu.org
Subject: Re: bug#48408: BUGFIX: window-default-font-height: check for nil
 string
Date: Fri, 14 May 2021 09:39:18 +0300
> Date: Thu, 13 May 2021 21:15:19 -0400
> From: Boruch Baum <boruch_baum <at> gmx.com>
> 
> In package windows.el, function `window-default-font-height' calls
> function `face-font', which can return a nil value, but performs a
> `string-equal' operation on the output without checking for that
> possibiliy.
> 
> I came across this in an unusual case, of having an 'emacs -nw' server
> an 'emacsclient -nw', and opening a GUI emacsclient to connect to it.
> From that point forward until the fix, every *second* attempt to use the
> minibuffer on the 'emacsclient -nw' would fail.

This means the problem is either in window-normalize-window or in
frame-parameter or in display-graphic-p, and should be fixed there.
Can you tell what does the below produce on the TTY frame where you
have this problem?

  M-: (frame-parameter nil 'display) RET
  M-: (window-frame (window-normalize-window nil t)) RET

> The fix I'm using is:
> 
>     (if (and (display-multi-font-p (frame-parameter frame 'display))
>              (stringp default-font)  ; <<<---!!!
> 	     (not (string-equal (frame-parameter frame 'font) default-font)))

No, that's not the right fix, IMO.  The code already takes care of not
assuming default-font is a string when on TTY frames, but the
condition doesn't work in this case for some reason.  We need to
understand why and fix that there.

Thanks.




This bug report was last modified 3 years and 27 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.