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#61948: 29.0.60; window-at returns nil when tab-bar-mode is on Date: Sat, 04 Mar 2023 10:50:00 +0200 Message-ID: <835ybgc347.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36769"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61948@debbugs.gnu.org To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 04 09:51: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 1pYNbw-0009Pb-Ur for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Mar 2023 09:51:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYNbg-00004y-C1; Sat, 04 Mar 2023 03:51:08 -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 1pYNbb-0008WL-0r for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 03:51:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pYNba-00029g-Nu for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 03:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pYNba-0002Rc-Fg for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 03:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Mar 2023 08:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61948 X-GNU-PR-Package: emacs Original-Received: via spool by 61948-submit@debbugs.gnu.org id=B61948.16779198209341 (code B ref 61948); Sat, 04 Mar 2023 08:51:02 +0000 Original-Received: (at 61948) by debbugs.gnu.org; 4 Mar 2023 08:50:20 +0000 Original-Received: from localhost ([127.0.0.1]:35225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYNat-0002Qb-Vt for submit@debbugs.gnu.org; Sat, 04 Mar 2023 03:50:20 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYNas-0002QO-MP for 61948@debbugs.gnu.org; Sat, 04 Mar 2023 03:50:19 -0500 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 1pYNan-0001yU-CJ; Sat, 04 Mar 2023 03:50:13 -0500 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=4kiOPnSueE2wQqjH2yvpOwlzqn0S4TaLHvHUJ7alIxg=; b=G9FdFzm+ijmQ YPoiu5rVuBsplBNvX/hzwfVK73mGBFt5k3j4urDbTF/uiaCvat1FEvE9ppSU8C3ajpERR2eMbBAPl kCVB7xwNXJIbZf9OyyIX9ggpl0nEDTZwzt4RRxgcEeZK8SPxGKem6ofrzWVa6Tp65D9mhbCW9S2pi j1kj9zavETwv8CMtH/8DR+SLDQ1lO9cawLrrtFttb94LR0gageIVoI3neSQ29cspJTKSQTeC2C2Bk 9Gahm9nZlw01+rV8zVuDyNdjIcR8/nJX6vBdEBLMtGYtOdkeBOFRCaQiYwZh2fyEr4nnSkEUvptzz XqoK98mOCj5bZ47KQs8TOw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYNam-0001l3-Hj; Sat, 04 Mar 2023 03:50:12 -0500 In-Reply-To: (message from Yuan Fu on Fri, 3 Mar 2023 19:02:06 -0800) 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:257259 Archived-At: > From: Yuan Fu > Date: Fri, 3 Mar 2023 19:02:06 -0800 > > To reproduce: > > 1. Type C-x t 2 to turn on tab-bar-mode > 2. Evaluate (window-at 0 0), it returns nil > 3. Evaluating (window-at 50 50) also returns nil > 4. Turn off tab-bar-mode, and (window-at 0 0) returns a live window > > window-at-x-y is the same What did you expect the function to return instead in these cases? Both of these functions ignore the tool-bar and the tab-bar pseudo-windows, so as long as the coordinates are inside those two windows, both functions return nil. (This was not called out in their doc strings; I've now added this caveat to the doc strings of these two functions.) So the call with both X and Y zero returns nil because that point is within the area of the frame where these functions always return nil. As for the call with X and Y being 50, it returns nil for different reasons: . for window-at, X and Y are measured in columns and rows, so likely Y = 50 is outside of the frame created by "emacs -Q"; . for window-at-x-y, Y = 50 is still inside the tab-bar pseudo-window; on my system using Y = 53 or larger returns the window showing *scratch*; it could be that the threshold value on your system is a bit different Given the above, do you still think there's a bug here? If so, please describe the real use case where you needed this. Thanks.