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#73838: 31.0.50; Problems in note_mouse_highlight if -nw Date: Wed, 16 Oct 2024 21:03:15 +0200 Message-ID: References: <86r08goy76.fsf@gnu.org> <86msj3q4t0.fsf@gnu.org> 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="23185"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73838@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 16 21:05:05 2024 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 1t19KT-0005rt-Cr for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Oct 2024 21:05:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t19K8-0008Ma-0K; Wed, 16 Oct 2024 15:04:44 -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 1t19K6-0008KM-NR for bug-gnu-emacs@gnu.org; Wed, 16 Oct 2024 15:04:42 -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 1t19K6-0000TK-E0 for bug-gnu-emacs@gnu.org; Wed, 16 Oct 2024 15:04:42 -0400 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=CIWSmiJpnGG0Aj9OKtRzhQIcbOyMTyHSxJFDcFstslI=; b=MAD1GkxlzFyjfOT/j5F3RYuZwQYv5ASewWCCiAfb56724eb3JAHzKDo2Mo679uwI34/NJBaH9ngXADAUsWF5sxqC0kL2jfAzc+bXDjMFXYzLJrpUWKeZBgo+f+BF1znvltpRG6rg36xtHlv0uq+Yg42bon2sNixISoRIIBTnzoozNkj7FXXuGBijX3kqLYfNA5eFGi1xT5hl0j6vZWaSQ6wc1LuKwubj3NOKeQ48ruFO0qTGPs8CBxOWQR3c/dNdfpsFLBvHzLA4Aiw6i/9M0vQp0PbJMqrVcwR2oJ/flEAInjWf7m70Jqu8JfrMqk0GxagPluXshnItOC8oNp3jBg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t19KP-0008Gy-RQ for bug-gnu-emacs@gnu.org; Wed, 16 Oct 2024 15:05:01 -0400 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: Wed, 16 Oct 2024 19:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73838 X-GNU-PR-Package: emacs Original-Received: via spool by 73838-submit@debbugs.gnu.org id=B73838.172910548631770 (code B ref 73838); Wed, 16 Oct 2024 19:05:01 +0000 Original-Received: (at 73838) by debbugs.gnu.org; 16 Oct 2024 19:04:46 +0000 Original-Received: from localhost ([127.0.0.1]:60498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t19K9-0008GL-La for submit@debbugs.gnu.org; Wed, 16 Oct 2024 15:04:46 -0400 Original-Received: from mail-wm1-f52.google.com ([209.85.128.52]:53439) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t19K7-0008G4-AG for 73838@debbugs.gnu.org; Wed, 16 Oct 2024 15:04:44 -0400 Original-Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-43117ed8adbso2107885e9.2 for <73838@debbugs.gnu.org>; Wed, 16 Oct 2024 12:04:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729105397; x=1729710197; 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=CIWSmiJpnGG0Aj9OKtRzhQIcbOyMTyHSxJFDcFstslI=; b=ZJ2X0QOlQEWvfnsmKarh4UzVhcY4DjCAgUnW0gKRs695sSsXi7HXoeKoGqw1AEqVMk 5h4mEe2sn27P2DJXB46gSI1qezEo1aZg7z547sW8g/gAmHjRbL9d/LKz8FHJPxLj0XiV dWWEjgIyU46VRy9jdkjkXHTpmR8Yn2YOtJ+VFklhRfsonnoJFEdibtW37tmYTqjxqksm 3izZt8rYNHf8L/0p8zCe6oJhvpWYj3WXtZzuk5MoINpZCSqfdcA0fAPW4eiWFDanfA46 Z9gBp8NWDRojA4re+hYcDs5TH71I0+A6Up906zOz+deHhEpef2oH2p/Hb9W5RN52oT8u 8obg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729105397; x=1729710197; 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=CIWSmiJpnGG0Aj9OKtRzhQIcbOyMTyHSxJFDcFstslI=; b=Kb3wsZoiyJzBroF0PDor8f7RZ6MaTrJ3EHT43RbUfTsjNLOATes6HNfmTYLtQ8Ru2+ 524yH5EvnnhysLLikNUzcSLeZkh+knWNrkNFcKeEyHYpY34TUZbbhZSIEFcguIZbcLc4 wLw1UvzVFkkHG9hhtaJUkgggviVWxSTMHm7FeBFZXZJE5/xzyNyiwRrKmeN0yhYsuIu+ Vc1kD79vtHGJ5CZFahxVxaeQNz5/4UFbHSIXzDYs3ukhxE/pE5LnEsOG/022YKz+MQO7 IM3FACLyPzVeG54yMeWHRwb5Y1G41XaIPTEpHfQyV2VjCf8BlLZOqnnOxT906dgaYJdR CN4A== X-Gm-Message-State: AOJu0YyDpsmSlvxnxptaazqAdsSxP9hIsOk+/8N1A1abkVjvkXToYauM jrjpXJ0pdjWpcU0uHulJgywNxfJOUtFb0VVxdKFo8Qyt2oDECpnrAqhYIg== X-Google-Smtp-Source: AGHT+IGVMag6moAqHCPSkXmMdMEECDvJL/KJzLq5pkyKjW73ZsQoLNy889xJNcQ1XzHyzs/064p2dw== X-Received: by 2002:a5d:4f85:0:b0:37d:4833:38f5 with SMTP id ffacd0b85a97d-37d5ffa2e1dmr14259236f8f.30.1729105396948; Wed, 16 Oct 2024 12:03:16 -0700 (PDT) Original-Received: from pro2 (pd9e36c48.dip0.t-ipconnect.de. [217.227.108.72]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fa87c27sm5016947f8f.39.2024.10.16.12.03.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 12:03:16 -0700 (PDT) In-Reply-To: <86msj3q4t0.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 16 Oct 2024 21:30:03 +0300") 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:293685 Archived-At: Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: 73838@debbugs.gnu.org >> Date: Wed, 16 Oct 2024 18:56:53 +0200 >>=20 >> Eli Zaretskii writes: >>=20 >> > How can scroll bars happen on TTY frames? >>=20 >> I'll try to answer this a bit more broadly: I'd like the code to be more >> resilient, and not make implicit assumptions about the absence of of >> features on ttys, which when false, leads to such hard to detect errors. >>=20 >> Consider the internal border case. In master, FRAME_INTERNAL_BORDER >> happens to return 0 in master. But that might change, if I ever get >> setting internal borders to work for tty child frames, to draw the >> border there. > > But then we need to audit a lot more than just these bits. E.g., who > will guarantee that FRAME_WINDOW_P is always zero on TTY frames? Quite unlikely, it's the only way we know what is in the output_data union :-). Anyway. > > More seriously, I think we should prefer functional tests to > declarative tests. Which means not to assume that TTY frames can > never have some display feature.=20=20 That would be good. But if I may add that from my experience with the child frames -- we're far from it. > Thus, IMO your suggestion is in a sense a step back, because it > assumes that TTY frames can never have these decorations and can never > have different cursor types. So my suggestion would be to do the > opposite: understand why FRAME_OUTPUT_DATA segfaults when dereferenced > on TTY frames, and fix that so that it doesn't. But the current situation is that we follow from the presence of an internal border that it's a window system frame. We're using FRAME_OUTPUT_DATA. If that would segv it would be a good thing. It doesn't do that, it just silently accesses some unrelated memory (in my case this is equivalent to casting the actual output_data contents to (struct ns_output *) regardless of what it actually is. I've just dragged the FRAME_WINDOW_P out of this stuff because the whole if-statement is concerned with cursor =3D ... using FRAME_OUTPUT_DATA.