From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.devel Subject: xterm-mouse-mode gives incorrect posn-object-x-y with display space Date: Thu, 24 Nov 2022 12:22:44 -0500 Message-ID: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.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="4359"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 24 18:23:36 2022 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 1oyFwl-00010I-Jo for ged-emacs-devel@m.gmane-mx.org; Thu, 24 Nov 2022 18:23:35 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyFw3-0007Zy-7A; Thu, 24 Nov 2022 12:22:51 -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 1oyFw2-0007Zo-HS for emacs-devel@gnu.org; Thu, 24 Nov 2022 12:22:50 -0500 Original-Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oyFw0-0001hz-S1 for emacs-devel@gnu.org; Thu, 24 Nov 2022 12:22:50 -0500 Original-Received: by mail-qt1-x82b.google.com with SMTP id fz10so1344105qtb.3 for ; Thu, 24 Nov 2022 09:22:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=vWFEToucJGbqTxpj/HYDtl0CXD6QbAffwZy+mc2FcvY=; b=SCiMKxLgqEjJokgqEyaSZzjeOCvjo+6kCqE6EuS273AIyv0Ef0eaSaFZYpmQtwY9Kt iA3LqWV0GgJFxjdSzW/aVr9mx4xxM30m+livTHPZDYtMpV/L0Cj6eCfuEr7RosdaISdP 1159yiCuwzaLxnp/VTJxKw/i6ghbwAwXupBF3vfISvHwb3eB/xgcIN2LDI/jRS0MzcJS KFZWh2IfMqAGDksBj2SjlJ0BPF7tVN1NFjcQxzTa9DR94oNTOJuJLO3+5sSqCdL6Iz0R u4uOzuRfe5X2PORyhkke24hQr+QLmz5F1mOa5L0Nbp1R7n4GCY2sVgKwq9sg40FcQhG8 wI+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vWFEToucJGbqTxpj/HYDtl0CXD6QbAffwZy+mc2FcvY=; b=H/Z6qh/lofkO9gHcUNrfe8UvgSwtRpAJnIows80VhikMAYKv6YLjL0RyQbr/su4t4t WlbbJQrCGbTFO0GruG5lu4LTc/u0x8YZI4084WM+kIN8qPxTdRZpZngudfbhsRoCFTUK Iz3SuLoa/6Kd5zE2dwMDyHE2+tg7yQpbSwxV+xTh9IxT7dvPiNPIGx6YdLIx0oGXEv2M /09LALBMOXDo9e0hEUwfrG7HFLFO5e0VgnZFeXa7kU9G7uk3XOFKgCxMp5b0yNfwD+IB pCBdimts8SSXDAS+cgdNuF+6Y+yvb9j/UBACFc/IIb6Gs5rxXjmlEZn9XQXwP02kHWBu nQjQ== X-Gm-Message-State: ANoB5pmq1ih4HKGNCPSo5O5ynAgO0ClFYKK0FmWaTgZTh67/DbkTgI6o i31uVK2ScbqsW9yVMBG3hcpaAWvPggE= X-Google-Smtp-Source: AA0mqf5ztvzVwEQ3cgGMuY4ov2DlGQLzPDJGEPRADIyl68F/pnKLBY+ggaC8P9mowLTqb0lVfwTEug== X-Received: by 2002:ac8:4918:0:b0:35b:b345:cf5f with SMTP id e24-20020ac84918000000b0035bb345cf5fmr31879634qtq.566.1669310567053; Thu, 24 Nov 2022 09:22:47 -0800 (PST) Original-Received: from smtpclient.apple (cm-24-53-184-207.buckeyecom.net. [24.53.184.207]) by smtp.gmail.com with ESMTPSA id t17-20020a05620a451100b006b5cc25535fsm1157217qkp.99.2022.11.24.09.22.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2022 09:22:46 -0800 (PST) X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::82b; envelope-from=jdtsmith@gmail.com; helo=mail-qt1-x82b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300440 Archived-At: The mouse-down events delivered by xterm-mouse-mode do not appear to = handle clicks on entities with specified space display widths correctly. = Try this in a graphical window, and again in the terminal, with = xterm-mouse-mode enabled: (defun my/report-mouse (ev) (interactive "e") (let* ((posn (event-start ev)) (rel (posn-object-x-y posn))) (message "Got Relative Position %S" rel))) (insert "\n\n ---- " (propertize " " 'extend nil 'display '(space :width (48)) 'keymap '(keymap (down-mouse-1 . my/report-mouse)) 'font-lock-face 'underline) " ---- ") Mouse 1 click positions relative to the extended-width space (underlined = for visibility) are reported correctly in graphical emacs, in screen = pixel units. With xterm-mouse-mode, however, relative positions are = always reported as (0 . 0) for me, no matter where you click. Is = something wrong with my assumption that posn-object-x-y should work = similarly in graphical as well as terminal emacs with xterm-mouse-mode = (modulo the larger =E2=80=9Cpixel=E2=80=9D size)?=