Received: (at 77381) by debbugs.gnu.org; 1 Apr 2025 11:33:56 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 01 07:33:55 2025 Received: from localhost ([127.0.0.1]:46722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tzZsP-0000PC-BD for submit <at> debbugs.gnu.org; Tue, 01 Apr 2025 07:33:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33696) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tzZsL-0000J5-4G for 77381 <at> debbugs.gnu.org; Tue, 01 Apr 2025 07:33:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1tzZsF-0001Ui-Ei; Tue, 01 Apr 2025 07:33:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=uMyw3IVIlta+wwR4VVmnK6eez+rz/pApo5vsJlJzp7I=; b=Aixi2R0j7zZL NrI42uP8rqOg8AHM7hbk5RD/msKxec9z6qOUage7zfjgzluGU43utGZPWbx5DsNBGYdS7eCxqDaCk x8QPXjTmodVCnhP5DZsNfEC0XSr6qGiVzrrJhMTtzP0oZw7u/h63OhWFXv25YhB9JxBTodRFgf5Et ZCKVq1bsIzbsXHJrmab+Rpc8/ZHCgoj7kxH0KGRdPwg3H++t7qVIbjVL0mzeZgk3VwiGXSmoExbq2 xfboTbTaUBEezWWJPOrO6Ukt2vzbFUbCQHnf38quVZAEYtu69H2WeWMdJLRIqB7uvC1sClgChnk5f dBYp7CRN1XPS7Uw5NiYXig==; Date: Tue, 01 Apr 2025 14:32:56 +0300 Message-Id: <86o6xg2k2f.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: "Paul D. Nelson" <ultrono@HIDDEN> In-Reply-To: <uxsg7t8qolj5xk.fsf@HIDDEN> (ultrono@HIDDEN) Subject: Re: bug#77381: [PATCH] extend tex--prettify-symbols-alist References: <uxsg7t8qolj5xk.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77381 Cc: 77381 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: "Paul D. Nelson" <ultrono@HIDDEN> > Cc: 77381 <at> debbugs.gnu.org > Date: Mon, 31 Mar 2025 22:33:59 +0200 > > One thing I realized is that the implementation I had given of the new > function was incorrect in its handling of the frame argument, because > the function char-displayable-p does seem to depend upon the selected > frame (e.g., on a graphical terminal with multiple frames, each having > their own default face or font-backend). You are right, char-displayable-p is a mess in this regard. > Assuming I haven't misunderstood, I saw a few options for correcting the > new function: > > 1. Wrap char-displayable-p in (with-selected-frame ...). > > 2. Give char-displayable-p a frame argument, and wrap its body in > (with-selected-frame ...). > > 3. Drop the frame argument altogether (leaving (with-selected-frame > ...) to callers of these functions). I prefer (1), since we cannot change char-displayable-p itself (it's used in too many places, including during startup). > Option (3) seemed simplest to me, and also at the least risk of > introducing confusion concerning the name of the new function: at a > glance, "char-displayable-on-frame-p" might suggest incorrectly that it > does the analogue for the given frame of what char-displayable-p does > for the selected frame. I acknowledge the potential confusion, but I think we can countermand that in the doc string (without even mentioning char-displayable-p). Thanks.
bug-gnu-emacs@HIDDEN
:bug#77381
; Package emacs
.
Full text available.Received: (at 77381) by debbugs.gnu.org; 31 Mar 2025 21:09:26 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 31 17:09:26 2025 Received: from localhost ([127.0.0.1]:43154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tzMNq-0002Gg-2h for submit <at> debbugs.gnu.org; Mon, 31 Mar 2025 17:09:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57498) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <arash@HIDDEN>) id 1tzMNn-0002Fo-Hd for 77381 <at> debbugs.gnu.org; Mon, 31 Mar 2025 17:09:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <arash@HIDDEN>) id 1tzMNi-0007Nx-0U; Mon, 31 Mar 2025 17:09:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=SGoM9ZM45Mit8mb/ryv8YV7GjbVPnJujN0NqubI19L4=; b=Coqs9XY8MxtX00AI9348 GL98c77krAjqIX0HQ5ihKkuaT5it7gynDmySlsWVV9GW5GwV2AmyOEZmPJivIded+AGNV7SRPSL24 sTUmUJ/Y/bpj6sFL4Tz3LxwFTWadVIi95BAMPuKhzuEO3iGD+YHhQ/wpG0i2dj2Ig7wDQzvHl1wcR w6RZ2VkBakdBd+/Klj0ZlPytennlZ1AmWr6Sx/qyy9XKUewhpvjuVdBkeoJFuMrmklQ3HLB5N81rS IwltJmpYdvphOmfJTBGwEDvoR0GBachyiZS5by2W0PH+AQJNbo6kT1iFmKBqYQcLqIlweVtWDc/fC xbA5cCyDbBnbbg==; From: Arash Esbati <arash@HIDDEN> To: "Paul D. Nelson" <ultrono@HIDDEN> Subject: Re: bug#77381: [PATCH] extend tex--prettify-symbols-alist In-Reply-To: <uxsg7t5xjpj5ps.fsf@HIDDEN> References: <uxsg7t5xjpj5ps.fsf@HIDDEN> Date: Mon, 31 Mar 2025 23:09:14 +0200 Message-ID: <m2tt78j4at.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77381 Cc: 77381 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) "Paul D. Nelson" <ultrono@HIDDEN> writes: > Thanks for your feedback concerning the accented characters -- > I had no idea one could do this in "modern" (La)TeX. This was possible with LaTeX basically since forever, you need something this in your preamble: \usepackage[utf8]{inputenc} \usepackage{lmodern}% or any other font \usepackage[T1]{fontenc} Since April 2018, you can drop the inputenc thing. The other challenge was to find a font which covers the characters you need, and then assign the correct encoding to it via fontenc. With the advent of XeTeX and LuaTeX, you can drop the fontenc part as well. Otherwise your patch LGTM. Best, Arash
bug-gnu-emacs@HIDDEN
:bug#77381
; Package emacs
.
Full text available.Received: (at 77381) by debbugs.gnu.org; 31 Mar 2025 20:38:52 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 31 16:38:52 2025 Received: from localhost ([127.0.0.1]:43116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tzLuE-0001XL-NF for submit <at> debbugs.gnu.org; Mon, 31 Mar 2025 16:38:52 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]:42004) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <ultrono@HIDDEN>) id 1tzLuB-0001Wf-PI for 77381 <at> debbugs.gnu.org; Mon, 31 Mar 2025 16:38:48 -0400 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-ac2aeada833so929109066b.0 for <77381 <at> debbugs.gnu.org>; Mon, 31 Mar 2025 13:38:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743453521; x=1744058321; darn=debbugs.gnu.org; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=Mrw80ngIxBBJ56jAd9kQXJp0i9B7Z7Yv7BvkJM1qbfw=; b=LrgsSu6r+dR+erhJwwkgirxnvQMJztx+3QnyZ6P1/RHwtLD/4g77anMAGjTQdIe0M2 OVKqWGM8yA92PBGl3ljM4AXHTLrmw97P/+uiv7MijhGmLxrNvM6Ma8IRzpb445BjtIT6 3oauD1l+RM835Hz38nS2VKRt4QMSzzj0iK/No3uAFGykM/PVisfWla4CmZnVRAdFrm3T f1jNGBfd93Bu8+3eIugWw2zeQyWV0fbXoFz9WC7e3gAHngmH6eWuLK8mdJzB7H23E4Mi vGtTYMZc0pGvyc42FkJALvBgKnr5Cun4sCU5TfXInKF/zp7IPz0lXKn3KghkdQvWgfUP +Xqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743453521; x=1744058321; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Mrw80ngIxBBJ56jAd9kQXJp0i9B7Z7Yv7BvkJM1qbfw=; b=BKJ1gKqwbq8Rlkru9gZK8wG8EtLoFsvrIoYRnnw6D0qu008KnlQ+FwqDQ1RRXk2reF K9t24s1VIpMKETb5Gw5FOIc0JnhBHzgvKh8wYYT0MxJ+/sFtKL1+5Lb9tLsnhrRDZC0F 1l+PYYxYJ2K5DPBRw0NAC3thOf+qR0uqgXBZ/IYdBr+clg/8hnAFv6BM6uDbfcFplZ3K ayQ+QAUxeGQ0F7eIIqO622g3xbl3rM9Fi+uXCKhtJtC62H34t5Brm6kdSHneqOPgJm3m ZRQyK0XPndnZ1JKEXBGiTHqgl5yfY6i/c8GpyqZp0MfO8TVaw+blGouEMhJZ8iXNebJR 8FHQ== X-Gm-Message-State: AOJu0Yxk3cMMAO/sy82QnH2ljhHTg9yB5tbLKEQK8nGFFeBZ2KCibeDG PZiW6oedu027ToTADpBQ7TMT+kBcyg7CRZr+zxV71eb2pxtZlOS+ X-Gm-Gg: ASbGnctUmOqvut3w0iK8Rd4l8Vxz2cqVE2gaMwh2aI5WJBERtx9HLQqQHCb3PiWVEdF N430EJKjeKxbx8a0kOY/JLPVk9+4/qqqrwLNV6MV/JkqQ7Fn8DIjxTHbeqWdNEtDZA9eiy1I4HV myKVnT7XzgkTLS4zslOVnwWdeGEni9l2jA4po4mUZ80DN5vsYk0U54wVGMb1Rxcmsc3oTmN0toM 9UGsD5pA12k6fQO/Hp44lGJAOffkPKmDfEyiEzMTDzbYx0FYIJhda+nmRADpdWqtDoosLZmTYrY SwbJy8LKO7HlC1gwf4cAdGfEWQmB9wOPTFDkbaKV/rwUrPswM9pulfY7L46RvE1MFj6pugwfm7J yicHghneEM7wT80uFj7rJ X-Google-Smtp-Source: AGHT+IFj4RD7jmAPAXgTFLjCyag+yNqXqYaZ8Ud3f6jb28ArQVqgF8yF2WsMg2tLKgPl63zJ9/8mog== X-Received: by 2002:a17:907:a089:b0:ac7:3929:25fa with SMTP id a640c23a62f3a-ac7392927d2mr1058988866b.30.1743453521006; Mon, 31 Mar 2025 13:38:41 -0700 (PDT) Received: from localhost (0x573d6713.static.cust.fastspeed.dk. [87.61.103.19]) by smtp.gmail.com with UTF8SMTPSA id a640c23a62f3a-ac71927b243sm683296966b.69.2025.03.31.13.38.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Mar 2025 13:38:40 -0700 (PDT) From: "Paul D. Nelson" <ultrono@HIDDEN> To: Arash Esbati <arash@HIDDEN> Subject: Re: bug#77381: [PATCH] extend tex--prettify-symbols-alist In-Reply-To: <m2y0wlhyjv.fsf@HIDDEN> (message from Arash Esbati on Mon, 31 Mar 2025 19:58:44 +0200) Date: Mon, 31 Mar 2025 22:38:39 +0200 Message-ID: <uxsg7t5xjpj5ps.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77381 Cc: 77381 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Hi Arash, Thanks for your feedback concerning the accented characters -- I had no idea one could do this in "modern" (La)TeX. Please find attached the updated patch. Any further feedback would be welcome. Paul --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-Extend-tex-prettify-symbols-alist.patch Content-Transfer-Encoding: quoted-printable From 0da9f4fe0da7491fce2ec7d4e663fc9c5f062c43 Mon Sep 17 00:00:00 2001 From: Paul Nelson <ultrono@HIDDEN> Date: Sun, 30 Mar 2025 13:31:58 +0200 Subject: [PATCH] Extend tex--prettify-symbols-alist * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Add further math symbols, quotes and fractions. --- lisp/textmodes/tex-mode.el | 120 ++++++++++++++++++++++++++++++++++--- 1 file changed, 113 insertions(+), 7 deletions(-) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index ad1d4fa1f88..ea1bf3807c3 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -3185,9 +3185,14 @@ tex--prettify-symbols-alist ("\\bigcap" . ?=E2=8B=82) ("\\bigcirc" . ?=E2=97=AF) ("\\bigcup" . ?=E2=8B=83) + ("\\bigodot" . ?=E2=A8=80) + ("\\bigoplus" . ?=E2=A8=81) + ("\\bigotimes" . ?=E2=A8=82) + ("\\bigsqcup" . ?=E2=A8=86) ("\\bigstar" . ?=E2=98=85) ("\\bigtriangledown" . ?=E2=96=BD) ("\\bigtriangleup" . ?=E2=96=B3) + ("\\biguplus" . ?=E2=A8=84) ("\\bigvee" . ?=E2=8B=81) ("\\bigwedge" . ?=E2=8B=80) ("\\blacklozenge" . ?=E2=9C=A6) @@ -3204,12 +3209,11 @@ tex--prettify-symbols-alist ("\\bullet" . ?=E2=80=A2) ("\\bumpeq" . ?=E2=89=8F) ("\\cap" . ?=E2=88=A9) + ("\\cdot" . ?=E2=8B=85) ("\\cdots" . ?=E2=8B=AF) ("\\centerdot" . ?=C2=B7) ("\\checkmark" . ?=E2=9C=93) ("\\chi" . ?=CF=87) - ("\\cdot" . ?=E2=8B=85) - ("\\cdots" . ?=E2=8B=AF) ("\\circ" . ?=E2=88=98) ("\\circeq" . ?=E2=89=97) ("\\circlearrowleft" . ?=E2=86=BA) @@ -3286,11 +3290,15 @@ tex--prettify-symbols-alist ("\\hookleftarrow" . ?=E2=86=A9) ("\\hookrightarrow" . ?=E2=86=AA) ("\\iff" . ?=E2=87=94) + ("\\iiiint" . ?=E2=A8=8C) + ("\\iiint" . ?=E2=88=AD) + ("\\iint" . ?=E2=88=AC) ("\\imath" . ?=C4=B1) ("\\in" . ?=E2=88=88) ("\\infty" . ?=E2=88=9E) ("\\int" . ?=E2=88=AB) ("\\intercal" . ?=E2=8A=BA) + ("\\jmath" . ?=C8=B7) ("\\langle" . 10216) ; Literal ?=E2=9F=A8 breaks indentation. ("\\lbrace" . ?{) ("\\lbrack" . ?\[) @@ -3323,6 +3331,7 @@ tex--prettify-symbols-alist ("\\rhd" . ?=E2=96=B7) ("\\ll" . ?=E2=89=AA) ("\\llcorner" . ?=E2=8C=9E) + ("\\lll" . ?=E2=8B=98) ("\\lnapprox" . ?=E2=8B=A6) ("\\lneq" . ?=E2=89=A8) ("\\lneqq" . ?=E2=89=A8) @@ -3400,6 +3409,8 @@ tex--prettify-symbols-alist ("\\nvdash" . ?=E2=8A=AC) ("\\nwarrow" . ?=E2=86=96) ("\\odot" . ?=E2=8A=99) + ("\\oiiint" . ?=E2=88=B0) + ("\\oiint" . ?=E2=88=AF) ("\\oint" . ?=E2=88=AE) ("\\ominus" . ?=E2=8A=96) ("\\oplus" . ?=E2=8A=95) @@ -3508,10 +3519,12 @@ tex--prettify-symbols-alist ("\\vDash" . ?=E2=8A=A8) ("\\varepsilon" . ?=CE=B5) ("\\varphi" . ?=CF=86) + ("\\varpi" . ?=CF=96) ("\\varprime" . ?=E2=80=B2) ("\\varpropto" . ?=E2=88=9D) ("\\varrho" . ?=CF=B1) ("\\varsigma" . ?=CF=82) + ("\\vartheta" . ?=CF=91) ("\\vartriangleleft" . ?=E2=8A=B2) ("\\vartriangleright" . ?=E2=8A=B3) ("\\vdash" . ?=E2=8A=A2) @@ -3522,19 +3535,60 @@ tex--prettify-symbols-alist ("\\wedge" . ?=E2=88=A7) ("\\wp" . ?=E2=84=98) ("\\wr" . ?=E2=89=80) - ("\\Bbb{N}" . ?=E2=84=95) ; AMS commands for blackboard bold - ("\\Bbb{P}" . ?=E2=84=99) ; Also sometimes \mathbb. + ("\\Bbb{A}" . ?=F0=9D=94=B8) ; AMS commands for blackboard bold + ("\\Bbb{B}" . ?=F0=9D=94=B9) ; Also sometimes \mathbb. + ("\\Bbb{C}" . ?=E2=84=82) + ("\\Bbb{D}" . ?=F0=9D=94=BB) + ("\\Bbb{E}" . ?=F0=9D=94=BC) + ("\\Bbb{F}" . ?=F0=9D=94=BD) + ("\\Bbb{G}" . ?=F0=9D=94=BE) + ("\\Bbb{H}" . ?=E2=84=8D) + ("\\Bbb{I}" . ?=F0=9D=95=80) + ("\\Bbb{J}" . ?=F0=9D=95=81) + ("\\Bbb{K}" . ?=F0=9D=95=82) + ("\\Bbb{L}" . ?=F0=9D=95=83) + ("\\Bbb{M}" . ?=F0=9D=95=84) + ("\\Bbb{N}" . ?=E2=84=95) + ("\\Bbb{O}" . ?=F0=9D=95=86) + ("\\Bbb{P}" . ?=E2=84=99) ("\\Bbb{Q}" . ?=E2=84=9A) ("\\Bbb{R}" . ?=E2=84=9D) + ("\\Bbb{S}" . ?=F0=9D=95=8A) ("\\Bbb{T}" . ?=F0=9D=95=8B) + ("\\Bbb{U}" . ?=F0=9D=95=8C) + ("\\Bbb{V}" . ?=F0=9D=95=8D) + ("\\Bbb{W}" . ?=F0=9D=95=8E) + ("\\Bbb{X}" . ?=F0=9D=95=8F) + ("\\Bbb{Y}" . ?=F0=9D=95=90) ("\\Bbb{Z}" . ?=E2=84=A4) - ("\\mathbb{N}" . ?=E2=84=95) ; AMS commands for blackboard bold - ("\\mathbb{P}" . ?=E2=84=99) ; Also sometimes \mathbb. + ("\\mathbb{A}" . ?=F0=9D=94=B8) ; AMS commands for blackboard bold + ("\\mathbb{B}" . ?=F0=9D=94=B9) ; Also sometimes \mathbb. + ("\\mathbb{C}" . ?=E2=84=82) + ("\\mathbb{D}" . ?=F0=9D=94=BB) + ("\\mathbb{E}" . ?=F0=9D=94=BC) + ("\\mathbb{F}" . ?=F0=9D=94=BD) + ("\\mathbb{G}" . ?=F0=9D=94=BE) + ("\\mathbb{H}" . ?=E2=84=8D) + ("\\mathbb{I}" . ?=F0=9D=95=80) + ("\\mathbb{J}" . ?=F0=9D=95=81) + ("\\mathbb{K}" . ?=F0=9D=95=82) + ("\\mathbb{L}" . ?=F0=9D=95=83) + ("\\mathbb{M}" . ?=F0=9D=95=84) + ("\\mathbb{N}" . ?=E2=84=95) + ("\\mathbb{O}" . ?=F0=9D=95=86) + ("\\mathbb{P}" . ?=E2=84=99) ("\\mathbb{Q}" . ?=E2=84=9A) ("\\mathbb{R}" . ?=E2=84=9D) + ("\\mathbb{S}" . ?=F0=9D=95=8A) ("\\mathbb{T}" . ?=F0=9D=95=8B) + ("\\mathbb{U}" . ?=F0=9D=95=8C) + ("\\mathbb{V}" . ?=F0=9D=95=8D) + ("\\mathbb{W}" . ?=F0=9D=95=8E) + ("\\mathbb{X}" . ?=F0=9D=95=8F) + ("\\mathbb{Y}" . ?=F0=9D=95=90) ("\\mathbb{Z}" . ?=E2=84=A4) ("\\pm" . ?=C2=B1) + ("\\pounds" . ?=C2=A3) ("\\|" . ?=E2=80=96) ("\\varkappa" . ?=CF=B0) ;; caligraphic @@ -3738,7 +3792,59 @@ tex--prettify-symbols-alist ("\\textdivorced" . ?=E2=9A=AE) ("\\textlbrackdbl" . 10214) ; Literal ?=E2=9F=A6 breaks indentation ("\\textrbrackdbl" . 10215) ; Literal ?=E2=9F=A7 breaks indentation - ("\\textinterrobangdown" . ?=E2=B8=98)) + ("\\textinterrobangdown" . ?=E2=B8=98) + + ;; TeX quotes + ("``" . ?=E2=80=9C) + ("''" . ?=E2=80=9D) + + ;; Unicode Fractions + ("\\frac{1}{2}" . "=C2=BD") + ("\\frac{1}{3}" . "=E2=85=93") + ("\\frac{2}{3}" . "=E2=85=94") + ("\\frac{1}{4}" . "=C2=BC") + ("\\frac{3}{4}" . "=C2=BE") + ("\\frac{1}{5}" . "=E2=85=95") + ("\\frac{2}{5}" . "=E2=85=96") + ("\\frac{3}{5}" . "=E2=85=97") + ("\\frac{4}{5}" . "=E2=85=98") + ("\\frac{1}{6}" . "=E2=85=99") + ("\\frac{5}{6}" . "=E2=85=9A") + ("\\frac{1}{7}" . "=E2=85=90") + ("\\frac{1}{8}" . "=E2=85=9B") + ("\\frac{3}{8}" . "=E2=85=9C") + ("\\frac{5}{8}" . "=E2=85=9D") + ("\\frac{7}{8}" . "=E2=85=9E") + ("\\frac{1}{9}" . "=E2=85=91") + ("\\frac{1}{10}" . "=E2=85=92") + ("\\tfrac{1}{2}" . "=C2=BD") + ("\\tfrac{1}{3}" . "=E2=85=93") + ("\\tfrac{2}{3}" . "=E2=85=94") + ("\\tfrac{1}{4}" . "=C2=BC") + ("\\tfrac{3}{4}" . "=C2=BE") + ("\\tfrac{1}{5}" . "=E2=85=95") + ("\\tfrac{2}{5}" . "=E2=85=96") + ("\\tfrac{3}{5}" . "=E2=85=97") + ("\\tfrac{4}{5}" . "=E2=85=98") + ("\\tfrac{1}{6}" . "=E2=85=99") + ("\\tfrac{5}{6}" . "=E2=85=9A") + ("\\tfrac{1}{7}" . "=E2=85=90") + ("\\tfrac{1}{8}" . "=E2=85=9B") + ("\\tfrac{3}{8}" . "=E2=85=9C") + ("\\tfrac{5}{8}" . "=E2=85=9D") + ("\\tfrac{7}{8}" . "=E2=85=9E") + ("\\tfrac{1}{9}" . "=E2=85=91") + ("\\tfrac{1}{10}" . "=E2=85=92") + + ;; Other symbols + ("\\S" . ?=C2=A7) + ("\\Finv" . ?=E2=84=B2) + ("\\Game" . ?=E2=85=81) + ("\\ " . 9141) ; Literal ?=E2=8E=B5 breaks indentation + ("\\lvert" . ?|) + ("\\rvert" . ?|) + ("\\lVert" . ?=E2=80=96) + ("\\rVert" . ?=E2=80=96)) "A `prettify-symbols-alist' usable for (La)TeX modes.") =20 (defun tex--prettify-symbols-compose-p (_start end _match) --=20 2.39.3 (Apple Git-145) --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#77381
; Package emacs
.
Full text available.Received: (at 77381) by debbugs.gnu.org; 31 Mar 2025 20:34:11 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 31 16:34:11 2025 Received: from localhost ([127.0.0.1]:43103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tzLpi-00013E-Vl for submit <at> debbugs.gnu.org; Mon, 31 Mar 2025 16:34:11 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]:49250) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <ultrono@HIDDEN>) id 1tzLpg-00012P-B9 for 77381 <at> debbugs.gnu.org; Mon, 31 Mar 2025 16:34:09 -0400 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-aaecf50578eso844646866b.2 for <77381 <at> debbugs.gnu.org>; Mon, 31 Mar 2025 13:34:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743453242; x=1744058042; darn=debbugs.gnu.org; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=Pk6r9g+b3bPDGcq6wxgQvqUvEYrfDxirjLx6X3d8VCo=; b=gNLv4dimJDtYt0R1WgD+VXaNe32AwaZBKTnjG0oWqC8jFtJUB9vJMkSuEQSYssmIPT T1RobkDjFL3LE3AweSYPuL9VTEWgLTvVpZ9HEf+OkyvWtvYqJYvSHds7dEDUa3nvlEKi QQNnTH+fknAy9P+GYABYUHxVtkvjWRX/omfUy3Re6wWwQA6+Xygueu3P05acOWVWVl7W 3CtmMfW6VyF2p5L5bEQQ+WJKEcNfkC5Qc5YdJIWs35C1VqWLwUU2LSXAho6IbY+QWw4t 5vnIbBqubqJML5y7K0T6scyrJ9vAmhKShdxCZEFd1IcRpSpYgPBbsOEiRVWHEsoLgznR fKpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743453242; x=1744058042; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Pk6r9g+b3bPDGcq6wxgQvqUvEYrfDxirjLx6X3d8VCo=; b=VtyS8oZrFwlFG6PJ8tcFxFJG3LbyeoAjMgMeVsqUqLFkqbBy9ngbJ93fHIzS3nU6a+ YvcrTT7EdiEbBgccckN3RZ8z9Ej1bVPpnR3nsYrmXf8fPP7RkBbeG8vNc7CNWMaLSgwS IGtlBXTxrhtf+MT4jheQfwREF6yPjSD1tHERS6eCCgLxtqVcz8ETL5pJU+oRT8sgCBt3 finqMQoPMyzDQqnkKUvxmau2561SaeMbywVsqDoktTbHV18FWtDPGuVh2F/eZ/5I1lto /2Lg8LdyNZ2gtHQ5FI1UYQEoSXUBxnZmEHzhhelDxs2qYRPgEYvGYJy0FljmQIXVkLLm in4Q== X-Gm-Message-State: AOJu0Yx7bHnPlQvHT0Oqt9F+JqN1FPQdkTOhmYKDvUg78GodkzURoVPJ uPLHtOWvyl4e3QlwIdWT2f0bTIxM7Meu9EYtULTf7qtQwCCntVqHm88Ar+iE X-Gm-Gg: ASbGncs+58J7wg3vp986fVIANyJnoxt++jowqQ48f0elh557+voUOQXpOZH0DWwVmRY +UHoRGK0B4BQRd4J1GfKsBYJ09yTIJgKN2LCEDpoQdjr1cHu6uqQX4RwEvMPkNBecZOj5Tl+NRo ndSoB/4qM3hiGbvD+Vla9G5zfXsJ+GSpT4MzHyTKK0lY+N5tyVpmtZOtlWODLgwOsa1EbE3U4JQ 62T5fk9tmTM3BIZIu4PTBCLjAQLlBvCwlXW6+SZ7B6aY/hs96/iIS/5J0VwjMUVixqtc0mKPMCh jo2lDHNu2iLrC6SQePyluqDBQ1CEWyAaS3X8bgzwoxwYJEou+MVMZjD6Ak1QGZ0tc9Ze1Tg9YQY FNOFMWdhB3w== X-Google-Smtp-Source: AGHT+IHjBJ7xxO0v/i4GBEJnkX8bt4y4r7V1SMRhx5cqCejrm9fpLCX3XLUO2rSGMPY6I2fE9dJYZw== X-Received: by 2002:a17:907:7e82:b0:ac7:1be2:1a79 with SMTP id a640c23a62f3a-ac7389933d9mr1044588466b.4.1743453241818; Mon, 31 Mar 2025 13:34:01 -0700 (PDT) Received: from localhost (0x573d6713.static.cust.fastspeed.dk. [87.61.103.19]) by smtp.gmail.com with UTF8SMTPSA id a640c23a62f3a-ac7192ea10bsm667677766b.83.2025.03.31.13.34.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Mar 2025 13:34:01 -0700 (PDT) From: "Paul D. Nelson" <ultrono@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#77381: [PATCH] extend tex--prettify-symbols-alist In-Reply-To: <86jz854bc6.fsf@HIDDEN> (message from Eli Zaretskii on Mon, 31 Mar 2025 15:46:17 +0300) Date: Mon, 31 Mar 2025 22:33:59 +0200 Message-ID: <uxsg7t8qolj5xk.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77381 Cc: 77381 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain >> +(defun char-graphically-displayable-p (char &optional frame) > > I prefer char-displayable-on-frame-p (since "graphically might be > interpreted as meaning only GUI frames). > >> + "Return non-nil if CHAR can be graphically displayed in FRAME. >> +FRAME nil or omitted means use the selected frame. >> + >> +This function provides a more reliable test than `char-displayable-p' >> +for determining if a character will display properly. > > "More reliable" will cause people wonder why we have "unreliable" > APIs. But the essence is not the reliability, the essence is > accuracy: char-displayable-p returns the ability of the entire Emacs > session, whereas this new function returns the ability of a particular > frame. > > I also think this function should be documented in the ELisp manual > and in NEWS, but that could be a separate patch. Thanks for pushing for clarity on this. One thing I realized is that the implementation I had given of the new function was incorrect in its handling of the frame argument, because the function char-displayable-p does seem to depend upon the selected frame (e.g., on a graphical terminal with multiple frames, each having their own default face or font-backend). Assuming I haven't misunderstood, I saw a few options for correcting the new function: 1. Wrap char-displayable-p in (with-selected-frame ...). 2. Give char-displayable-p a frame argument, and wrap its body in (with-selected-frame ...). 3. Drop the frame argument altogether (leaving (with-selected-frame ...) to callers of these functions). Option (3) seemed simplest to me, and also at the least risk of introducing confusion concerning the name of the new function: at a glance, "char-displayable-on-frame-p" might suggest incorrectly that it does the analogue for the given frame of what char-displayable-p does for the selected frame. I went with (3) for now, but would be happy to adjust if desired. Please see attached. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Restrict-symbol-prettification-to-displayable-ones.patch From 011b86f58eb3899ee196cad4b198ce9525fadf47 Mon Sep 17 00:00:00 2001 From: Paul Nelson <ultrono@HIDDEN> Date: Mon, 31 Mar 2025 15:37:14 +0200 Subject: [PATCH] Restrict symbol prettification to displayable ones * lisp/international/mule.el (char-displayable-on-frame-p): New function used to determine more reliably whether a character can be meaningfully displayed. * doc/lispref/display.texi (Fontsets): Document it. * lisp/progmodes/prog-mode.el (prettify-symbols--composition-displayable-p): New function used to restrict to displayable prettification symbols. This prevents issues with missing characters appearing as boxes. (prettify-symbols--make-keywords): Use it. --- doc/lispref/display.texi | 7 +++++++ etc/NEWS | 11 +++++++++++ lisp/international/mule.el | 24 ++++++++++++++++++++++++ lisp/progmodes/prog-mode.el | 31 +++++++++++++++++++++++++++++-- 4 files changed, 71 insertions(+), 2 deletions(-) diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index de0639187ab..45087cfac03 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -4122,6 +4122,13 @@ Fontsets terminal can encode the character (@pxref{Terminal I/O Encoding}). @end defun +@defun char-displayable-on-frame-p char +This function behaves like @code{char-displayable-p}, but in the +graphical case, it does not perform the final check of whether the +underlying text terminal can encode the character. It thus provides a +displayability check more specific to the selected frame. +@end defun + @node Low-Level Font @subsection Low-Level Font Representation @cindex font property diff --git a/etc/NEWS b/etc/NEWS index 1bd2fd6d486..2b0249bde09 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -64,6 +64,9 @@ init file. * Changes in Emacs 31.1 +** `prettify-symbols-mode' attempts to ignore undisplayable characters. +Previously, such characters would be rendered as, e.g., white boxes. + +++ ** 'standard-display-table' now has more extra slots. 'standard-display-table' has been extended to allow specifying glyphs @@ -1713,6 +1716,14 @@ Previously, its argument was always evaluated using dynamic binding. * Lisp Changes in Emacs 31.1 ++++ + ++++ +** 'char-displayable-on-frame-p' returns non-nil if Emacs ought to be able to +display its char argument on the selected frame. This new function, +unlike 'char-displayable-p', does not check whether the character can be +encoded by the underlying terminal. + +++ ** New macros 'static-when' and 'static-unless'. Like 'static-if', these macros evaluate their condition at diff --git a/lisp/international/mule.el b/lisp/international/mule.el index f72cc815287..169014e72a1 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -528,6 +528,30 @@ char-displayable-p (throw 'tag3 charset))) charset-list) nil))))))))))) + +(defun char-displayable-on-frame-p (char) + "Return non-nil if CHAR can be displayed in the selected frame. +This function provides a stricter test than `char-displayable-p' does +for determining if a character will display properly: in the graphical +case, it does not check whether the underlying terminal can encode the +character. + +Specifically, this function returns non-nil: + +- for a text terminal, if `char-displayable-p' returns non-nil. + +- for a graphical terminal, if `char-displayable-p' returns either t or + a font object. + +The two functions differ in behavior (i.e., `char-displayable-strict-p' +returns nil but `char-displayable-p' does not) if the underlying +terminal is graphical and can encode the character, but the selected +frame cannot." + (let ((display-capability (char-displayable-p char))) + (if (display-graphic-p) + (or (eq display-capability t) + (fontp display-capability)) + display-capability))) ;; Save the ASCII case table in case we need it later. Some locales ;; (such as Turkish) modify the case behavior of ASCII characters, diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el index 77724e04f11..33e0d354fee 100644 --- a/lisp/progmodes/prog-mode.el +++ b/lisp/progmodes/prog-mode.el @@ -230,10 +230,37 @@ prettify-symbols--compose-symbol ;; Return nil because we're not adding any face property. nil) +(defun prettify-symbols--composition-displayable-p (composition) + "Return non-nil if COMPOSITION can be displayed with the current fonts. +COMPOSITION can be a single character, a string, or a sequence (vector or +list) of characters and composition rules as described in the documentation +of `prettify-symbols-alist' and `compose-region'." + (cond + ((characterp composition) + (char-displayable-on-frame-p composition)) + ((stringp composition) + (seq-every-p #'char-displayable-on-frame-p composition)) + ((seqp composition) + ;; check that every even-indexed element is displayable + (seq-every-p + (lambda (idx-elt) + (if (evenp (car idx-elt)) + (char-displayable-on-frame-p (cdr idx-elt)) + t)) + (seq-map-indexed #'cons composition))) + (t + ;; silently ignore invalid compositions + t))) + (defun prettify-symbols--make-keywords () (if prettify-symbols-alist - `((,(regexp-opt (mapcar 'car prettify-symbols-alist) t) - (0 (prettify-symbols--compose-symbol ',prettify-symbols-alist)))) + (let ((filtered-alist + (seq-filter + (lambda (elt) + (prettify-symbols--composition-displayable-p (cdr elt))) + prettify-symbols-alist))) + `((,(regexp-opt (mapcar 'car filtered-alist) t) + (0 (prettify-symbols--compose-symbol ',filtered-alist))))) nil)) (defvar-local prettify-symbols--keywords nil) -- 2.39.3 (Apple Git-145) --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#77381
; Package emacs
.
Full text available.Received: (at 77381) by debbugs.gnu.org; 31 Mar 2025 17:58:57 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 31 13:58:56 2025 Received: from localhost ([127.0.0.1]:42766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tzJPU-00069u-HQ for submit <at> debbugs.gnu.org; Mon, 31 Mar 2025 13:58:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33472) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <arash@HIDDEN>) id 1tzJPS-00069O-Jp for 77381 <at> debbugs.gnu.org; Mon, 31 Mar 2025 13:58:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <arash@HIDDEN>) id 1tzJPN-0003gF-4G; Mon, 31 Mar 2025 13:58:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=Qd55AzCkf1aCRToDJgGeOSrEkzT5qIwKM9b2i9Ru8Dc=; b=XG6r26XLLSQGEySJw+4k 1VjKxK1jHn4FJRuee+7Ze3CNFMkCLjPmYbNkAHvGXJkybXmrEV0E0+uCHyuSsTaWykVHqT/VaF2eD duNfgOEA5Kz58RbdOJMO40XuIC6yiQphsLjJbN2nJJbgJPVgarGZsVjDcgsfEBaBKQMwnCy4vl6vM w24eJXCzk8mf9WNkl5bByNwH1BEI2Rs0fZ6p45c5Rb9ykzEpZQ5Ozmd+yUn/XijR3DcGkG9PSpS35 /gwQWjHhB7HMhJTjbLcsGMX2yBejwiphDD51DGwPi2EyFRoXNFsll7/kSOd0qe02wOC/fxMeeVk76 /Y8ujDDmVnvReQ==; From: Arash Esbati <arash@HIDDEN> To: "Paul D. Nelson" <ultrono@HIDDEN> Subject: Re: bug#77381: [PATCH] extend tex--prettify-symbols-alist In-Reply-To: <uxsg7to6xieofi.fsf@HIDDEN> References: <uxsg7to6xieofi.fsf@HIDDEN> Date: Mon, 31 Mar 2025 19:58:44 +0200 Message-ID: <m2y0wlhyjv.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77381 Cc: 77381 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) "Paul D. Nelson" <ultrono@HIDDEN> writes: > This patch adds symbols to tex--prettify-symbols-alist. The new symbols > include math symbols, accented characters, quotes and fractions. > > From 7c9d1dea0e9b4b7b61df3c60b05badca11aa24bc Mon Sep 17 00:00:00 2001 > From: Paul Nelson <ultrono@HIDDEN> > Date: Sun, 30 Mar 2025 13:31:58 +0200 > Subject: [PATCH] Extend tex--prettify-symbols-alist > > * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Add > further math symbols, accented characters, quotes and fractions. > --- > lisp/textmodes/tex-mode.el | 183 +++++++++++++++++++++++++++++++++++-- > 1 file changed, 176 insertions(+), 7 deletions(-) > > diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el > index ad1d4fa1f88..73f634b7282 100644 > --- a/lisp/textmodes/tex-mode.el > +++ b/lisp/textmodes/tex-mode.el > + ;; Accented characters > + ("{\\'a}" . ?=C3=A1) > + ("{\\'e}" . ?=C3=A9) > + ("{\\'i}" . ?=C3=AD) > + ("{\\'o}" . ?=C3=B3) > + ("{\\'u}" . ?=C3=BA) > + ("{\\'A}" . ?=C3=81) Hi Paul, I suggest to drop this part. This notation kills kerning (due to braces) and hyphenation when characters are constructed. The modern way is to use a font which contains these chars (e.g., lmodern), set the buffer encoding to UTF-8 and just enter the char. UTF-8 is standard for LaTeX input since April 2018. I admit, this is LaTeX and not plain TeX, but `tex--prettify-symbols-alist' deals mostly with LaTeX. Best, Arash
bug-gnu-emacs@HIDDEN
:bug#77381
; Package emacs
.
Full text available.Received: (at 77381) by debbugs.gnu.org; 31 Mar 2025 12:46:35 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 31 08:46:35 2025 Received: from localhost ([127.0.0.1]:40239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tzEXC-0006sN-7m for submit <at> debbugs.gnu.org; Mon, 31 Mar 2025 08:46:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33554) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tzEX8-0006r2-CD for 77381 <at> debbugs.gnu.org; Mon, 31 Mar 2025 08:46:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1tzEX0-0008ST-NE; Mon, 31 Mar 2025 08:46:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=5KhMR+NAfmsUWlZ+qKfUtqR3xWShnx0zVwCUhMLEueA=; b=kLYgGSMX9V9L +HQQ2hqVIdED/jqroNipde1QH5FXtQiSvO9/MCmwroRKuq53KRYNIGI1qJK+lfSIdeXJEgG+fZnaE xJll/papAx7AptZputjwX1BV1ADEmq0I9amdQ4KowTLTATLEcj/DeTI+HpNDPPki9KXAwNQ4XCTHj 66BZIoK8IdvM0f1/ASRsquq/oiqc++EpHZOcZ0QosfW7WcYQgR7uuBWoICVoOjdMBdNetm8IQFYtB 14W3pkZRXkTzVWsgB/IReBBbitkVOZewVhVcakHe5ui+czsbyJLJGT3IiZc4bcJGVnA0nPAUc+xMz OfDWlH2lPgtn/mzhXNRdpw==; Date: Mon, 31 Mar 2025 15:46:17 +0300 Message-Id: <86jz854bc6.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: "Paul D. Nelson" <ultrono@HIDDEN> In-Reply-To: <uxsg7tr02egw8q.fsf@HIDDEN> (ultrono@HIDDEN) Subject: Re: bug#77381: [PATCH] extend tex--prettify-symbols-alist References: <uxsg7tr02egw8q.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77381 Cc: 77381 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: "Paul D. Nelson" <ultrono@HIDDEN> > Cc: 77381 <at> debbugs.gnu.org > Date: Sun, 30 Mar 2025 21:21:41 +0200 > > > I think this function should be in mule.el (under a different name), > > and it should accept a frame as an additional argument, for which to > > call display-graphic-p. > > > > Otherwise, LGTM, thanks. > > Thanks, please see attached. Some minor comments: > +(defun char-graphically-displayable-p (char &optional frame) I prefer char-displayable-on-frame-p (since "graphically might be interpreted as meaning only GUI frames). > + "Return non-nil if CHAR can be graphically displayed in FRAME. > +FRAME nil or omitted means use the selected frame. > + > +This function provides a more reliable test than `char-displayable-p' > +for determining if a character will display properly. "More reliable" will cause people wonder why we have "unreliable" APIs. But the essence is not the reliability, the essence is accuracy: char-displayable-p returns the ability of the entire Emacs session, whereas this new function returns the ability of a particular frame. I also think this function should be documented in the ELisp manual and in NEWS, but that could be a separate patch. Thanks.
bug-gnu-emacs@HIDDEN
:bug#77381
; Package emacs
.
Full text available.Received: (at 77381) by debbugs.gnu.org; 30 Mar 2025 19:21:53 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 15:21:53 2025 Received: from localhost ([127.0.0.1]:38140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tyyED-0004OC-97 for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 15:21:53 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:50293) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <ultrono@HIDDEN>) id 1tyyEA-0004Np-10 for 77381 <at> debbugs.gnu.org; Sun, 30 Mar 2025 15:21:50 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5e6f4b3ebe5so7043350a12.0 for <77381 <at> debbugs.gnu.org>; Sun, 30 Mar 2025 12:21:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743362504; x=1743967304; darn=debbugs.gnu.org; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=mH4gD3E7TwWKLZLNcL/O2aMIb3GW6VDgmj0NnoGypv8=; b=GrwrTwdqaxDKP2e/fKPjOiUzmq2tMsppJAsi+/570IlDQMcLGWzyN3v+aSFeBo8/4v zoqmH4Hbb2/zDR1TdMNFa1KYQom6rAVw3dz5OFSYPKFibg+/HjzCgoVE8/CD79v9m7WV AskI3p6GY2vHZvSO2u/krgBE0GQienmPchJdzXEZugMVCuMkXKMU+9pZCOEyVma6rANe efJghepQAMrtwvSsc/CwIlGihK0PO8FuOC338GfHtnNmdIppbiofGAGWKwCezZb+6Ad/ 3t8nE4WQUGNwleB9T+6Ix/ns7YGPPZXRMP1aDLVvFTcfl47bFMCDYscearm0XwXPHXIc QENw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743362504; x=1743967304; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mH4gD3E7TwWKLZLNcL/O2aMIb3GW6VDgmj0NnoGypv8=; b=b6sQquUGLLAM+flpDdd+DP4Dg9JH7vYsnmr/bT00AIlw8V810bZhYvbLGUGFL+fZku 7i6dCIB68MIOHiAjbU2SAUTSGT+5+063PGmjpe9bgIWHE9jAERwY4gJb6wk3Mz7gFaKk rMlKighgBQ29wKbTL4uRSONIfLIGnKDUmhTcpW/d/mERfTYJlKgLTZrQGg86IpfjQ8Ko sM9KT2Ck91duCYMB4qaZOuBLVB1KcPf3r2rNcufP2uvKqQYWdy65HWh5TlT8UcDxHMB6 0sHmpAQ2+WrzT//yYTOwSWDFZmBbY8f9rDriPipxFxH/h8SggXdgQjuXFOJns8+jPcQg RUEw== X-Gm-Message-State: AOJu0YyjZ/Roy6k7Ev0AJbDecypTgA4EZ0D35u1/2Y7oAVgWSyzy0h2I JWw8Ip6vS3fxeMIOIVh5eLNiyeVIa0lnvVYonOnvLTpNkvfp8VOyVRf3DX9O X-Gm-Gg: ASbGnct/8XKiZQQ7fTBu71aj1AQV7YYa8pjmBifm+CY2uYvnXgrt6aBjK99a9LZLh5e yIg2cyN+/n3OKwLJ4tppWEvMSCJp/WZ7luObQOvcZdQjoK/JE4Os6k1Mm1dImskHKux8M/hTaaJ tX6oTC66EVlTBiV+RQqjT0TlTGd/VZWm/lNCl+YiW5pgeoLRRsl6IqzATzk9EQcXtgDSgf+rLbH JONpMuhfby4R/8yIGY0RVe6pl/plRrYEcnO7ke+rESNZFtc4b1XoJomGC/GnhztbRJ+qfGkAVfg QwFl66RQDl31kq2nYaUxbsnOF0m0kmeGHATgARz2ATpdgyHiI7Kg+FoJtYDGHv1m91okKzaR21V nwM7HYNL7Pw== X-Google-Smtp-Source: AGHT+IG1Rs7gcKamS8741CH3f7K8is4r/r9ex+vis/ptVu5wZ3box9NqYM6cJEk+TclpntJGOHJU2Q== X-Received: by 2002:a17:906:d553:b0:abf:6264:a624 with SMTP id a640c23a62f3a-ac738a8ea3amr556120866b.32.1743362503421; Sun, 30 Mar 2025 12:21:43 -0700 (PDT) Received: from localhost (0x573d6713.static.cust.fastspeed.dk. [87.61.103.19]) by smtp.gmail.com with UTF8SMTPSA id a640c23a62f3a-ac71927b0d9sm508543866b.42.2025.03.30.12.21.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Mar 2025 12:21:43 -0700 (PDT) From: "Paul D. Nelson" <ultrono@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#77381: [PATCH] extend tex--prettify-symbols-alist In-Reply-To: <86msd24ay4.fsf@HIDDEN> (message from Eli Zaretskii on Sun, 30 Mar 2025 21:42:27 +0300) Date: Sun, 30 Mar 2025 21:21:41 +0200 Message-ID: <uxsg7tr02egw8q.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77381 Cc: 77381 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain > I think this function should be in mule.el (under a different name), > and it should accept a frame as an additional argument, for which to > call display-graphic-p. > > Otherwise, LGTM, thanks. Thanks, please see attached. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment From 2b32cd6a8028b34a02e7c22427cb86a75891f008 Mon Sep 17 00:00:00 2001 From: Paul Nelson <ultrono@HIDDEN> Date: Sun, 30 Mar 2025 19:10:38 +0200 Subject: [PATCH] Restrict symbol prettification to displayable ones * lisp/international/mule.el (char-graphically-displayable-p): New function used to determine more reliably whether a character can be meaningfully displayed. * lisp/progmodes/prog-mode.el (prettify-symbols--composition-displayable-p): New function used to restrict to displayable prettification symbols. This prevents issues with missing characters appearing as boxes. (prettify-symbols--make-keywords): Use it. --- lisp/international/mule.el | 17 +++++++++++++++++ lisp/progmodes/prog-mode.el | 31 +++++++++++++++++++++++++++++-- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/lisp/international/mule.el b/lisp/international/mule.el index f72cc815287..ac562341f1a 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -528,6 +528,23 @@ char-displayable-p (throw 'tag3 charset))) charset-list) nil))))))))))) + +(defun char-graphically-displayable-p (char &optional frame) + "Return non-nil if CHAR can be graphically displayed in FRAME. +FRAME nil or omitted means use the selected frame. + +This function provides a more reliable test than `char-displayable-p' +for determining if a character will display properly. + +A character is considered graphically displayable: +- on a graphical display, if `char-displayable-p' returns either t or a + font object, and +- on a non-graphical display, if `char-displayable-p' returns non-nil." + (let ((display-capability (char-displayable-p char))) + (if (display-graphic-p frame) + (or (eq display-capability t) + (fontp display-capability)) + display-capability))) ;; Save the ASCII case table in case we need it later. Some locales ;; (such as Turkish) modify the case behavior of ASCII characters, diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el index 77724e04f11..35765579642 100644 --- a/lisp/progmodes/prog-mode.el +++ b/lisp/progmodes/prog-mode.el @@ -230,10 +230,37 @@ prettify-symbols--compose-symbol ;; Return nil because we're not adding any face property. nil) +(defun prettify-symbols--composition-displayable-p (composition) + "Return non-nil if COMPOSITION can be displayed with the current fonts. +COMPOSITION can be a single character, a string, or a sequence (vector or +list) of characters and composition rules as described in the documentation +of `prettify-symbols-alist' and `compose-region'." + (cond + ((characterp composition) + (char-graphically-displayable-p composition)) + ((stringp composition) + (seq-every-p #'char-graphically-displayable-p composition)) + ((seqp composition) + ;; check that every even-indexed element is displayable + (seq-every-p + (lambda (idx-elt) + (if (evenp (car idx-elt)) + (char-graphically-displayable-p (cdr idx-elt)) + t)) + (seq-map-indexed #'cons composition))) + (t + ;; silently ignore invalid compositions + t))) + (defun prettify-symbols--make-keywords () (if prettify-symbols-alist - `((,(regexp-opt (mapcar 'car prettify-symbols-alist) t) - (0 (prettify-symbols--compose-symbol ',prettify-symbols-alist)))) + (let ((filtered-alist + (seq-filter + (lambda (elt) + (prettify-symbols--composition-displayable-p (cdr elt))) + prettify-symbols-alist))) + `((,(regexp-opt (mapcar 'car filtered-alist) t) + (0 (prettify-symbols--compose-symbol ',filtered-alist))))) nil)) (defvar-local prettify-symbols--keywords nil) -- 2.39.3 (Apple Git-145) --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#77381
; Package emacs
.
Full text available.Received: (at 77381) by debbugs.gnu.org; 30 Mar 2025 18:42:38 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 14:42:38 2025 Received: from localhost ([127.0.0.1]:38099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tyxcE-0002N3-Bc for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 14:42:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37588) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tyxcB-0002Mj-AT for 77381 <at> debbugs.gnu.org; Sun, 30 Mar 2025 14:42:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1tyxc5-0006rD-Lf; Sun, 30 Mar 2025 14:42:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=UBFG4w4Qq9ZEzM+jfMv6b7MAxZ1Kq3JIXdR7Qwlzyyo=; b=PpNKgc/YT4bN hVST4NrSRDF4SekJbjwPA6l4IshpyOtGfNlDrTLR8x1QEblnPWzjHXTo5JcHWPbMet9qK6sp2Iyvi yY1g7zKEjHMuZd9lacFxxkxwCoEtzHRRdV1XPgWwxywxbyrxNN0K8Oa9oFC7SnJSSeHSf6nHlOxr5 W3/vwlZIU3/eTg7fVHt55IF9g94DwPMcIonP2vhwsLeS7E0bK9DLQWMUlH6W3q+thKE12X2ffg5MO tUnWJcLZt63dlvVoqZm7ry2AZssx8mro//3pEmGiNar7d/faU+TzjknFKxk9X9cw5sCMgiSm162mA JUqkjpa8BVFVAKjI0a18Jg==; Date: Sun, 30 Mar 2025 21:42:27 +0300 Message-Id: <86msd24ay4.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: "Paul D. Nelson" <ultrono@HIDDEN> In-Reply-To: <uxsg7ttt7ah0l8.fsf@HIDDEN> (ultrono@HIDDEN) Subject: Re: bug#77381: [PATCH] extend tex--prettify-symbols-alist References: <uxsg7ttt7ah0l8.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77381 Cc: 77381 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: "Paul D. Nelson" <ultrono@HIDDEN> > Cc: 77381 <at> debbugs.gnu.org > Date: Sun, 30 Mar 2025 19:47:47 +0200 > > +(defun prettify-symbols--char-displayable-p (char) > + "Return non-nil if CHAR can be displayed with the current font. > +A character is considered displayable: > + > +- on a graphical display, if `char-displayable-p' returns either t or a > + font object, and > + > +- on a non-graphical display, if `char-displayable-p' returns non-nil." > + (let ((display-capability (char-displayable-p char))) > + (if (display-graphic-p) > + (or (eq display-capability t) > + (fontp display-capability)) > + display-capability))) I think this function should be in mule.el (under a different name), and it should accept a frame as an additional argument, for which to call display-graphic-p. Otherwise, LGTM, thanks.
bug-gnu-emacs@HIDDEN
:bug#77381
; Package emacs
.
Full text available.Received: (at 77381) by debbugs.gnu.org; 30 Mar 2025 17:47:59 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 13:47:59 2025 Received: from localhost ([127.0.0.1]:38031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tywlL-0007me-5F for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 13:47:59 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:45207) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <ultrono@HIDDEN>) id 1tywlI-0007mD-61 for 77381 <at> debbugs.gnu.org; Sun, 30 Mar 2025 13:47:57 -0400 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5e686d39ba2so2637722a12.2 for <77381 <at> debbugs.gnu.org>; Sun, 30 Mar 2025 10:47:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743356870; x=1743961670; darn=debbugs.gnu.org; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=oOHJM6kuPbEeBk4QU84P8xCQ7lQE/82N22BNJVT87C8=; b=MswZ9U/mWKbqeGh6yuqJHk/H/iv3EzPmNAZtMUMc2L+6WwEjt1qCwqxs7LLLAv+n90 Q0W5N+aXXG7YIC44cWOhX7IhQHMyIqajizeGuhGXsRwaT2oNB7vSXhQHU3LUgKOYMSPa EoV8TA7840BgtbSpzMPt9udl27/ksGlttvXhPyGrXqkMYAoZapCACS1zrK5CcwUkHnsb GJuxNly+ozk5Ntqs9XNU3i2ljEQFAo6qNJBdTrBlw2uYZtjyhiLch4K20wLZB0NeWNoI sT+DDvuz7PeeZWcXLxvuH6e6lfGDxXtZvGE6c2AT5ddj2ur0kpPe89XW6S3Z3azVGskT FytQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743356870; x=1743961670; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=oOHJM6kuPbEeBk4QU84P8xCQ7lQE/82N22BNJVT87C8=; b=L1HE1+FiXTjrP4IqeFv3dvwLMn/i0vrDjBYfhcRyqLDHbCH/TjvEvZgXGaROYBddD6 hWqf2Z6n2kWJdYYYw74MuCmxE+qgYvk4ivXvSx/vax32Vh8nyMARsOQcp+Gdpj1KnZzQ PiegQ1T3PD1s0H7+9aj0nymyS1M25JnvMVuViinIWk+r/cpTn2pX36kBT35aCbSBkVaw 3DQvTPoPbu4bwLaaw3GEJKd6aYLyCKmlnM9bOS/7ZM2jZ+Hnjbv0k+Fe/76rUkdA3WNV tAV3znQI2pGBXI0BsasILghMV9XMHJG8WaOFOk1gagHtS5CaJC7pe6ENvMfb4jSFvxS8 UjmQ== X-Gm-Message-State: AOJu0YxgPXmDlpPza7UYDucZLUS5dQj2j+efoIaZSSyJnqFvIaiyB7D+ r6CyF2NHSU3roxl6lU/ogAayq4ckj6fJckPlm+mS9QIXapDcNs0o X-Gm-Gg: ASbGncucUVZA9TK/d5xyXw2i3JZdoR/HvZFMZG3qgS4jZE46y09TkEdHuQq5tCHxkdA s9aN2vkTe0FydiuKRzF75elrzEUT2AW0hnsfQcX/tYt1gY/6b5zV3l0rShD96V6AXUYBNKJJkxa TLMz09stf4Ryzk2oeRMrI/JRu/rJAB+n+SROn6t4ZvpKf/Mg/tV4XArhIz8peNGmAXwRt7eaL0M N4b7lyPG0LJdlZr8gB9x+hS8hEurdn3bnrnGXzZGeSwGuvK+TSLQ4YX5/hvBCHc8moXCCkd6H2d fOnAaJO3eDiX91EnTGDegdJEie7nddElL5GNDzDrmJ9J16z54RFfDKIsiBLPNan9Aga7+Y3Peiu T48ek7GvqDA== X-Google-Smtp-Source: AGHT+IHsXPVK+j733eYMVz94R0aW0y+dZ5xPd/VVBnSuAHTJ2ktddEGApSh1+ddekhQFUwf0/Zrmmw== X-Received: by 2002:a05:6402:520d:b0:5e5:ba3e:ab04 with SMTP id 4fb4d7f45d1cf-5edfdd18131mr5853296a12.26.1743356869310; Sun, 30 Mar 2025 10:47:49 -0700 (PDT) Received: from localhost (0x573d6713.static.cust.fastspeed.dk. [87.61.103.19]) by smtp.gmail.com with UTF8SMTPSA id 4fb4d7f45d1cf-5edc17e06e7sm4432748a12.78.2025.03.30.10.47.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Mar 2025 10:47:48 -0700 (PDT) From: "Paul D. Nelson" <ultrono@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#77381: [PATCH] extend tex--prettify-symbols-alist In-Reply-To: <86r02e4g4h.fsf@HIDDEN> (message from Eli Zaretskii on Sun, 30 Mar 2025 19:50:38 +0300) Date: Sun, 30 Mar 2025 19:47:47 +0200 Message-ID: <uxsg7ttt7ah0l8.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77381 Cc: 77381 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain >> > Ideally, we should only add those which can be displayed. The >> > function char-displayable-p should be able to tell. Would it be >> > possible to change the code such that only the symbols that pass that >> > test are added? >> >> (...) > > For a GUI frame, if char-displayable-p returns a symbol, the character > is not displayable. Characters that can be displayed on a GUI frame > should cause char-displayable-p to return a string, the name of the > font suitable for the character. Thanks. With the attached patch, prettify-symbols-mode filters prettify-symbols-alist to those entries that are displayable in the following sense: (let ((display-capability (char-displayable-p char))) (if (display-graphic-p) (or (eq display-capability t) (fontp display-capability)) display-capability)) I've tested it in tex-mode, with GUI and terminal Emacs, using the examples from this thread. Any feedback or other suggestions would be welcome. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Restrict-symbol-prettification-to-displayable-ones.patch From 0789b3bd3f2e8dc7ecc35d9acff55de5a6af9131 Mon Sep 17 00:00:00 2001 From: Paul Nelson <ultrono@HIDDEN> Date: Sun, 30 Mar 2025 19:10:38 +0200 Subject: [PATCH] Restrict symbol prettification to displayable ones * lisp/progmodes/prog-mode.el (prettify-symbols--char-displayable-p) (prettify-symbols--composition-displayable-p): New functions used to restrict to displayable prettification symbols. This prevents issues with missing characters appearing as boxes. (prettify-symbols--make-keywords): Use them. --- lisp/progmodes/prog-mode.el | 45 +++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el index 77724e04f11..e2f0d511449 100644 --- a/lisp/progmodes/prog-mode.el +++ b/lisp/progmodes/prog-mode.el @@ -230,10 +230,51 @@ prettify-symbols--compose-symbol ;; Return nil because we're not adding any face property. nil) +(defun prettify-symbols--char-displayable-p (char) + "Return non-nil if CHAR can be displayed with the current font. +A character is considered displayable: + +- on a graphical display, if `char-displayable-p' returns either t or a + font object, and + +- on a non-graphical display, if `char-displayable-p' returns non-nil." + (let ((display-capability (char-displayable-p char))) + (if (display-graphic-p) + (or (eq display-capability t) + (fontp display-capability)) + display-capability))) + +(defun prettify-symbols--composition-displayable-p (composition) + "Return non-nil if COMPOSITION can be displayed with the current fonts. +COMPOSITION can be a single character, a string, or a sequence (vector or +list) of characters and composition rules as described in the documentation +of `prettify-symbols-alist' and `compose-region'." + (cond + ((characterp composition) + (prettify-symbols--char-displayable-p composition)) + ((stringp composition) + (seq-every-p #'prettify-symbols--char-displayable-p composition)) + ((seqp composition) + ;; check that every even-indexed element is displayable + (seq-every-p + (lambda (idx-elt) + (if (evenp (car idx-elt)) + (prettify-symbols--char-displayable-p (cdr idx-elt)) + t)) + (seq-map-indexed #'cons composition))) + (t + ;; silently ignore invalid compositions + t))) + (defun prettify-symbols--make-keywords () (if prettify-symbols-alist - `((,(regexp-opt (mapcar 'car prettify-symbols-alist) t) - (0 (prettify-symbols--compose-symbol ',prettify-symbols-alist)))) + (let ((filtered-alist + (seq-filter + (lambda (elt) + (prettify-symbols--composition-displayable-p (cdr elt))) + prettify-symbols-alist))) + `((,(regexp-opt (mapcar 'car filtered-alist) t) + (0 (prettify-symbols--compose-symbol ',filtered-alist))))) nil)) (defvar-local prettify-symbols--keywords nil) -- 2.39.3 (Apple Git-145) --=-=-=--
bug-gnu-emacs@HIDDEN
:bug#77381
; Package emacs
.
Full text available.Received: (at 77381) by debbugs.gnu.org; 30 Mar 2025 16:50:55 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 12:50:55 2025 Received: from localhost ([127.0.0.1]:37938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tyvs6-0001wP-S0 for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 12:50:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60908) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tyvs2-0001w8-7t for 77381 <at> debbugs.gnu.org; Sun, 30 Mar 2025 12:50:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1tyvrw-0001BI-RO; Sun, 30 Mar 2025 12:50:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=edvXYte83tLO1Ke510mnyZu74jmGjQ5vC5dQ5wy+nqo=; b=RHnx7SsmjQUi JztSVRf70gqZkfd4GrBqQCfC7g68+z4E2ncYlQtblxltU5u4M4ws970M0/g+S/iYtbE/iNQXuYbFz UWBDuPirX348LzejmFKfHt5jwobotipHfVgkeO6wKKwwv7P93yz13s5gXkF+L9cwciUXq6ysJK8mV T16OsV1UhiECSeA7owKDM9vQoxryvWUBaiDVsI4qGaVEINfVYx2FT5Xzb95pZxTHZ6izb1fgD9lBx EtQKv0+beb/aVnnEffdRFukEpfL5akHlhLZPUF7X9JXSbtFAolhgIfObpaedyw6II9h7P/WDK3FLb A9jSYMONG3Na52e3HGrCRg==; Date: Sun, 30 Mar 2025 19:50:38 +0300 Message-Id: <86r02e4g4h.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: "Paul D. Nelson" <ultrono@HIDDEN> In-Reply-To: <uxsg7tiknqebfr.fsf@HIDDEN> (ultrono@HIDDEN) Subject: Re: bug#77381: [PATCH] extend tex--prettify-symbols-alist References: <uxsg7tiknqebfr.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77381 Cc: 77381 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: "Paul D. Nelson" <ultrono@HIDDEN> > Cc: 77381 <at> debbugs.gnu.org > Date: Sun, 30 Mar 2025 18:21:44 +0200 > > > Ideally, we should only add those which can be displayed. The > > function char-displayable-p should be able to tell. Would it be > > possible to change the code such that only the symbols that pass that > > test are added? > > I tried, but wasn't able to extract the necessary information from > char-displayable-p: > > In GUI Emacs, > > (char-displayable-p #x1F6F0) -> 'unicode > > and that character is not displayable for me (it renders as a white > square). > > In Emacs -nw, > > (char-displayable-p #x1d550) -> 'unicode > > but that character displays normally for me. For a GUI frame, if char-displayable-p returns a symbol, the character is not displayable. Characters that can be displayed on a GUI frame should cause char-displayable-p to return a string, the name of the font suitable for the character.
bug-gnu-emacs@HIDDEN
:bug#77381
; Package emacs
.
Full text available.Received: (at 77381) by debbugs.gnu.org; 30 Mar 2025 16:21:56 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 12:21:56 2025 Received: from localhost ([127.0.0.1]:37887 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tyvQ3-0000Ru-Ph for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 12:21:56 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]:58802) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <ultrono@HIDDEN>) id 1tyvQ0-0000RQ-Jv for 77381 <at> debbugs.gnu.org; Sun, 30 Mar 2025 12:21:53 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-ac2902f7c2aso655691666b.1 for <77381 <at> debbugs.gnu.org>; Sun, 30 Mar 2025 09:21:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743351706; x=1743956506; darn=debbugs.gnu.org; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=gipYN4oSXyu8U+b0+ZQ5AkYGcQoAz4fOgJqRFsk84+A=; b=U/scaEYgMbysuNarYANRSUPa8IqtlPbuUrciT6wtdw7eviVRieg86Sqptr7ZSMQY50 cgRkxXHS9s9UTYEmmovNkZ2t0hs3J3Cp7iDTfdUJ2lKlJ5ss3fbPRHcXyTTAWS5pc+0u 89ngJGMr9MH9q0OrgwZfF3jYMoZIOZpEz2U1HO9tJrWY1/DQxWl34NN0Edh10JVyzRjV 1CZoaADhQBkus6T9Aq9xeqCzIoFj+JE1ily72q2ZjeXy36xfkpKDlOLDUMfdTev4EiZl JNbLwX73hIJ/5nBcgHS0O+O47CzpPvsI9rw+5Tv6fOf08glHIUT271pUnmCk2jRblR39 kcWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743351706; x=1743956506; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gipYN4oSXyu8U+b0+ZQ5AkYGcQoAz4fOgJqRFsk84+A=; b=CBhzYbxrQK1jjvuC77claOCQfjrMoH6AT7JQj/fAotUiWao1rQJI6vY0wb5Z3mcJT7 81+tBfXjA3W+uLbkX0294d+GlAs/EN0XdTa8bLBmFDaE6WsHH5fdSVdM4+e7HcZ3eHuE KvWMdAa7UCbPSg4yKz8fZFGfvTlGu8RXALg5b3wTZFfZ41Xva0mzjFADIiPA4LBVfEcW hWh/ZKc17i1DgiGv1zQQQ511XJ6Agxq2+MHQ2X66OW2UKmwoJ1kBDG/FdRv4ZBakUAxf G0XDnHS1/ZcxXhRLQYvah1RhJOyUEY2Zw0y5ywOhfLunfrzggOxiRuNwk2t4cO0+IQmJ XdUQ== X-Gm-Message-State: AOJu0Yy+t+h0Cr7kHa8rlZIWDsz4tl95pxFn47unU+FEQa/PXvvdMkBi 8eIEuK1Ro2bpgh7zOC+WhQQ2qZ0LFtWTwM3uZomIrQHKbuq36FCh X-Gm-Gg: ASbGnctzJk/hUYPbEfPoiAhyyqeGdjZyjYVdMBZMjnjU9NcWG3SWwVJ5TLyZr1PZazU T9gkCy4vCYuCq4AsN2gAxBUNFch21NFeQBxvJQUq2yA5dTyUsXQH7ZFmOS4RcmNeceXs3PGBkVa 4GKP3HbJtnPDvTb0bRKVJM2eKQFSmw3IB+L08Rt3oiplcK3e9GAhHH157L9GYXXO+3xeGmbu2T+ /ET+zM8ezOyZWK7PE+EtKnccq9l0qmKyo0oqjjpU2DV1SKaJ71VQcdFqThzHoGNSYjAe2Fd3I3Q NFjUJqMZuqoCJ+bgxV1pzM/c0i//9C0Dlg2E7SyyWbedRya6gpDkEgLQbFGWhOzjalZ4dLn7Ptt dWnp5m6X/sw== X-Google-Smtp-Source: AGHT+IETBzi168WkJjHPaM4pLWqQUKTguZttdNFPG63OjuO9D8bCPYEcLru91aPRIIYpyhRp0EKKww== X-Received: by 2002:a17:906:2558:b0:ac7:684c:25ca with SMTP id a640c23a62f3a-ac7684c2ff9mr31365966b.51.1743351705761; Sun, 30 Mar 2025 09:21:45 -0700 (PDT) Received: from localhost (0x573d6713.static.cust.fastspeed.dk. [87.61.103.19]) by smtp.gmail.com with UTF8SMTPSA id a640c23a62f3a-ac71961f286sm489325066b.89.2025.03.30.09.21.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Mar 2025 09:21:45 -0700 (PDT) From: "Paul D. Nelson" <ultrono@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#77381: [PATCH] extend tex--prettify-symbols-alist In-Reply-To: <86wmc64mhc.fsf@HIDDEN> (message from Eli Zaretskii on Sun, 30 Mar 2025 17:33:19 +0300) Date: Sun, 30 Mar 2025 18:21:44 +0200 Message-ID: <uxsg7tiknqebfr.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77381 Cc: 77381 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) > Ideally, we should only add those which can be displayed. The > function char-displayable-p should be able to tell. Would it be > possible to change the code such that only the symbols that pass that > test are added? I tried, but wasn't able to extract the necessary information from char-displayable-p: In GUI Emacs, (char-displayable-p #x1F6F0) -> 'unicode and that character is not displayable for me (it renders as a white square). In Emacs -nw, (char-displayable-p #x1d550) -> 'unicode but that character displays normally for me. Thus, when the return value of char-displayable-p is 'unicode, I don't know how to determine whether the character would be displayable for our purposes (i.e., not as a white square). Any suggestions?
bug-gnu-emacs@HIDDEN
:bug#77381
; Package emacs
.
Full text available.Received: (at 77381) by debbugs.gnu.org; 30 Mar 2025 14:33:33 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 10:33:33 2025 Received: from localhost ([127.0.0.1]:37672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tytjB-0003gM-F5 for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 10:33:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58472) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tytj8-0003g4-Mq for 77381 <at> debbugs.gnu.org; Sun, 30 Mar 2025 10:33:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1tytj3-0000ME-A7; Sun, 30 Mar 2025 10:33:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ZXM3rZgE1VQvlvK4SAcOGRq6WHtf/qgQ33O16NOt2R8=; b=AV2UPouDsCyx 9VQjf3SEO0Uw3NRKutB/yWDN3qhhj0rR7Oz1OGzI6t/Ng5gdT4cfQtplqnlHJ4s02Ima2RtQR1nkx 97qaK9Hix6jchSA8bddQHf+AOkQygdx8agKY5rU4Te+vhd/o2TsAb8oQPvXnHVjtbZaE9cjIO47DP Z/XjtSLFcbdDKf1Q0ptUQLOkDSmKZVv4ka+xl55LBQsU9rYP+S7mlgpKG61hrwG+k70iC5J3Lybid YtBxwKkSMGoyBe/cGMrhqZmXU82wY3m27tLL13lWMnaRHai15d2zf7oeb9rxE2ztnzcqpkINPrq1Y jIn3Xolr/bY08vqMhozLjg==; Date: Sun, 30 Mar 2025 17:33:19 +0300 Message-Id: <86wmc64mhc.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: "Paul D. Nelson" <ultrono@HIDDEN> In-Reply-To: <uxsg7tldsmejiu.fsf@HIDDEN> (ultrono@HIDDEN) Subject: Re: bug#77381: [PATCH] extend tex--prettify-symbols-alist References: <uxsg7tldsmejiu.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77381 Cc: 77381 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: "Paul D. Nelson" <ultrono@HIDDEN> > Cc: 77381 <at> debbugs.gnu.org > Date: Sun, 30 Mar 2025 15:27:05 +0200 > > >> This patch adds symbols to tex--prettify-symbols-alist. The new symbols > >> include math symbols, accented characters, quotes and fractions. > > > > Thanks, but did you make sure this won't cause any regressions and/or > > annoyances if the user's machine doesn't have the requisite fonts > > installed? > > If I understand correctly, the concern is that if a font for a character > in the alist is unavailable, Emacs will display a white square. For > instance, on my machine (running macOS), adding > > (add-to-list 'prettify-symbols-alist '("\\satellite" . #x1F6F0)) > > makes "\satellite" look like a white square when prettify-symbols-mode > is active. That's what I was afraid of. > So the question is whether the symbols introduced by this patch are more > likely to cause such issues than those already in > tex--prettify-symbols-alist. > > Using (set-face-attribute 'default nil :font "...") and C-u C-x =, I > checked that DejaVu Sans supplies all the new symbols except those > attached to > > \bigsqcup, \biguplus, "\ " > > which are found in DejaVu Math TeX Gyre. > > I checked that Arial has all the new symbols except those attached to > > - \frac{1}{7}, \frac{1}{9}, \frac{1}{10}, \Game, found in DejaVu Sans > (like for \daleth). > > - \Finv, found in American Typewriter (like for \cdot), and > > - \bigodot, \bigoplus, \bigotimes, \bigsqcup, \biguplus, \iiiint, found > in DejaVu Math TeX Gyre. > > Helvetica lacks many of the newly added and already present symbols. > > This was a spot check, but it suggests that the new entries have similar > fallback behavior to existing ones, with the exception of a few > characters that depend on DejaVu Math TeX Gyre. > > Perhaps the simplest way to avoid regressions would be to drop those > less well-supported symbols? Ideally, we should only add those which can be displayed. The function char-displayable-p should be able to tell. Would it be possible to change the code such that only the symbols that pass that test are added? Thanks.
bug-gnu-emacs@HIDDEN
:bug#77381
; Package emacs
.
Full text available.Received: (at 77381) by debbugs.gnu.org; 30 Mar 2025 13:27:17 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 09:27:17 2025 Received: from localhost ([127.0.0.1]:35432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tysh2-00006S-WF for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 09:27:17 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]:61519) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <ultrono@HIDDEN>) id 1tysh0-000067-0Y for 77381 <at> debbugs.gnu.org; Sun, 30 Mar 2025 09:27:14 -0400 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-ac29af3382dso567971866b.2 for <77381 <at> debbugs.gnu.org>; Sun, 30 Mar 2025 06:27:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743341228; x=1743946028; darn=debbugs.gnu.org; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=qZ5i2BS4Fo+wjSk7liglkQnsFHRBkDIsKxU14JH2vtU=; b=XQjnI3YRaKA3yn84JOR/99TyFof1hOOPIT1+KdXT2uTIyXce32ZnzlSWWV8IMJQZbk CwruY7SJZPVeV1/tFwnlcmWCHXLcis9veqSX7EEh5eCHIUBDAYmjtubDAEDxpT5JJ6yK oBFJNboVcDs4q2V64SkiZqoCLiqVG9xE2Ynn2fCxdGaO2tKGK/ZyhNSXDJKakhaQqonB dIjF/AhBQ2gs6IXBnb/5UF+mrkW+u031sbejGCjCqaG3tJc6B6ZPPAwQUR3KBPwKMw87 IrKgYUHICLtM/d11gccXvLx+5VzE329hs5scKkJDsl9S/4q0ovu3mVlDVYllDb4CL/lo JdDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743341228; x=1743946028; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qZ5i2BS4Fo+wjSk7liglkQnsFHRBkDIsKxU14JH2vtU=; b=oTI4y/zTvVZlAQtLmORcJMqA2u1cJkeK0tDZsWX2MDqCu9sauWkEL08iwaboWuoPLy KQpTktdo2tPa8zjpxlKiMlzD+M0rffY+pjEIjNpkQgPx2iA2ALU6FkGHBOlY5Tcn13+m DRMlvTPpVvPeQivPE96x5Mep6FkF2TpWpJPgL6hDPEhkXU+h5ldkPGe9H9HSnECw7lIQ XF4qPSJCXZJ0KvQ3lpfcFExCr9dutUVUTlOZYwlfqh/W+q9z6Ub25lB3htGDy7EeDeSv p6SPAkdi9d4yK1y16J800ui3ais+A/UuVBEArELgoFuUY4E36coXINQHciIBfQgf07/D ocNg== X-Gm-Message-State: AOJu0YyTGv9ds0c5j/CEyMQmFzK8Ft3bnhZRU6lVDsuGt1UmYa+dxLJ5 KjDm41CUeNP+AQ10zA763Zup8OqwxISUiqbFVIHnPX3qWfiXrrnn X-Gm-Gg: ASbGncvo9Q3XJiivSSJV/G1+t5QWcRIDKJVSQBK8DvX75/aYvruhqcvKLj81dhVIe6W ZNnekT8HZEZNjYj7I5rRLgunhqdc8sYchcD89xJb2exlHIgC7TpaCuXPtdAgC2xQm5nUuVTUDem DMdjBs1P9Y8j25abff3+iPdrYCCynjAgk/lg2h1/S5prju2et17rdaW+dGwHQnLYmA2zqHC6Q8A qoSK3gpW9nKVaGzZKOnauvGGaAbPH/vFrSb07loEcDMPINq/8JqwQ8c5PcCiO5eVWe1J8cq5D2C hjF9qEPdFaMZwUsXHuQlJNUw3fy7ph+PwsWlCZ1blzL6R2pC3RV1tHehYAACTwimN5x2WjFgcxr uP/7Xn3Wvow== X-Google-Smtp-Source: AGHT+IG16HQRxbpcQ4oD/hEd8vLq5c0MiVDTLqsUr0Ht3iwidpnWgNyRNOEA/Jk2d/dKWDjlECvXIg== X-Received: by 2002:a17:907:2d87:b0:ac6:dfb0:292b with SMTP id a640c23a62f3a-ac738abc72dmr442915666b.32.1743341227537; Sun, 30 Mar 2025 06:27:07 -0700 (PDT) Received: from localhost (0x573d6713.static.cust.fastspeed.dk. [87.61.103.19]) by smtp.gmail.com with UTF8SMTPSA id a640c23a62f3a-ac71967f7a4sm474242866b.138.2025.03.30.06.27.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Mar 2025 06:27:07 -0700 (PDT) From: "Paul D. Nelson" <ultrono@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#77381: [PATCH] extend tex--prettify-symbols-alist In-Reply-To: <861pue68f5.fsf@HIDDEN> (message from Eli Zaretskii on Sun, 30 Mar 2025 14:54:06 +0300) Date: Sun, 30 Mar 2025 15:27:05 +0200 Message-ID: <uxsg7tldsmejiu.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77381 Cc: 77381 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) >> This patch adds symbols to tex--prettify-symbols-alist. The new symbols >> include math symbols, accented characters, quotes and fractions. > > Thanks, but did you make sure this won't cause any regressions and/or > annoyances if the user's machine doesn't have the requisite fonts > installed? If I understand correctly, the concern is that if a font for a character in the alist is unavailable, Emacs will display a white square. For instance, on my machine (running macOS), adding (add-to-list 'prettify-symbols-alist '("\\satellite" . #x1F6F0)) makes "\satellite" look like a white square when prettify-symbols-mode is active. So the question is whether the symbols introduced by this patch are more likely to cause such issues than those already in tex--prettify-symbols-alist. Using (set-face-attribute 'default nil :font "...") and C-u C-x =, I checked that DejaVu Sans supplies all the new symbols except those attached to \bigsqcup, \biguplus, "\ " which are found in DejaVu Math TeX Gyre. I checked that Arial has all the new symbols except those attached to - \frac{1}{7}, \frac{1}{9}, \frac{1}{10}, \Game, found in DejaVu Sans (like for \daleth). - \Finv, found in American Typewriter (like for \cdot), and - \bigodot, \bigoplus, \bigotimes, \bigsqcup, \biguplus, \iiiint, found in DejaVu Math TeX Gyre. Helvetica lacks many of the newly added and already present symbols. This was a spot check, but it suggests that the new entries have similar fallback behavior to existing ones, with the exception of a few characters that depend on DejaVu Math TeX Gyre. Perhaps the simplest way to avoid regressions would be to drop those less well-supported symbols?
bug-gnu-emacs@HIDDEN
:bug#77381
; Package emacs
.
Full text available.Received: (at 77381) by debbugs.gnu.org; 30 Mar 2025 11:54:16 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 07:54:16 2025 Received: from localhost ([127.0.0.1]:35015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tyrF2-0003nj-30 for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 07:54:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40052) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tyrEz-0003nV-Gz for 77381 <at> debbugs.gnu.org; Sun, 30 Mar 2025 07:54:14 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1tyrEu-0004CG-7G; Sun, 30 Mar 2025 07:54:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=n2EMMTEZloR0A59ag8gHZwn/woKcGL6H6eYBX+932jg=; b=NrtjRqT4irx1 L+AEYt6g+az9Zqb2EsmgwItLH8UNlhsamE2cn7LBhu6ua21TXDXnZr+Xg4YAS5yIUxS6+/aEDckBY CO3sCtUweSdgMh3T4CeRJb9/XX09KGPEIthwelrmwFUxmp1xpkLYn5C3AAGgkMr/QABriC5/217ju 5MUNy46XTiVmHpATuX3T3rJfMi4K8sFqCpDsbst1PejjZ/LxPY4ET8L2JvdUSC2pRlE8NeWTMERJu tm/v/eX2Ak5mmeQeqwEglcuwfBe4p8Qx8t6Jm29BKdH01lR79IO/UE7KthLA0FRerRoJgl5pf5iWL WISXECmBusFGt3dFGev9yQ==; Date: Sun, 30 Mar 2025 14:54:06 +0300 Message-Id: <861pue68f5.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: "Paul D. Nelson" <ultrono@HIDDEN> In-Reply-To: <uxsg7to6xieofi.fsf@HIDDEN> (ultrono@HIDDEN) Subject: Re: bug#77381: [PATCH] extend tex--prettify-symbols-alist References: <uxsg7to6xieofi.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77381 Cc: 77381 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > From: "Paul D. Nelson" <ultrono@HIDDEN> > Date: Sun, 30 Mar 2025 13:41:05 +0200 > > This patch adds symbols to tex--prettify-symbols-alist. The new symbols > include math symbols, accented characters, quotes and fractions. Thanks, but did you make sure this won't cause any regressions and/or annoyances if the user's machine doesn't have the requisite fonts installed?
bug-gnu-emacs@HIDDEN
:bug#77381
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 30 Mar 2025 11:41:23 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 30 07:41:23 2025 Received: from localhost ([127.0.0.1]:34976 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tyr2Y-0003El-EW for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 07:41:23 -0400 Received: from lists.gnu.org ([2001:470:142::17]:40124) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <ultrono@HIDDEN>) id 1tyr2W-0003EL-CD for submit <at> debbugs.gnu.org; Sun, 30 Mar 2025 07:41:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <ultrono@HIDDEN>) id 1tyr2P-0001rK-DH for bug-gnu-emacs@HIDDEN; Sun, 30 Mar 2025 07:41:13 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <ultrono@HIDDEN>) id 1tyr2N-0002yE-4s for bug-gnu-emacs@HIDDEN; Sun, 30 Mar 2025 07:41:12 -0400 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-ac29af3382dso561028666b.2 for <bug-gnu-emacs@HIDDEN>; Sun, 30 Mar 2025 04:41:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743334867; x=1743939667; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=QKTViikb2O+c94rM3zLLNEf0TByf+8/8j+ZNrN9MDho=; b=iBrCVGJ8GzGfxnVoanikSyHC1MRozuDKbsprcPuLOvCaEHTvzU1e0koKkx3e3Dvgst LC4HIupxvidGDo48yhAFFaTF94iIyQ4xdmDFLHn53eJZiYdCKSRVJJRpAGJAJ83grdIC Kgpfy4IgMmCj1SFsJfHxlR8AKOg8AVmAoAs/g5TSxJuG1kaDJH+Iyz/gCI0eJbr0KT2P Wz4kFIQGKltKgwIBCfJQrYHsoy6hELrcteP6xtgTaprQ2ST/K6Rg3VV4/mgcnp0d4x4P Z5J+mkLU5+EQyEzrNmEUyIj/O5Kj0Ee9UMeUXgSI+TFJ+SxaIS5G4Mb68DKe2YcjgDdO USPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743334867; x=1743939667; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=QKTViikb2O+c94rM3zLLNEf0TByf+8/8j+ZNrN9MDho=; b=JNRFpM5j0uHBtKZnYdE9vIp1f8gFnivneb259aexgaHYSvGlLq8qGjD6EvFpwyGGOJ Xwr+7wSpR+7jIgct3XVYA3O6fP4axHtBi3MQ7YdzqM6lM7vX7rXdJbkXF++4aMdhrUxP dLMvRpTEZcqsng3TovKSocVgAyNYFr3pcIMxbsNyzl1YEreZuXjuLxzygdVfmfGUuHAZ d/6aPhOIN/wMOV0+xsK6KQw+rrO3VmNM+v/IFKzZfANQol5FuADaJ+gofCnuPp9YpfW6 cPwaYHeT2PeFWmO9JV0+leAbiGXr+ExEYleUKgQjRjoqtkomXHqdZX0ECIdOY1QujUn6 66yw== X-Gm-Message-State: AOJu0YyTVKc3mgc+UdzMp8wy6BG4LZDDDgfRSB1yAIuh44EREvffQ1/o pEnpoJ6m194IF8YScE8zQn3kG8WO/wSK8EeGKyzAFO4RxxZXSawr2sEnTZOe X-Gm-Gg: ASbGncuLcXmy76ODrKYbiRhYAup9+M1dpZ/oMsqYh9yM8DgE/IYSUWvsPkH1xkzs66F G9NKZHhg/XNEv9l9Xfbfvwy8Nc+WMD0jzfPYmqnPp4qTjiOne57w0B/myHkbJxSBUiWwozqTnye 6gI/7ffHT1SOfmA9rIHc5SY82rvfS0XcLHZZ8ZpN4mGsWtwxUzHEYh3TFsRKGVbFg51+ej9wd+Q RJQFKuNmF8+b6a4zqRxPGn0qf50lnVWq5nXSmJSiXsmMYNTumXfkFgWtMJemdMsX9665p9c0vCW OH2G/GM1r1m302dpkbChN+NH3R887Hcz+oYq7asS3yEjJz2EH+68NZ1D1IaabU/SNMtRmg4CY9Q 3iQgAnMJPkg== X-Google-Smtp-Source: AGHT+IEdgySi+J2/0/vvvZ5aWr/elGj5YVCGOBFRZGWjkiEDNomBRuo0r9dfR08VFr49ScR1Ij7FfA== X-Received: by 2002:a17:907:7eaa:b0:ac3:45c6:a1ec with SMTP id a640c23a62f3a-ac738a841a3mr625532366b.25.1743334867283; Sun, 30 Mar 2025 04:41:07 -0700 (PDT) Received: from localhost (0x573d6713.static.cust.fastspeed.dk. [87.61.103.19]) by smtp.gmail.com with UTF8SMTPSA id a640c23a62f3a-ac71922b9b7sm474911966b.17.2025.03.30.04.41.06 for <bug-gnu-emacs@HIDDEN> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Mar 2025 04:41:06 -0700 (PDT) From: "Paul D. Nelson" <ultrono@HIDDEN> To: bug-gnu-emacs@HIDDEN Subject: [PATCH] extend tex--prettify-symbols-alist Date: Sun, 30 Mar 2025 13:41:05 +0200 Message-ID: <uxsg7to6xieofi.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=ultrono@HIDDEN; helo=mail-ej1-x62d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain This patch adds symbols to tex--prettify-symbols-alist. The new symbols include math symbols, accented characters, quotes and fractions. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-Extend-tex-prettify-symbols-alist.patch Content-Transfer-Encoding: quoted-printable From 7c9d1dea0e9b4b7b61df3c60b05badca11aa24bc Mon Sep 17 00:00:00 2001 From: Paul Nelson <ultrono@HIDDEN> Date: Sun, 30 Mar 2025 13:31:58 +0200 Subject: [PATCH] Extend tex--prettify-symbols-alist * lisp/textmodes/tex-mode.el (tex--prettify-symbols-alist): Add further math symbols, accented characters, quotes and fractions. --- lisp/textmodes/tex-mode.el | 183 +++++++++++++++++++++++++++++++++++-- 1 file changed, 176 insertions(+), 7 deletions(-) diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index ad1d4fa1f88..73f634b7282 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -3185,9 +3185,14 @@ tex--prettify-symbols-alist ("\\bigcap" . ?=E2=8B=82) ("\\bigcirc" . ?=E2=97=AF) ("\\bigcup" . ?=E2=8B=83) + ("\\bigodot" . ?=E2=A8=80) + ("\\bigoplus" . ?=E2=A8=81) + ("\\bigotimes" . ?=E2=A8=82) + ("\\bigsqcup" . ?=E2=A8=86) ("\\bigstar" . ?=E2=98=85) ("\\bigtriangledown" . ?=E2=96=BD) ("\\bigtriangleup" . ?=E2=96=B3) + ("\\biguplus" . ?=E2=A8=84) ("\\bigvee" . ?=E2=8B=81) ("\\bigwedge" . ?=E2=8B=80) ("\\blacklozenge" . ?=E2=9C=A6) @@ -3204,12 +3209,11 @@ tex--prettify-symbols-alist ("\\bullet" . ?=E2=80=A2) ("\\bumpeq" . ?=E2=89=8F) ("\\cap" . ?=E2=88=A9) + ("\\cdot" . ?=E2=8B=85) ("\\cdots" . ?=E2=8B=AF) ("\\centerdot" . ?=C2=B7) ("\\checkmark" . ?=E2=9C=93) ("\\chi" . ?=CF=87) - ("\\cdot" . ?=E2=8B=85) - ("\\cdots" . ?=E2=8B=AF) ("\\circ" . ?=E2=88=98) ("\\circeq" . ?=E2=89=97) ("\\circlearrowleft" . ?=E2=86=BA) @@ -3286,11 +3290,15 @@ tex--prettify-symbols-alist ("\\hookleftarrow" . ?=E2=86=A9) ("\\hookrightarrow" . ?=E2=86=AA) ("\\iff" . ?=E2=87=94) + ("\\iiiint" . ?=E2=A8=8C) + ("\\iiint" . ?=E2=88=AD) + ("\\iint" . ?=E2=88=AC) ("\\imath" . ?=C4=B1) ("\\in" . ?=E2=88=88) ("\\infty" . ?=E2=88=9E) ("\\int" . ?=E2=88=AB) ("\\intercal" . ?=E2=8A=BA) + ("\\jmath" . ?=C8=B7) ("\\langle" . 10216) ; Literal ?=E2=9F=A8 breaks indentation. ("\\lbrace" . ?{) ("\\lbrack" . ?\[) @@ -3323,6 +3331,7 @@ tex--prettify-symbols-alist ("\\rhd" . ?=E2=96=B7) ("\\ll" . ?=E2=89=AA) ("\\llcorner" . ?=E2=8C=9E) + ("\\lll" . ?=E2=8B=98) ("\\lnapprox" . ?=E2=8B=A6) ("\\lneq" . ?=E2=89=A8) ("\\lneqq" . ?=E2=89=A8) @@ -3400,6 +3409,8 @@ tex--prettify-symbols-alist ("\\nvdash" . ?=E2=8A=AC) ("\\nwarrow" . ?=E2=86=96) ("\\odot" . ?=E2=8A=99) + ("\\oiiint" . ?=E2=88=B0) + ("\\oiint" . ?=E2=88=AF) ("\\oint" . ?=E2=88=AE) ("\\ominus" . ?=E2=8A=96) ("\\oplus" . ?=E2=8A=95) @@ -3508,10 +3519,12 @@ tex--prettify-symbols-alist ("\\vDash" . ?=E2=8A=A8) ("\\varepsilon" . ?=CE=B5) ("\\varphi" . ?=CF=86) + ("\\varpi" . ?=CF=96) ("\\varprime" . ?=E2=80=B2) ("\\varpropto" . ?=E2=88=9D) ("\\varrho" . ?=CF=B1) ("\\varsigma" . ?=CF=82) + ("\\vartheta" . ?=CF=91) ("\\vartriangleleft" . ?=E2=8A=B2) ("\\vartriangleright" . ?=E2=8A=B3) ("\\vdash" . ?=E2=8A=A2) @@ -3522,19 +3535,60 @@ tex--prettify-symbols-alist ("\\wedge" . ?=E2=88=A7) ("\\wp" . ?=E2=84=98) ("\\wr" . ?=E2=89=80) - ("\\Bbb{N}" . ?=E2=84=95) ; AMS commands for blackboard bold - ("\\Bbb{P}" . ?=E2=84=99) ; Also sometimes \mathbb. + ("\\Bbb{A}" . ?=F0=9D=94=B8) ; AMS commands for blackboard bold + ("\\Bbb{B}" . ?=F0=9D=94=B9) ; Also sometimes \mathbb. + ("\\Bbb{C}" . ?=E2=84=82) + ("\\Bbb{D}" . ?=F0=9D=94=BB) + ("\\Bbb{E}" . ?=F0=9D=94=BC) + ("\\Bbb{F}" . ?=F0=9D=94=BD) + ("\\Bbb{G}" . ?=F0=9D=94=BE) + ("\\Bbb{H}" . ?=E2=84=8D) + ("\\Bbb{I}" . ?=F0=9D=95=80) + ("\\Bbb{J}" . ?=F0=9D=95=81) + ("\\Bbb{K}" . ?=F0=9D=95=82) + ("\\Bbb{L}" . ?=F0=9D=95=83) + ("\\Bbb{M}" . ?=F0=9D=95=84) + ("\\Bbb{N}" . ?=E2=84=95) + ("\\Bbb{O}" . ?=F0=9D=95=86) + ("\\Bbb{P}" . ?=E2=84=99) ("\\Bbb{Q}" . ?=E2=84=9A) ("\\Bbb{R}" . ?=E2=84=9D) + ("\\Bbb{S}" . ?=F0=9D=95=8A) ("\\Bbb{T}" . ?=F0=9D=95=8B) + ("\\Bbb{U}" . ?=F0=9D=95=8C) + ("\\Bbb{V}" . ?=F0=9D=95=8D) + ("\\Bbb{W}" . ?=F0=9D=95=8E) + ("\\Bbb{X}" . ?=F0=9D=95=8F) + ("\\Bbb{Y}" . ?=F0=9D=95=90) ("\\Bbb{Z}" . ?=E2=84=A4) - ("\\mathbb{N}" . ?=E2=84=95) ; AMS commands for blackboard bold - ("\\mathbb{P}" . ?=E2=84=99) ; Also sometimes \mathbb. + ("\\mathbb{A}" . ?=F0=9D=94=B8) ; AMS commands for blackboard bold + ("\\mathbb{B}" . ?=F0=9D=94=B9) ; Also sometimes \mathbb. + ("\\mathbb{C}" . ?=E2=84=82) + ("\\mathbb{D}" . ?=F0=9D=94=BB) + ("\\mathbb{E}" . ?=F0=9D=94=BC) + ("\\mathbb{F}" . ?=F0=9D=94=BD) + ("\\mathbb{G}" . ?=F0=9D=94=BE) + ("\\mathbb{H}" . ?=E2=84=8D) + ("\\mathbb{I}" . ?=F0=9D=95=80) + ("\\mathbb{J}" . ?=F0=9D=95=81) + ("\\mathbb{K}" . ?=F0=9D=95=82) + ("\\mathbb{L}" . ?=F0=9D=95=83) + ("\\mathbb{M}" . ?=F0=9D=95=84) + ("\\mathbb{N}" . ?=E2=84=95) + ("\\mathbb{O}" . ?=F0=9D=95=86) + ("\\mathbb{P}" . ?=E2=84=99) ("\\mathbb{Q}" . ?=E2=84=9A) ("\\mathbb{R}" . ?=E2=84=9D) + ("\\mathbb{S}" . ?=F0=9D=95=8A) ("\\mathbb{T}" . ?=F0=9D=95=8B) + ("\\mathbb{U}" . ?=F0=9D=95=8C) + ("\\mathbb{V}" . ?=F0=9D=95=8D) + ("\\mathbb{W}" . ?=F0=9D=95=8E) + ("\\mathbb{X}" . ?=F0=9D=95=8F) + ("\\mathbb{Y}" . ?=F0=9D=95=90) ("\\mathbb{Z}" . ?=E2=84=A4) ("\\pm" . ?=C2=B1) + ("\\pounds" . ?=C2=A3) ("\\|" . ?=E2=80=96) ("\\varkappa" . ?=CF=B0) ;; caligraphic @@ -3738,7 +3792,122 @@ tex--prettify-symbols-alist ("\\textdivorced" . ?=E2=9A=AE) ("\\textlbrackdbl" . 10214) ; Literal ?=E2=9F=A6 breaks indentation ("\\textrbrackdbl" . 10215) ; Literal ?=E2=9F=A7 breaks indentation - ("\\textinterrobangdown" . ?=E2=B8=98)) + ("\\textinterrobangdown" . ?=E2=B8=98) + + ;; Accented characters + ("{\\'a}" . ?=C3=A1) + ("{\\'e}" . ?=C3=A9) + ("{\\'i}" . ?=C3=AD) + ("{\\'o}" . ?=C3=B3) + ("{\\'u}" . ?=C3=BA) + ("{\\'A}" . ?=C3=81) + ("{\\'E}" . ?=C3=89) + ("{\\'I}" . ?=C3=8D) + ("{\\'O}" . ?=C3=93) + ("{\\'U}" . ?=C3=9A) + ("{\\`a}" . ?=C3=A0) + ("{\\`e}" . ?=C3=A8) + ("{\\`i}" . ?=C3=AC) + ("{\\`o}" . ?=C3=B2) + ("{\\`u}" . ?=C3=B9) + ("{\\`A}" . ?=C3=80) + ("{\\`E}" . ?=C3=88) + ("{\\`I}" . ?=C3=8C) + ("{\\`O}" . ?=C3=92) + ("{\\`U}" . ?=C3=99) + ("{\\^a}" . ?=C3=A2) + ("{\\^e}" . ?=C3=AA) + ("{\\^i}" . ?=C3=AE) + ("{\\^o}" . ?=C3=B4) + ("{\\^u}" . ?=C3=BB) + ("{\\^A}" . ?=C3=82) + ("{\\^E}" . ?=C3=8A) + ("{\\^I}" . ?=C3=8E) + ("{\\^O}" . ?=C3=94) + ("{\\^U}" . ?=C3=9B) + ("{\\\"a}" . ?=C3=A4) + ("{\\\"e}" . ?=C3=AB) + ("{\\\"i}" . ?=C3=AF) + ("{\\\"o}" . ?=C3=B6) + ("{\\\"u}" . ?=C3=BC) + ("{\\\"A}" . ?=C3=84) + ("{\\\"E}" . ?=C3=8B) + ("{\\\"I}" . ?=C3=8F) + ("{\\\"O}" . ?=C3=96) + ("{\\\"U}" . ?=C3=9C) + ("{\\~a}" . ?=C3=A3) + ("{\\~n}" . ?=C3=B1) + ("{\\~o}" . ?=C3=B5) + ("{\\~A}" . ?=C3=83) + ("{\\~N}" . ?=C3=91) + ("{\\~O}" . ?=C3=95) + ("{\\c{c}}" . ?=C3=A7) + ("{\\c{C}}" . ?=C3=87) + ("{\\o}" . ?=C3=B8) + ("{\\O}" . ?=C3=98) + ("{\\aa}" . ?=C3=A5) + ("{\\AA}" . ?=C3=85) + ("{\\ae}" . ?=C3=A6) + ("{\\AE}" . ?=C3=86) + ("{\\ss}" . ?=C3=9F) + ("{\\l}" . ?=C5=82) + ("{\\L}" . ?=C5=81) + ("{\\i}" . ?=C4=B1) + ("{\\j}" . ?=C8=B7) + ("{\\oe}" . ?=C5=93) + ("{\\OE}" . ?=C5=92) + + ;; TeX quotes + ("``" . ?=E2=80=9C) + ("''" . ?=E2=80=9D) + + ;; Unicode Fractions + ("\\frac{1}{2}" . "=C2=BD") + ("\\frac{1}{3}" . "=E2=85=93") + ("\\frac{2}{3}" . "=E2=85=94") + ("\\frac{1}{4}" . "=C2=BC") + ("\\frac{3}{4}" . "=C2=BE") + ("\\frac{1}{5}" . "=E2=85=95") + ("\\frac{2}{5}" . "=E2=85=96") + ("\\frac{3}{5}" . "=E2=85=97") + ("\\frac{4}{5}" . "=E2=85=98") + ("\\frac{1}{6}" . "=E2=85=99") + ("\\frac{5}{6}" . "=E2=85=9A") + ("\\frac{1}{7}" . "=E2=85=90") + ("\\frac{1}{8}" . "=E2=85=9B") + ("\\frac{3}{8}" . "=E2=85=9C") + ("\\frac{5}{8}" . "=E2=85=9D") + ("\\frac{7}{8}" . "=E2=85=9E") + ("\\frac{1}{9}" . "=E2=85=91") + ("\\frac{1}{10}" . "=E2=85=92") + ("\\tfrac{1}{2}" . "=C2=BD") + ("\\tfrac{1}{3}" . "=E2=85=93") + ("\\tfrac{2}{3}" . "=E2=85=94") + ("\\tfrac{1}{4}" . "=C2=BC") + ("\\tfrac{3}{4}" . "=C2=BE") + ("\\tfrac{1}{5}" . "=E2=85=95") + ("\\tfrac{2}{5}" . "=E2=85=96") + ("\\tfrac{3}{5}" . "=E2=85=97") + ("\\tfrac{4}{5}" . "=E2=85=98") + ("\\tfrac{1}{6}" . "=E2=85=99") + ("\\tfrac{5}{6}" . "=E2=85=9A") + ("\\tfrac{1}{7}" . "=E2=85=90") + ("\\tfrac{1}{8}" . "=E2=85=9B") + ("\\tfrac{3}{8}" . "=E2=85=9C") + ("\\tfrac{5}{8}" . "=E2=85=9D") + ("\\tfrac{7}{8}" . "=E2=85=9E") + ("\\tfrac{1}{9}" . "=E2=85=91") + ("\\tfrac{1}{10}" . "=E2=85=92") + + ;; Other symbols + ("\\S" . ?=C2=A7) + ("\\Finv" . ?=E2=84=B2) + ("\\Game" . ?=E2=85=81) + ("\\ " . 9141) ; Literal ?=E2=8E=B5 breaks indentation + ("\\lvert" . ?|) + ("\\rvert" . ?|) + ("\\lVert" . ?=E2=80=96) + ("\\rVert" . ?=E2=80=96)) "A `prettify-symbols-alist' usable for (La)TeX modes.") =20 (defun tex--prettify-symbols-compose-p (_start end _match) --=20 2.39.3 (Apple Git-145) --=-=-=--
"Paul D. Nelson" <ultrono@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#77381
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.