From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#75024: [PATCH] Fix check for underlining capability on ttys Date: Sun, 05 Jan 2025 05:08:07 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6733"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Mohsin Kaleem To: 75024@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 05 05:09:21 2025 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 1tUHx2-0001av-QF for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jan 2025 05:09:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUHwl-0006X3-VF; Sat, 04 Jan 2025 23:09:04 -0500 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 1tUHwk-0006Wa-IY for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 23:09:02 -0500 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 1tUHwk-00011U-9Z for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 23:09:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=xi1uFWVVzF9L3BUsWwjw342P+Yo/8ds5o6aURYv/sus=; b=PBYTBdP02lyXS4JdK8EYDEQAF5VC6slU0i3Tdxnnjw0ROj1FofA7aYgggSkJUtSjDjFhxtcBrT2H1XJJNB1Mtrti9D4I/IJ65Eg5ru1gqo69YbW85ocU0Wd7tZrStglQWyadrzTIJdLiHWMMUe2LlFKvDW7uqRppWC27JkVPyLpuVPc4kDmpqm4o1n+sVfj6wQf68vKq/d1SjeIkwpXnxQIFrITiIKp4KGWzL5tGyHvXlPLlfmdQTkWWjSO35NrNa8V3WD838yR2ZsNi//zQ0Z/hzjePz/aTWkbG3h8qooSU9qgKTwBpzdq4Nxt+J19huREuZv18pXiIaVgHXdVCig==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUHwj-0007JU-OC for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 23:09:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jan 2025 04:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75024 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 75024-submit@debbugs.gnu.org id=B75024.173605009628057 (code B ref 75024); Sun, 05 Jan 2025 04:09:01 +0000 Original-Received: (at 75024) by debbugs.gnu.org; 5 Jan 2025 04:08:16 +0000 Original-Received: from localhost ([127.0.0.1]:58266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUHvz-0007IT-U6 for submit@debbugs.gnu.org; Sat, 04 Jan 2025 23:08:16 -0500 Original-Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:52424) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tUHvw-0007II-28 for 75024@debbugs.gnu.org; Sat, 04 Jan 2025 23:08:14 -0500 Original-Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3862ca8e0bbso10194694f8f.0 for <75024@debbugs.gnu.org>; Sat, 04 Jan 2025 20:08:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736050090; x=1736654890; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xi1uFWVVzF9L3BUsWwjw342P+Yo/8ds5o6aURYv/sus=; b=KH7xug+9XTHK6AVwyAzh6CFPjqVe1z3HfMqN7kmcu7Wwz1Bn0Yhuh/pF368YhksT7w Bc32SCXVBXPvde+Y+XfsCwTUnahlN43T0qtGoVgn3XBwPtfZo2MeUgs5cZPFcK8YobUk G9wVVuay1tuqr6wOUkX8fk3Ko4mZWuE3SlYZtZPVufYhaKjpOJnIgv0T2fowUfprSxcY HItfrwF0HE210oNnsgamPblhWUZZKJjhVLz7yPLoMaqren8wSl+5v5lvu2PlEimfzcS2 kumiv/xSOl2Ruj1fpuM0MebJzGZFMbBJvGGISEYIkKRxSCF2xcCbyzYjpHGVo57iNt9L OHLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736050090; x=1736654890; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=xi1uFWVVzF9L3BUsWwjw342P+Yo/8ds5o6aURYv/sus=; b=OziYfTIULaKNjermHXnFayTekAiSFVInvxO+K0iH1bDft+jmhHT9PHlnhZVlk3rwDI B7XT0aYLmenVNH3OS3z6lrrFPOXAAZiLlTDQ23uQAgQ+vKRht8KdkHMOIfPkO8Ns4N3y C5vW5wHzf9fE0LmLdfOsokmijYgYRRobXMubR+uf1GD6O+Ly3iC94R+PhIVJLtmdvkOg At1bg58BQUMd0Q8x6UnXYuJN8uBCP/zIi02/ztRmcpe0aLdFEsj5dXnosSUZPdkgefCG PUa6ypbrO4PorO5UE5BSIv2DkBAu0XlYEUOJ8r3et3QK4p+f2ESn2DBmmUHLHZf5MmhN w1jA== X-Gm-Message-State: AOJu0YwH7wDYwxPkkwAz55AY1xmtnhL3/6iSV9L25htaojy3aPOHzQr4 fcug+ofAH+GqGhnkjn1G9OOZY8s+ADIIbnZZux6hYQ+6jAmulmYH X-Gm-Gg: ASbGncuvOlDilLjPxY9w5yeYtgco/vdrmEE9v9xYltWm8DjJeH23mB44rmjZdTuzvn4 thn9yCUj8DLn06YJ3K4GvAtiAGzOpjomWTfLDjGopuEc581sidhkLfxdHzoOKyj6bRq4+bRwKxY lNBwjxIsS8SH1aft+NG9D1IvX/PabcHCqJz9ZzPD+ZLiCXqQgY3iDwvr4cFWG4unjrwCfWhbfpl FEhUJLLlH9KWOxPetURG91QY4XE8hqK0oSaOATW2SGvol3GQagCzG6aQgC5EPkRwmcEKSBAeM7c Wu5ShiKX4tEG2xQwXp9MfHoKy6uoYRhCFNPpPA+y2am9P+DIE66HQ9tv/HFa480pbw== X-Google-Smtp-Source: AGHT+IEK7wDyXw+0vilVaV0+dN4iW6PiXgnnNj1oWKEGcBrtPAl0ZOENoMnLkp4GMzaZ09BdVWv62A== X-Received: by 2002:a5d:5f4f:0:b0:386:375a:8322 with SMTP id ffacd0b85a97d-38a221ea68cmr46738957f8f.13.1736050090367; Sat, 04 Jan 2025 20:08:10 -0800 (PST) Original-Received: from pro2 (p200300e0b747500078d774d9859911e7.dip0.t-ipconnect.de. [2003:e0:b747:5000:78d7:74d9:8599:11e7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8a8d32sm44901663f8f.99.2025.01.04.20.08.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jan 2025 20:08:09 -0800 (PST) In-Reply-To: ("Gerd =?UTF-8?Q?M=C3=B6llmann?="'s message of "Mon, 23 Dec 2024 08:54:29 +0100") 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:298492 Archived-At: Hi Mohsin, friendly ping. Could you find the time to look at this? Gerd M=C3=B6llmann writes: > Gerd M=C3=B6llmann writes: > >> Gerd M=C3=B6llmann writes: >> >>> Tags: patch >> >> Please disregard the patch. I'll send another one later. > > I meanwhile found this, to my great surprise: > > #define TTY_CAP_UNDERLINE_STYLED (0x32 & TTY_CAP_UNDERLINE) > > That makes TTY_CAP_UNDERLINE_STYLED =3D=3D TTY_CAP_UNDERLINE. And this te= st > in tty_capable_p > > TTY_CAPABLE_P_TRY (tty, > TTY_CAP_UNDERLINE, tty->TS_enter_underline_mode, > NC_UNDERLINE); > TTY_CAPABLE_P_TRY (tty, > TTY_CAP_UNDERLINE_STYLED, tty->TF_set_underline_style, > > fails because it tests TTY_CAP_UNDERLINE twice, and requires both > TS_enter_underline_mode and TF_set_underline_style to be usable for > underline support. In Terminal.app, only TS_enter_underline_mode is > available. > > Maybe this should have been=20 > > #define TTY_CAP_UNDERLINE_STYLED 0x40 > > ? > > BTW, the 0x32 also also makes no sense to me because of=20 > > #define TTY_CAP_ITALIC 0x10 > #define TTY_CAP_STRIKE_THROUGH 0x20 > > CC to the original author to check.