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.devel Subject: Re: Making TTY menus more visual Date: Thu, 15 Oct 2020 16:34:39 +0300 Message-ID: <83v9fby5n4.fsf@gnu.org> References: <087df85a965fac6555a755c1bbebf1ea@finder.org> <83r1qhf5ii.fsf@gnu.org> <83wo07g0bf.fsf@gnu.org> <85afa5c0a0a789c6047e92f6ecfa9fcc@finder.org> <72bbff31bcf46be917c9e8d8236cad75@finder.org> <838scmfq4f.fsf@gnu.org> <83y2kme50p.fsf@gnu.org> <033517da1ce6762b3d3c656dad4d8f98@finder.org> <835z7pdvcp.fsf@gnu.org> <0168b49ea0f2b5533f6e20c6ad73eb0c@finder.org> <835z7l876k.fsf@gnu.org> <54d686f28c49c0b86c4a52ba48cf2486@finder.org> <83sgan5to0.fsf@gnu.org> <78d53fb994e86bb2d8c7fd313cdfa8a2@finder.org> <83blha5yla.fsf@gnu.org> <184d04bc36d1a7204238d8508ec48531@finder.org> <83362j4i58.fsf@gnu.org> <8a6b6ce3f194ccf418709fe46ce0f1bb@finder.org> <834kmy2o23.fsf@gnu.org> <6b4037dadb0061bfc35cc45c5149c1ac@finder.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25351"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Jared Finder Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 15 15:35:24 2020 Return-path: Envelope-to: ged-emacs-devel@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 1kT3Pf-0006SA-N5 for ged-emacs-devel@m.gmane-mx.org; Thu, 15 Oct 2020 15:35:23 +0200 Original-Received: from localhost ([::1]:56668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kT3Pe-000845-Lx for ged-emacs-devel@m.gmane-mx.org; Thu, 15 Oct 2020 09:35:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kT3Ol-0006v3-P4 for emacs-devel@gnu.org; Thu, 15 Oct 2020 09:34:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50419) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kT3Ol-00083u-6Y; Thu, 15 Oct 2020 09:34:27 -0400 Original-Received: from [176.228.60.248] (port=4499 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kT3Ok-0002W3-Hq; Thu, 15 Oct 2020 09:34:27 -0400 In-Reply-To: <6b4037dadb0061bfc35cc45c5149c1ac@finder.org> (message from Jared Finder on Tue, 13 Oct 2020 18:59:01 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:257725 Archived-At: > Date: Tue, 13 Oct 2020 18:59:01 -0700 > From: Jared Finder > Cc: emacs-devel@gnu.org > > > Are you sure posn-window cannot return a frame? For example, on a > > TTY, I get this: > > > > (posn-at-x-y 0 0 (selected-frame)) > > => (# nil (0 . 0) 0) > > > > And (0,0) are coordinates in the frame's menu bar. > > A ha! A bug! Behavior is different depending on options selected at > configure time. > > Behavior with ./configure --with-x=no: > (posn-at-x-y 0 0 (selected-frame)) > => (nil nil (0 . 0) 0) > (selected-frame) > => # > > Behavior with ./configure --with-x=yes: > (posn-at-x-y 0 0 (selected-frame)) > => (# nil (0 . 0) 0) > (selected-frame) > => # > > This bug has been around a while, on Debian (Emacs 26.1), emacs-no-x vs > emacs-gtk shows the same difference in behavior. Right. > Do you have a preference for a fix? Some options: > [...] > I found at one other behavior difference, if you pass in out of bounds > coordinates (example: 1000 0 for a TTY), --with-x=no you get the value > as if you passed in 0 0, but --with-x=yes assumes the coordinate is > valid. There are probably other differences. I can do a pass over this > function, I'd like to know the razor to use. These all are due to the same problem: too early exclusion of code in builds --without-x. I think I fixed this on the emacs-27 branch. (While at that, I also fixed the documentation by adding the description of the POSITION in this case.) I don't think it's right to change the meaning of the WINDOW part of a click even at this point: the current behavior is very old, and the fact it's called WINDOW doesn't mean it cannot be a frame in some cases, assuming we document that. > > Does it make sense to install this patch on its own? If so, we can > > install it without waiting for the legal paperwork, the changes are > > small enough. > > Yes, the issue existed prior to my changes when using TMM in a terminal. OK, I will install that soon. Thanks.