unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Samuel Bronson <naesten@gmail.com>
Cc: 17836@debbugs.gnu.org
Subject: bug#17836: 24.3; `describe-fontset' confused about e.g. ?\C-@
Date: Mon, 23 Jun 2014 19:17:01 +0300	[thread overview]
Message-ID: <83a993sirm.fsf@gnu.org> (raw)
In-Reply-To: <87vbrsfkwc.fsf@naesten.mooo.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 1095 bytes --]

> From: Samuel Bronson <naesten@gmail.com>
> Date: Sun, 22 Jun 2014 21:57:07 -0400
> 
> 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
> --8<---------------cut here---------------end--------------->8---
> 
> Notice how #x43 is NOT a representation of `?\C-@' but, in fact, of
> `?C'?

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?

> Why would you try to extract the codepoints AFTER formatting the
> range as a string ...?

Because the formatting of the codepoints is done by describe-vector,
which doesn't pass the codepoints to print-fontset-element.  So it
needs to reverse-engineer the codepoints from the text that was
already inserted into the buffer.





  reply	other threads:[~2014-06-23 16:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-23  1:57 bug#17836: 24.3; `describe-fontset' confused about e.g. ?\C-@ Samuel Bronson
2014-06-23 16:17 ` Eli Zaretskii [this message]
2014-06-23 16:39   ` Eli Zaretskii
2019-11-03 16:34 ` Lars Ingebrigtsen
2021-08-20 14:36   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a993sirm.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=17836@debbugs.gnu.org \
    --cc=naesten@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).