From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#61948: 29.0.60; window-at returns nil when tab-bar-mode is on Date: Sat, 4 Mar 2023 01:18:02 -0800 Message-ID: <5DA528E3-C406-44FC-B286-BB5EA6E52C0D@gmail.com> References: <835ybgc347.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) 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="6522"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 61948@debbugs.gnu.org, 61948-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 04 10:19: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 1pYO33-0001RQ-J3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Mar 2023 10:19:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYO2i-0003lp-UV; Sat, 04 Mar 2023 04:19: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 1pYO2h-0003lM-8l for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 04:19: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 1pYO2g-0007kv-G2 for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 04:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pYO2f-00037O-Tn for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 04:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Mar 2023 09:19:01 +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.167792150311927 (code B ref 61948); Sat, 04 Mar 2023 09:19:01 +0000 Original-Received: (at 61948) by debbugs.gnu.org; 4 Mar 2023 09:18:23 +0000 Original-Received: from localhost ([127.0.0.1]:35235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYO23-00036J-1E for submit@debbugs.gnu.org; Sat, 04 Mar 2023 04:18:23 -0500 Original-Received: from mail-pg1-f172.google.com ([209.85.215.172]:36620) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYO20-000362-LC; Sat, 04 Mar 2023 04:18:21 -0500 Original-Received: by mail-pg1-f172.google.com with SMTP id 130so2816817pgg.3; Sat, 04 Mar 2023 01:18:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677921494; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7Vivfmyp67HZJajGj97f+bZUQcK2PD7VXLdb2UW2qKI=; b=j4Y7RZRyLpgx5hHJqRdXtKM0vxTD6105QtLWkBSelxF+MlF6KlAQ5/RlLc2Au2l4RR N1s/GTzxu9d55L/XqQ2qcxk4xGgTr/tR2vHqruwBfvegEsmI3Td6vz70lv+41AsxrAoX cFOxYoM7cPUL8b8mn6ec8fiZC7eA21q2bImXpkIIlCEdrTeQQV/HXOqy6rmQa9mDmFaC Gr6TbY+p9OyrNVrk5N/coP5C9tEVOpQu1pPqqyoJ6x8stLirEK7Y3QRW48tKxbXvH0hI LSTPwt38UEHVegRe60/WpqB1dzs8sJVeZgBYIcym2TtNW39YnwB+T+wLDQcdpb1sHMt2 hm3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677921494; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7Vivfmyp67HZJajGj97f+bZUQcK2PD7VXLdb2UW2qKI=; b=B4R3bxf+RHqZ93KwCdH2znTULK1ukJ2WUhXAhhkZWXKKTv4wjJhAszzH1r1l4ccQoo 9D9S2FnQFLYgJx9WLR3hrb3fyw+bBKmuOihvfV4FYg70MSBVcMO0Nb6j7otLLC6ncRsp 2vWCGYrfhzzXPXhOgkZsMetsI+anml6GNkRPE81NReGUsZP4T57pPA+IYCvSxGKdUeo3 w7CaCi9EDapBviNeNkSFQx6wpatbAmQlAEhB0hVItiJiM2k1JKYRY7K61rC4yuE8V9sa 0veOV5dc6mJ+Nzvjv82il/7dyz8gzBSt3XJU/Fk6kXATxjBqLPmQQqS8MMS5f73Y+BLf BxAw== X-Gm-Message-State: AO0yUKWJ/KB+TkURoz0Oovrb5Z5NzHQyZ1Nh3CwrCEVGU0lGD9RS2nr1 +Qwky92PxGB+QAOvhijTNII= X-Google-Smtp-Source: AK7set9sHFg8FthIYByMYHSAHaBvylDCKpyMntlLwjO04ZH86YLripCfNhJdaVHiTGNybLV4sSOXVA== X-Received: by 2002:a62:4e43:0:b0:5a8:b649:99d4 with SMTP id c64-20020a624e43000000b005a8b64999d4mr4856340pfb.7.1677921494475; Sat, 04 Mar 2023 01:18:14 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id m22-20020a63ed56000000b005036bbe6812sm2795545pgk.65.2023.03.04.01.18.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Mar 2023 01:18:14 -0800 (PST) In-Reply-To: <835ybgc347.fsf@gnu.org> X-Mailer: Apple Mail (2.3731.400.51.1.1) 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:257261 Archived-At: > On Mar 4, 2023, at 12:50 AM, Eli Zaretskii wrote: >=20 >> From: Yuan Fu >> Date: Fri, 3 Mar 2023 19:02:06 -0800 >>=20 >> To reproduce: >>=20 >> 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 >>=20 >> window-at-x-y is the same >=20 > What did you expect the function to return instead in these cases? >=20 > 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.) >=20 > 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. >=20 > As for the call with X and Y being 50, it returns nil for different > reasons: >=20 > . for window-at, X and Y are measured in columns and rows, so likely > Y =3D 50 is outside of the frame created by "emacs -Q"; > . for window-at-x-y, Y =3D 50 is still inside the tab-bar > pseudo-window; on my system using Y =3D 53 or larger returns the > window showing *scratch*; it could be that the threshold value on > your system is a bit different >=20 > Given the above, do you still think there's a bug here? If so, please > describe the real use case where you needed this. >=20 > Thanks. Ah! Should=E2=80=99ve tried (window-at-x-y 100 100). In my brain 50 = pixels is pretty far so I thought (50 . 50) must be in a window. Indeed, it=E2=80=99s a false alarm. Sorry for the noise.=20 Yuan=