GNU bug report logs - #17836
24.3; `describe-fontset' confused about e.g. ?\C-@

Previous Next

Package: emacs;

Reported by: Samuel Bronson <naesten <at> gmail.com>

Date: Mon, 23 Jun 2014 01:58:02 UTC

Severity: minor

Found in version 24.3

Fixed in version 28.1

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

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Samuel Bronson <naesten <at> gmail.com>
Cc: 17836 <at> debbugs.gnu.org
Subject: Re: bug#17836: 24.3; `describe-fontset' confused about e.g. ?\C-@
Date: Sun, 03 Nov 2019 17:34:39 +0100
Samuel Bronson <naesten <at> gmail.com> writes:

> When I use `describe-fontset', I get output that starts out something
> like:
>
> Fontset: -misc-fixed-medium-r-semicondensed--13-*-*-*-*-*-fontset-xterm.default
> CHAR RANGE (CODE RANGE)
>     FONT NAME (REQUESTED and [OPENED])
> C-@ .. � (#x43 .. #x10FFFF)
>     -Misc-Fixed-medium-r-semicondensed--13-*-75-75-c-120-ISO10646-1
>
> Notice how #x43 is NOT a representation of `?\C-@' but, in fact, of
> `?C'?  That's fairly strange bug.  (Why would you try to extract the
> codepoints AFTER formatting the range as a string ...?)

Weirdly enough, I'm not able to reproduce this bug reliably.  Sometimes
I get

Fontset: -PfEd-DejaVu Sans Mono-normal-normal-normal-*-25-*-*-*-m-0-fontset-startup
CHAR RANGE (CODE RANGE)
    FONT NAME (REQUESTED and [OPENED])
C-@ .. DEL
    -*-*-*-*-*-*-*-*-*-*-*-*-iso10646-1

(i.e., without the hex range) and sometimes I get

Fontset: -PfEd-DejaVu Sans Mono-normal-normal-normal-*-25-*-*-*-m-0-fontset-startup
CHAR RANGE (CODE RANGE)
    FONT NAME (REQUESTED and [OPENED])
C-@ .. <REMOVED> (#x43 .. #x3FFF7F)
    -*-*-*-*-*-*-*-*-*-*-*-*-iso10646-1

Hm...  Oh, the first time I run the command in a fresh Emacs, I get the
latter?  Perhaps displaying the buffer loaded a bunch of fonts that then
made this first (large) range go away?

Anyway, it seems like this bug is still present in Emacs 27, and there's
possibly a new bug, too, with not displaying the hex values in some
instances.

Eli did pinpoint what the reason for the original bug was, though:

> That's because print-fontset-element does this:
>
>   (beginning-of-line)
>   (let ((from (following-char))
>
> IOW, it assumes that there's a single character there, not a
> human-readable description of a character, such as "C-@".
>
> How about submitting a patch that uses 'kbd', say?

I'll take a whack at implementing that.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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

Previous Next


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