From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id eU/wB/pJXGjc9R4AWB0awg (envelope-from ) for ; Wed, 25 Jun 2025 15:11:54 -0400 Received: by simark.ca (Postfix, from userid 112) id 129D21E11E; Wed, 25 Jun 2025 15:11:54 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.0 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 8967D1E0C2 for ; Wed, 25 Jun 2025 15:11:53 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2A8C53856DF0 for ; Wed, 25 Jun 2025 19:11:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A8C53856DF0 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by sourceware.org (Postfix) with ESMTPS id 78C96385AC38 for ; Wed, 25 Jun 2025 19:11:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 78C96385AC38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 78C96385AC38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1750878676; cv=none; b=X4cH4JPKUJ5TTNctTNWXwnE1GQNwb01Y1T5l/H06X6gq4Vbx+WDGE2F/X44bDZbjzl5Sfe8wtckvAI4W9U9Qq1ymz0DreWXjXk2bmk3I6fdWsAkxl9sJC7eYJEI00RO6IgeuS2goirx8BGGNHpQcfXcjtJyK7RakYhtOxsF9hY0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1750878676; c=relaxed/simple; bh=Wl3+1f2lSLEEAGu1AhBai3KB8v0U1bKeVD6voJ0dWU8=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=gXdow6eBO7jxSEI+Z76B0GlB3KseP0yzjVX7L0bYem2we9v09hmIdYSSXv42jMNkfIx/iCzVzdQ1En/nVJuXCaLFHJ4vuyqeyuVHMRy39+uBTzM0H7FilgHfBUR6tjxP3m+vYdyMclFdfqgbOY8SphtKXTCCEfW36bT7PxawhWU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 78C96385AC38 Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4536b8c183cso2052255e9.0 for ; Wed, 25 Jun 2025 12:11:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750878675; x=1751483475; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tNXAkKEy6sq2hsgSoJpIH5wr7Qt0ly35P8oAqyWXEnQ=; b=e6cByrODhpQujKrocKc0fBT21vuTu3r5Euq4jD8gsBAouR7JnTGuPAnpqtjYU6l5LE 5EzIi4b3fZBv/wMnJGqYAKRJDGK2ewr+NAdoCLwbpuygQzwl97T2M9E+PUzBj80Vfl7H CuEA9DtBUunXUGr9hos9aFDtgiTORSV0o/DqXQXg3DMARABWW/j5LhGa9iIPuSXDEvoJ mhGV/qabzhpOs6YvieURNvrC+CPurIJGGucE3mtoCpku4I126kd+rnMFiLFcCMQ3kC1J f3JfFKN9sw7D2RkJmQOqohX1l7DOaJGtxYKUm+40DSz4KqPi8fZDPlL137INd7bttqeA ORlg== X-Forwarded-Encrypted: i=1; AJvYcCUDza5jHgEq/1yBASVdsSyyxZ3P6lKpztuHGysDe2sTZ3bWmf+UcB8WOtsHNLMxlJ0A1db75kxJ+a6Mqw==@sourceware.org X-Gm-Message-State: AOJu0Yz86MpSFcKcDmF1hlfwYZLQTE8SDCFbMUDsvO+6ua3xspeQfI1O vuKTSSCFISPXB9Rug9l3F8YqPnFZCJfiEXN3f92xBf6Ym5FEmQzVGL2c X-Gm-Gg: ASbGncsJSvmsR/avYn0LCyG7p/4cJrFd5bb55c/Q6tOEbn0Im7UF3//UU7moI4AHQ1I 3livS8ZYHmgINW2dfhvDtE3oq9L0JZkzzV8NboZu+ZVnbSSOR/6o8s6Hb+pn0Nvhl2rGNB6p5aH dQ29WdtKfD9Arxq+k8xSbguJ4SPsMz8Mt2ZwJq4V5xCwKKHpMDu/OqUizhrNPGE37GiGTXRyiy/ qwMZCRewvA1bYa3dvvOxTFA7jQdHY5IB5VzNP4E9iRv+Tp0Rv8aPRgBBomElqJXecZAcytrQ3qx vN17bOkM76vp4oooS+SlyXTuq+SXxFhFjh6UKhyDl4coN8txU/sQ59dwZ8Kz3fXvaJXFoyebEx2 +sgHsaLKI8tABHsbrwvRMJaxEmVXGBg== X-Google-Smtp-Source: AGHT+IGi8R+I2qxc2iZ7AOUyuAmIO3wTks4qQuTFgxua83M3eWE0iTttvZMAdO271Amj163bSmO/kA== X-Received: by 2002:a05:600c:8210:b0:453:92e:a459 with SMTP id 5b1f17b1804b1-45388a14811mr6865685e9.16.1750878674921; Wed, 25 Jun 2025 12:11:14 -0700 (PDT) Received: from ?IPV6:2001:8a0:fac3:6d00:5314:95f5:d044:767a? ([2001:8a0:fac3:6d00:5314:95f5:d044:767a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45380d0f15esm30567135e9.1.2025.06.25.12.11.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Jun 2025 12:11:14 -0700 (PDT) Message-ID: Date: Wed, 25 Jun 2025 20:11:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] Allow check-mark to be changed for CLI To: Eli Zaretskii , Tom Tromey Cc: aburgess@redhat.com, gdb-patches@sourceware.org References: <20250509-emoji-check-mark-v1-0-63b6c52411f3@adacore.com> <20250509-emoji-check-mark-v1-2-63b6c52411f3@adacore.com> <87zfffnqrj.fsf@redhat.com> <87wmag63jg.fsf@tromey.com> <86ikm0y1hi.fsf@gnu.org> From: Pedro Alves Content-Language: en-US In-Reply-To: <86ikm0y1hi.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Hi, On 2025-05-16 17:16, Eli Zaretskii wrote: >> From: Tom Tromey >> Cc: Tom Tromey , gdb-patches@sourceware.org >> Date: Fri, 16 May 2025 08:20:03 -0600 >> >>>>>>> "Andrew" == Andrew Burgess writes: >> >> Andrew> Tom Tromey writes: >>>> In keeping with the emojification of gdb, this patch changes the >>>> default "current" marker to be a check-mark. It adds a knob to allow >>>> the character to be changed, and, as always, reverts to the old output >>>> when emojis are disabled. >> >> Andrew> I haven't tested this patch just yet (short of time), but I wonder if I >> Andrew> set the check-mark character to a multi-character string, does that >> Andrew> corrupt the output? I'm guessing so as I don't think table columns >> Andrew> auto-adjust. >> >> Andrew> So my real question: at a minimum, should the docs mention that the >> Andrew> STRING should only be a single character. And better yet, can we check >> Andrew> that the string is only a single character in width somewhere? >> >> Yeah, I will update the docs in v2. >> >> I don't think there's any way to figure out what the display width of a >> string might be. At least, not unless gdb adds a dependency on >> something like libicu. > > I don't think even libicu will be enough, because the terminal > emulators vary in this respect. > > There's some recent protocol to help with this, but I don't think it's > supported widely enough for GDB to rely on it. I'm curious on what protocol is this, and what it addresses. If we assume monospace font in the terminal, what goes wrong? I mean, if someone uses a non-monospace font, then everything will be unaligned anyhow. Is there a downside to using the number of columns wcwidth says the character occupies, and default to 1 if wcwidth returns -1?