all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: make-glyph-code incompatibility
Date: Tue, 04 Mar 2008 11:02:04 -0500	[thread overview]
Message-ID: <jwvk5kibi35.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <873ar773m1.fsf@kfs-lx.rd.rdm> (Kim F. Storm's message of "Tue, 04 Mar 2008 01:08:22 +0100")

>> The new make-glyph-code is a good change, but it introduces
>> an incompatibility.  It seems that it makes previously working code
>> fail silently.  Can we make it fail with an informative message?

> The new encoding still merges a face id and char code into
> an integer if the face id is < 64.  So an integer value may
> still carry a face id in the upper bits.

Is it worth the trouble?

> Of course, I could make it always use a cons cell for
> non-default face.

I thought that's what we did.  It would seem preferable because simpler.

> Then we could check (and warn) if an integer value is >= 1^22, but
> even if we do that, it can fail:

> For example, how do you differentiate

>     1 << 19 + ?a    (emacs 22 glyph code for 'a' in mode-line face)

> and the unicode character with the same numeric value in emacs 23 ?

Yes, it's a limitation to our ability to detect the problem.

> Also, issuing warnings during redisplay is a mess!

I was thinking maybe we could display such invalid glyphs as a string
"invalid-glyph".

But I definitely do not want to expand a lot of effort into
this checking.  I just figured that maybe there's a cheap way to detect
the problem and make the failure easier to diagnose (compared to "my
vertical tab line doesn't show any more" which is harder to debug
unless we know that the vertical tab line is using glyphs).


        Stefan




  parent reply	other threads:[~2008-03-04 16:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-03 21:16 make-glyph-code incompatibility Stefan Monnier
2008-03-04  0:08 ` Kim F. Storm
2008-03-04  4:21   ` Eli Zaretskii
2008-03-04  9:58     ` Kim F. Storm
2008-03-04 19:44       ` Eli Zaretskii
2008-03-04 22:35         ` Stefan Monnier
2008-03-05 15:45           ` Eli Zaretskii
2008-03-04 23:07         ` Miles Bader
2008-03-04 16:02   ` Stefan Monnier [this message]
2008-03-04 18:23     ` Kim F. Storm

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

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

  git send-email \
    --in-reply-to=jwvk5kibi35.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=storm@cua.dk \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.