From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64440: 30.0.50; [PATCH] Highlight on non toolkit menu bar items Date: Mon, 11 Sep 2023 18:58:39 +0300 Message-ID: <835y4gr9ao.fsf@gnu.org> References: <87zg4d56l8.fsf@ledu-giraud.fr> <87ilaz1wol.fsf@ledu-giraud.fr> <87fs3xo13z.fsf@yahoo.com> <83zg259iwz.fsf@gnu.org> <878r9losil.fsf@ledu-giraud.fr> <83tts2scvp.fsf@gnu.org> <87cyyo28m0.fsf@ledu-giraud.fr> <83cyyorfnr.fsf@gnu.org> <87r0n4sqm8.fsf@ledu-giraud.fr> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31867"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, stefankangas@gmail.com, 64440@debbugs.gnu.org To: Manuel Giraud Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 11 18:00:26 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qfjKq-00084r-5B for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 11 Sep 2023 18:00:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qfjKS-0001gm-DR; Mon, 11 Sep 2023 12:00:00 -0400 Original-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 ) id 1qfjKR-0001gL-0m for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2023 11:59:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qfjKQ-0000mR-OQ for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2023 11:59:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qfjKU-0006Ev-R5 for bug-gnu-emacs@gnu.org; Mon, 11 Sep 2023 12:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Sep 2023 16:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64440 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 64440-submit@debbugs.gnu.org id=B64440.169444795823902 (code B ref 64440); Mon, 11 Sep 2023 16:00:02 +0000 Original-Received: (at 64440) by debbugs.gnu.org; 11 Sep 2023 15:59:18 +0000 Original-Received: from localhost ([127.0.0.1]:54579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfjJl-0006DS-VP for submit@debbugs.gnu.org; Mon, 11 Sep 2023 11:59:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfjJj-0006DD-OG for 64440@debbugs.gnu.org; Mon, 11 Sep 2023 11:59:16 -0400 Original-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 ) id 1qfjJZ-0000UO-J1; Mon, 11 Sep 2023 11:59:05 -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=9OkO5NqCFgDbCivMgL2aKzjNaWv3Vu41m0S3XsX3Cec=; b=QLyhg295mbrD wFo6pFfoHvSSHjTCpgz6tr/T1IvULl5TxCOONPuSZGeYAXqWb5037YALNEaS1jg9uhh79T4jIBkgR XE286H/0VFHFTepiuCkVw7bBL0qlt4frMH0y2TrZnpG1+9CuSLgfN4ioSpLyVAHp9d7Rn/wDy/9ry yU53Ox2VDOuFkAwrjCMamtjedtAIWOALe5zjjsQSxXa40aqE5N3nBzVBJcXjyv9pcVIjvFm4KjQiq ZByA2RscWz6RRMIPEbOPz2N7WxrPRhZJz8Q52DXEpzC5EugG038CAWIlCfhg1n6LCnJaxsVyAukMO ZbGxgmQT1yneg/w0I50vUg==; In-Reply-To: <87r0n4sqm8.fsf@ledu-giraud.fr> (message from Manuel Giraud on Mon, 11 Sep 2023 16:59:11 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:270058 Archived-At: > From: Manuel Giraud > Cc: luangruo@yahoo.com, stefankangas@gmail.com, 64440@debbugs.gnu.org > Date: Mon, 11 Sep 2023 16:59:11 +0200 > > Eli Zaretskii writes: > > [...] > > >> Is that what you are looking for? > > > > This gives some of the answers, but the command 'pgrow' (defined on > > src/.gdbinit) would have done that better, and would also show the > > glyphs themselves. Can you show what 'pgrow' produces in this case? > > Here is what I get: > > (gdb) pgrow > TEXT: 120 glyphs > 0 0: CHAR[F] str=0x66f834da[0] blev=0,btyp=L w=7 a+d=11+2 face=10 > 1 7: CHAR[i] str=0x66f834da[1] blev=0,btyp=L w=7 a+d=11+2 face=10 > 2 14: CHAR[l] str=0x66f834da[2] blev=0,btyp=L w=7 a+d=11+2 face=10 > 3 21: CHAR[e] str=0x66f834da[3] blev=0,btyp=L w=7 a+d=11+2 face=10 > 4 28: CHAR[ ] str=0x66f834da[-1] blev=0,btyp=B w=7 a+d=11+2 face=10 > 5 35: CHAR[E] str=0x66fede1c[0] blev=0,btyp=L w=7 a+d=11+2 face=10 > 6 42: CHAR[d] str=0x66fede1c[1] blev=0,btyp=L w=7 a+d=11+2 face=10 > 7 49: CHAR[i] str=0x66fede1c[2] blev=0,btyp=L w=7 a+d=11+2 face=10 > 8 56: CHAR[t] str=0x66fede1c[3] blev=0,btyp=L w=7 a+d=11+2 face=10 > 9 63: CHAR[ ] str=0x66fede1c[-1] blev=0,btyp=B w=7 a+d=11+2 face=10 Thanks. That's what I imagined we have there. So I guess considering that a string ends where is SCHARS end is reasonable. But note that the above means you could also detect where each item ends by looking for the glyph whose string position is -1. So maybe add an assertion there that the glyph after the last character has its position as -1, in case we could have some complications there with double-width characters or something.