From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#13691: 24.3.50; Problem with glyphs in unibyte buffers Date: Mon, 31 Aug 2020 02:32:32 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15887"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Andreas Schwab , 13691@debbugs.gnu.org To: Eduardo Ochs Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 31 04:33:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kCZd7-00040q-PW for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 31 Aug 2020 04:33:09 +0200 Original-Received: from localhost ([::1]:44420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCZd6-0006TX-Pj for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 30 Aug 2020 22:33:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCZd0-0006TK-HJ for bug-gnu-emacs@gnu.org; Sun, 30 Aug 2020 22:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39566) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kCZd0-00073m-8F for bug-gnu-emacs@gnu.org; Sun, 30 Aug 2020 22:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kCZd0-0000Rk-5u for bug-gnu-emacs@gnu.org; Sun, 30 Aug 2020 22:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 31 Aug 2020 02:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13691 X-GNU-PR-Package: emacs Original-Received: via spool by 13691-submit@debbugs.gnu.org id=B13691.15988411611653 (code B ref 13691); Mon, 31 Aug 2020 02:33:02 +0000 Original-Received: (at 13691) by debbugs.gnu.org; 31 Aug 2020 02:32:41 +0000 Original-Received: from localhost ([127.0.0.1]:51104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCZcf-0000Qb-J4 for submit@debbugs.gnu.org; Sun, 30 Aug 2020 22:32:41 -0400 Original-Received: from mail-ed1-f48.google.com ([209.85.208.48]:39024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCZcc-0000QN-HB for 13691@debbugs.gnu.org; Sun, 30 Aug 2020 22:32:39 -0400 Original-Received: by mail-ed1-f48.google.com with SMTP id c10so4026662edk.6 for <13691@debbugs.gnu.org>; Sun, 30 Aug 2020 19:32:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=msyLYp+D4YB8wqgKqzvIYRJ36OriFQv3zRHucDLyx10=; b=IVxF8g+kfo37Kf3KeXJHg2r4RkIgVT/x23kMSCZH5wrK4xXbnYWMqdxTonDz46YNMm Ygy6i/MEIPj9RLpV0uzTOUaQmQPwo5ih/kRyu1ygGumGGuw89pEHcN/7I5s+EpLmXuj5 f1wf4Fz4sLYHvWOfeyvRU1QK8WwB89zXnTf+ArySuY3ZPaTR06ArhwwBAqK6L2dRwHis ajLIIsKIPEuXs4baKds9AYBjwB63Pus+/PACkFcXLrjujXDIBYuCaHaODVTUxXkSjADj xpnddoSiOGzN7bOa1U3Wj+UuHaaP4/m/oQg31IGU9/eNUZcsrUVtu1LX9nbjencmBgdH G6Zg== X-Gm-Message-State: AOAM533ZMCvjpa3Io6GKTY+74cHRinrR9PHyDS/bUAUXAeyt/bfepAWF Og4DlqPL9h7x2buRddgB4lrEFw4wwJWWy9/fLEc= X-Google-Smtp-Source: ABdhPJzwnQlnSD4Mtrz66Q9NX/cECmu1YwrjWnHxVo++bnh9vvCpFlD86asfJklvEcGh0Ms0+N3KA37g0vAneMweT1E= X-Received: by 2002:a50:eb9a:: with SMTP id y26mr9796500edr.123.1598841152764; Sun, 30 Aug 2020 19:32:32 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 31 Aug 2020 02:32:32 +0000 In-Reply-To: (Eduardo Ochs's message of "Tue, 12 Feb 2013 20:13:05 -0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:186741 Archived-At: Hi Eduardo, You sent the below description to the Emacs bug list 7 years ago. The email you sent is quite long, and I'm not sure what exactly the issue is, or how to try to reproduce it. Can you reproduce the issue on a recent version of Emacs, such as the recently released version 27.1? If yes, could you please provide a minimal step-by-step recipe for reproducing it, starting from "emacs -Q"? If I don't hear back from you within a couple of weeks, I'll just close this bug as unreproducible. Thanks in advance. Best regards, Stefan Kangas Eduardo Ochs writes: > Hi Andreas, > > On Tue, Feb 12, 2013 at 7:02 AM, Andreas Schwab wrote: >> >> Unibyte characters are in the eight-bit charset, so you need to set the >> display of the corresponding character in that charset, eg. (make-char >> 'eight-bit 171). > > Thanks, that worked! > > Now for something slightly trickier... =| > > Let's start by using several simple, low-level functions, one for > each range... a smarter function with `cond's can be left for > later. The code below makes the green guillemets work both in > unibyte and multibyte buffers, > > (defun eepitch-set-glyph (pos &optional char face) > (aset standard-display-table pos > (if char (vector (make-glyph-code char face))))) > > (defun eepitch-set-glyph-8bit (pos &optional char face) > (aset standard-display-table (make-char 'eight-bit pos) > (if char (vector (make-glyph-code char face))))) > > (if (not standard-display-table) > (setq standard-display-table (make-display-table)) > ) > > (defface eev-glyph-face-green '((t :foreground "green")) "") > (eepitch-set-glyph 171 171 'eev-glyph-face-green) > (eepitch-set-glyph-8bit 171 171 'eev-glyph-face-green) > (eepitch-set-glyph 187 187 'eev-glyph-face-green) > (eepitch-set-glyph-8bit 187 187 'eev-glyph-face-green) > > but now suppose that we want the char 191 to be displayed as a > blue nabla (unicode: 8711). Running > > (defface eev-glyph-face-math '((t :foreground "RoyalBlue2" > :background "gray20")) "") > (eepitch-set-glyph 191 8711 'eev-glyph-face-math) > (eepitch-set-glyph-8bit 191 8711 'eev-glyph-face-math) > > _almost_ does the job, but look at the new screenshot - it seems > that the `char' argument in `eepitch-set-glyph-8bit' needs some > translation too... is that right? Which translation? > > Cheers, and thanks in advance again... > Eduardo Ochs > eduardoochs@gmail.com > http://angg.twu.net/#eev