From unknown Sun Aug 17 09:11:04 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#48409 <48409@debbugs.gnu.org> To: bug#48409 <48409@debbugs.gnu.org> Subject: Status: Text runs away before user can copy it Reply-To: bug#48409 <48409@debbugs.gnu.org> Date: Sun, 17 Aug 2025 16:11:04 +0000 retitle 48409 Text runs away before user can copy it reassign 48409 emacs submitter 48409 =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson severity 48409 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri May 14 02:35:48 2021 Received: (at submit) by debbugs.gnu.org; 14 May 2021 06:35:48 +0000 Received: from localhost ([127.0.0.1]:44780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhRQK-00060Z-6x for submit@debbugs.gnu.org; Fri, 14 May 2021 02:35:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:56980) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhRQG-00060Q-Vn for submit@debbugs.gnu.org; Fri, 14 May 2021 02:35:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39658) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhRQF-0003cj-Cq for bug-gnu-emacs@gnu.org; Fri, 14 May 2021 02:35:44 -0400 Received: from fossa.birch.relay.mailchannels.net ([23.83.209.62]:16513) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhRQA-0004Zr-B1 for bug-gnu-emacs@gnu.org; Fri, 14 May 2021 02:35:41 -0400 X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A6DF01E2130 for ; Fri, 14 May 2021 06:35:29 +0000 (UTC) Received: from pdx1-sub0-mail-a40.g.dreamhost.com (100-96-27-184.trex.outbound.svc.cluster.local [100.96.27.184]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 5EBFB1E1D6B for ; Fri, 14 May 2021 06:35:28 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org Received: from pdx1-sub0-mail-a40.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.27.184 (trex/6.2.1); Fri, 14 May 2021 06:35:29 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@jidanni.org X-MailChannels-Auth-Id: dreamhost X-Oafish-Descriptive: 651a592828fcc5d2_1620974129416_687079203 X-MC-Loop-Signature: 1620974129416:3400177602 X-MC-Ingress-Time: 1620974129416 Received: from pdx1-sub0-mail-a40.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a40.g.dreamhost.com (Postfix) with ESMTP id 0F96C8BAE3 for ; Thu, 13 May 2021 23:35:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type; s= jidanni.org; bh=v1ztDycGxfEBgmI254nAa2NhXfk=; b=aoJqI1zWG8I4C+Ar 9nnmmjjq7i89+Tzz5dHroRoP1zoHR2ykw/r1LIozT7MMmWSwNpdmy446iROki4BM UH1LdkuEXczeh15lQvpsItWqQVZ7FnFyAopMXs4ZBybefEf2TCUbq+egiJZrbk2K R+EqFV28DVTXxVXtFDZZBumhiPs= Received: from jidanni.org (114-41-36-212.dynamic-ip.hinet.net [114.41.36.212]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by pdx1-sub0-mail-a40.g.dreamhost.com (Postfix) with ESMTPSA id 6370789AB4 for ; Thu, 13 May 2021 23:34:05 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a40 From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson To: bug-gnu-emacs@gnu.org Subject: Text runs away before user can copy it Date: Fri, 14 May 2021 14:32:54 +0800 Message-ID: <87cztt4yg9.5.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=23.83.209.62; envelope-from=jidanni@jidanni.org; helo=fossa.birch.relay.mailchannels.net 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Do e.g., M-! cat /etc/motd OK now in the minibuffer are several lines of juicy text. Now grab the mouse and attempt to copy that text. Alas, upon clicking, the text disappears. Pro users know better, but average bumpkin users will be frustrated. So maybe have the minibuffer stay put / stay open during this sequence of events. From debbugs-submit-bounces@debbugs.gnu.org Fri May 14 03:06:59 2021 Received: (at 48409-done) by debbugs.gnu.org; 14 May 2021 07:06:59 +0000 Received: from localhost ([127.0.0.1]:44803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhRuU-0006lP-RW for submit@debbugs.gnu.org; Fri, 14 May 2021 03:06:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhRuT-0006lD-GT for 48409-done@debbugs.gnu.org; Fri, 14 May 2021 03:06:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44786) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhRuN-0007VF-4C; Fri, 14 May 2021 03:06:52 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1339 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 1lhRuK-00041B-Pq; Fri, 14 May 2021 03:06:51 -0400 Date: Fri, 14 May 2021 10:07:03 +0300 Message-Id: <83fsypztd4.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson In-Reply-To: <87cztt4yg9.5.fsf@jidanni.org> Subject: Re: bug#48409: Text runs away before user can copy it References: <87cztt4yg9.5.fsf@jidanni.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48409-done Cc: 48409-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: 積丹尼 Dan Jacobson > > Date: Fri, 14 May 2021 14:32:54 +0800 > > Do e.g., > M-! cat /etc/motd > > OK now in the minibuffer are several lines of juicy text. > > Now grab the mouse and attempt to copy that text. > > Alas, upon clicking, the text disappears. > > Pro users know better, but average bumpkin users will be frustrated. > > So maybe have the minibuffer stay put / stay open during this sequence of events. Please RTFM. The doc string of M-! says, inter alia: If COMMAND ends in ‘&’, execute it asynchronously. The output appears in the buffer ‘*Async Shell Command*’. That buffer is in shell mode. You can also use ‘async-shell-command’ that automatically adds ‘&’. Otherwise, COMMAND is executed synchronously. The output appears in the buffer ‘*Shell Command Output*’. If the output is short enough to display in the echo area (which is determined by the variables ‘resize-mini-windows’ and ‘max-mini-window-height’), it is shown there, but it is nonetheless available in buffer ‘*Shell Command Output*’ even though that buffer is not automatically displayed. (The user manual has a similar text.) So the text you want is still available in an Emacs buffer, and you can take it from there. Closing. From debbugs-submit-bounces@debbugs.gnu.org Fri May 14 14:28:05 2021 Received: (at 48409) by debbugs.gnu.org; 14 May 2021 18:28:05 +0000 Received: from localhost ([127.0.0.1]:47019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhcXd-0007u0-3q for submit@debbugs.gnu.org; Fri, 14 May 2021 14:28:05 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:33649) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhcXa-0007tS-NT for 48409@debbugs.gnu.org; Fri, 14 May 2021 14:28:03 -0400 Received: (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 9B05B60007; Fri, 14 May 2021 18:27:55 +0000 (UTC) From: Juri Linkov To: 48409@debbugs.gnu.org Subject: Re: bug#48409: Text runs away before user can copy it Organization: LINKOV.NET References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> Date: Fri, 14 May 2021 20:58:24 +0300 In-Reply-To: <83fsypztd4.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 14 May 2021 10:07:03 +0300") Message-ID: <87cztt9qdj.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48409 Cc: eliz@gnu.org, jidanni@jidanni.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Otherwise, COMMAND is executed synchronously. The output appears in > the buffer ‘*Shell Command Output*’. If the output is short enough to > display in the echo area (which is determined by the variables > ‘resize-mini-windows’ and ‘max-mini-window-height’), it is shown > there, but it is nonetheless available in buffer ‘*Shell Command > Output*’ even though that buffer is not automatically displayed. > > (The user manual has a similar text.) > > So the text you want is still available in an Emacs buffer, and you > can take it from there. I vaguely remember a feature that clicking on the echo area pops up the *Messages* buffer with the recent messages at the end of the *Messages* buffer. So Jidanni could just click on the shell output in the echo area, and copy the complete output from the displayed *Messages* buffer. But this feature doesn't work anymore. Searching the source code indicates that such a feature existed before. In minibuffer.el: (defvar minibuffer-inactive-mode-map (let ((map (make-keymap))) ... (define-key map [mouse-1] 'view-echo-area-messages) But now clicking mouse-1 reports an error. From debbugs-submit-bounces@debbugs.gnu.org Fri May 14 14:46:39 2021 Received: (at 48409) by debbugs.gnu.org; 14 May 2021 18:46:39 +0000 Received: from localhost ([127.0.0.1]:47057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhcpa-0008QK-W4 for submit@debbugs.gnu.org; Fri, 14 May 2021 14:46:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhcpY-0008Q4-6e for 48409@debbugs.gnu.org; Fri, 14 May 2021 14:46:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37954) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhcpS-0004Oq-6I; Fri, 14 May 2021 14:46:30 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2248 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 1lhcpR-0001CX-3l; Fri, 14 May 2021 14:46:29 -0400 Date: Fri, 14 May 2021 21:46:24 +0300 Message-Id: <83o8ddxif3.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87cztt9qdj.fsf@mail.linkov.net> (message from Juri Linkov on Fri, 14 May 2021 20:58:24 +0300) Subject: Re: bug#48409: Text runs away before user can copy it References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48409 Cc: 48409@debbugs.gnu.org, jidanni@jidanni.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: eliz@gnu.org, jidanni@jidanni.org > Date: Fri, 14 May 2021 20:58:24 +0300 > > I vaguely remember a feature that clicking on the echo area > pops up the *Messages* buffer with the recent messages > at the end of the *Messages* buffer. So Jidanni could just click > on the shell output in the echo area, and copy the complete output > from the displayed *Messages* buffer. > > But this feature doesn't work anymore. He is using Emacs 27, where it does work. From debbugs-submit-bounces@debbugs.gnu.org Fri May 14 15:45:59 2021 Received: (at 48409) by debbugs.gnu.org; 14 May 2021 19:45:59 +0000 Received: from localhost ([127.0.0.1]:47092 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhdl0-0001Up-Sj for submit@debbugs.gnu.org; Fri, 14 May 2021 15:45:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhdky-0001Uc-Eq for 48409@debbugs.gnu.org; Fri, 14 May 2021 15:45:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38830) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhdkr-0006hj-Uq; Fri, 14 May 2021 15:45:49 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2106 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 1lhdkq-0007CY-Fr; Fri, 14 May 2021 15:45:49 -0400 Date: Fri, 14 May 2021 22:45:43 +0300 Message-Id: <83mtsxxfo8.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov , Alan Mackenzie In-Reply-To: <87cztt9qdj.fsf@mail.linkov.net> (message from Juri Linkov on Fri, 14 May 2021 20:58:24 +0300) Subject: Re: bug#48409: Text runs away before user can copy it References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48409 Cc: 48409@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: eliz@gnu.org, jidanni@jidanni.org > Date: Fri, 14 May 2021 20:58:24 +0300 > > I vaguely remember a feature that clicking on the echo area > pops up the *Messages* buffer with the recent messages > at the end of the *Messages* buffer. So Jidanni could just click > on the shell output in the echo area, and copy the complete output > from the displayed *Messages* buffer. > > But this feature doesn't work anymore. Searching the source code > indicates that such a feature existed before. In minibuffer.el: > > (defvar minibuffer-inactive-mode-map > (let ((map (make-keymap))) > ... > (define-key map [mouse-1] 'view-echo-area-messages) > > But now clicking mouse-1 reports an error. It reports an error because it doesn't invoke view-echo-area-messages. Alan, this minibuffer-inactive-mode-map thing doesn't seem to work with mouse clocks, please take a look. From debbugs-submit-bounces@debbugs.gnu.org Fri May 14 15:51:17 2021 Received: (at 48409) by debbugs.gnu.org; 14 May 2021 19:51:17 +0000 Received: from localhost ([127.0.0.1]:47097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhdq9-0001dY-H4 for submit@debbugs.gnu.org; Fri, 14 May 2021 15:51:17 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:53104) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhdq5-0001dJ-7r for 48409@debbugs.gnu.org; Fri, 14 May 2021 15:51:15 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 14EJoeKc179489; Fri, 14 May 2021 19:51:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2020-01-29; bh=kFdnOf4yRqL9lQ3jzWS9q/hunZ5chCQr3hZwfGePD3I=; b=Dzy2D/Oz5Pehh0rtJmXBMt6ydTF4ZCFTY/lNvKVUnBPbB26LlC77bheYQ1DC/QSvXoXt Va8XHR1bZx5qMpO2Ybk5oE12Kipq5fRw3XBDpYswaNPXj1LGF7tk8ZSATIpIzFJZd+Fl 2LLFNnO2/EvaA6EN9aqQdAi9CsP/1/umSXLIczexC1PPzOqKpoXPI5kpYGSfqv1hSof/ ZRg1nDP89WWqOuikbVPow2phuWO2ldftpoh/llxqSRSDgnxX5ywVyMhA0Ra6PS9yT/HG zD+8Vu4XdQ9G6JEugNWynx+bxipreuBrRJYVRNaUtChAPnVTOTZ8XChj6pKsQnivNdYh vQ== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2130.oracle.com with ESMTP id 38gpndd848-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 May 2021 19:51:07 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 14EJk0Yu125209; Fri, 14 May 2021 19:51:06 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2175.outbound.protection.outlook.com [104.47.55.175]) by aserp3030.oracle.com with ESMTP id 38gppqcswk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 May 2021 19:51:06 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SqUYewk/uZXLLnHvfgSbOchoHLLl0eGB3oL7ZiHys4XK52varbXbQRJwm5e/zgqQeHUByfHCJX0FmgGfM0C3slBqzvRXwdpANmE+6nuoyUwTIhwg0bICXTvR8Z1bojMuGAaDepdig1jD8WbdbBFfeAeoZ7JeBpQnyXsGHlmBlrkAmvVjOPoRYu5vifkO+IYOoJqiS3uYQ4ZoZ3Xm1hnyWWg/qk8XOIgCu9+QqpD71or00o7lpH3NAQ24O49+I6+OYNfu79RcbybGwPVIpABHqYZQJhmjaoMlD0sil33Ni7eMgb32tvlOMBscAfSsevcthm4+QM6QzZTmZRMVWEqCZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kFdnOf4yRqL9lQ3jzWS9q/hunZ5chCQr3hZwfGePD3I=; b=YtzhAoNe7HinuqQTU0/1IoVKSGZdZWXPG13FjhbbbY+gRgaZHnbeeJzJ4ZLGSjVD9jAjmchNQM/rs7A09HmJNupOKXsKsYW6xljuD1c5K/9ii6mb2Pevbui7pP9WbtMDUAcoTweQEY19G4+eoc5eoezlIEX6Y/wT42Ge8UBVKEotSkLlLV0Cx318B/0Y6D1pK+kq4XgPJjTP/z163yGc7mJQrP7oXrFfisP/TEickPiNcyaK9zrkeuTPrD7qnyByHF1FPfEBz6NAClyyVSPNKZ1L+zD/mgiVVii4BHt/RjgsmG4N2quohoH8QxY3HkneJ/zPUy94q5A86OpLze4KBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kFdnOf4yRqL9lQ3jzWS9q/hunZ5chCQr3hZwfGePD3I=; b=xQrN8hw1BUydq7NdszEi2H58+jfz+mPSJBrBo+qAR3eTfbwmRZqiST4/Ww2OcgBc5s1FeWwnmRdVwKR2IHx0ObrAyF4w8tkMLBIPc+2vga4x0zZvsFrY0AjBwPjxrFi93yQT63Bv3CPxHJpzQqmG8IR3YYqM5tFXdQUAww3rOZk= Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15) by SA2PR10MB4539.namprd10.prod.outlook.com (2603:10b6:806:117::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25; Fri, 14 May 2021 19:51:04 +0000 Received: from SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::2109:9725:fd4a:6494]) by SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::2109:9725:fd4a:6494%6]) with mapi id 15.20.4129.028; Fri, 14 May 2021 19:51:04 +0000 From: Drew Adams To: Eli Zaretskii , Juri Linkov , Alan Mackenzie Subject: RE: [External] : bug#48409: Text runs away before user can copy it Thread-Topic: [External] : bug#48409: Text runs away before user can copy it Thread-Index: AQHXSPnKohkymCFMZ06bMZmKvjLu/KrjYsMQ Date: Fri, 14 May 2021 19:51:04 +0000 Message-ID: References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> In-Reply-To: <83mtsxxfo8.fsf@gnu.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=none action=none header.from=oracle.com; x-originating-ip: [73.170.83.28] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2ad1eafb-afea-45f1-e534-08d917119bd9 x-ms-traffictypediagnostic: SA2PR10MB4539: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PWoazhlIXzi4T+zDdKZm6h4STAoGOPGXaNctK/BQeG3zdkWG8TTSL5s/VoKbz12iqAg/v/GrlfH7y8tFHN16+/F70k4cIii8tNzBOC9hhrjDOBb8eVvvNr07XmQ4+dHS2Vo4wtzZPeWeS+caXarosXmylECMv/pcXCqN0G3ew6DaO7yGAHTKsUbWh+T9vpKuLIMG9QLUSH32GM8siE2gQcesuFv1H/4Yzv/Oxl7kMtn5u6CDj//6Z/BNzlZZxANb6PhLYgYnnQN71iBav7BSn0Qc5jDC7hS/O1vUnyGIHVUPrfr2rVp7RthNAL4o2segqvm1BTl39xigxtqwmpTegbOnVPZwdkG0jH3pGWxWr1f52r3BxyoYAI/GB4d+SQyjj8asBBpqVkmcz8LdFsVMa9ruCeX4OQZgLjcurHOjpmyXg3lh+mJFpLVJ7p+2jxoksPGElR+0zMqhrhIYSQH9/da8l7pnOjMzxaBboAkD/TvQXK7AAT5/RO6gjapZxaIhDQ1uLkFe5XLz82gdRcmWF+5WtmfDGzll+N+QDfTvii+ROv9EY/y9c9vfwE+nqSESBVQCK1STnuepKZis1nhGXLK3/22CZLxo3338OyIJkdE= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(396003)(366004)(136003)(376002)(39860400002)(558084003)(33656002)(86362001)(122000001)(38100700002)(83380400001)(76116006)(7696005)(71200400001)(66946007)(8936002)(66476007)(478600001)(66446008)(44832011)(2906002)(55016002)(110136005)(316002)(8676002)(66556008)(186003)(9686003)(26005)(5660300002)(52536014)(6506007)(4326008)(64756008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?gXLOVBazhwe0uRF68YEPzSK9HDxjxorE5Qo135pKbBN1uLkMcklwbC4L4Wxb?= =?us-ascii?Q?YLULPVWZKKjttwv7nyYxFsdQqIgThQfZ85J1X8GtqR2tIFGpttgLFJGWQ6IP?= =?us-ascii?Q?bsaqPA3bsDNBgI9XDpppXXGAIZHPaJPfamR/H//OxpkZZhhkBDJfz2gzmUCL?= =?us-ascii?Q?DgGAQYx5+dIqxsJxvQLZ+hAwKtUYgJiV4yVFUkCd7rZJB/LUMA+A3Er5uIag?= =?us-ascii?Q?FEM17Ci3zTCL7vAtpTvWHIT+7OheBYQ3l3T8NXCCd6wn7tfwZ8PTsQvLbHDF?= =?us-ascii?Q?LJbhQAHNqRAvIiviAQBx7Wf/GrjLQqw29XqZccGzZIbVc2QU1PigsV5xCXS+?= =?us-ascii?Q?YSaV05VwSob+IUjvtxz4o7qOLb0wiugxc86fhJEk84I2SW7DWDa8i2Z5Ib+S?= =?us-ascii?Q?SuQMI5mhtRhvwf4AwueMgrRg7dMbEZOmuRvJV16iSse9TtK1vVUJ2Ndx/BbP?= =?us-ascii?Q?zE2MsWfTh9AYJV7+MAbNv4hSvlXIpeTxFndn/hbLhdchtcGydWrHzd18e1Fw?= =?us-ascii?Q?fNWUtJCTUdQ2jDKhMDNQ9qWsPzJKR8HAfp5ty4SxXAwRnjsX1KxXGsi1+LAn?= =?us-ascii?Q?omxeQZsiq7iqEpACx7tyZg1sCPm9h0xR0RxuTHqXm7XKsqtdoEKpg+OKXwsC?= =?us-ascii?Q?TSPB+a6EGY5T+WGJh3iFWV2IzPtn77emn51Quj2V5Ir9R37Z6VKvrycVoZvb?= =?us-ascii?Q?xznN55eD3VOhwhcy1bqvxT7bMLwt0Sf0LdzP4oF0g9qg/zESQr8uo7egcEOw?= =?us-ascii?Q?a5e5QGfjDfO0CFi1rsI10cR56vJA3iUKPaDWhsJuRfvXUxWY2qX0tYekgkBD?= =?us-ascii?Q?ZysHI4yJKgoScT+Ew2+NyLUbzyYh1rCGGl1o6bp2C7QqMpWtelYnlVQXZ+Xe?= =?us-ascii?Q?C4l+pyAhQ4W3HZ1aqhtdZIUgw66UUwkboZXsG824VPz+AfKs+uJi2Rpm/mdx?= =?us-ascii?Q?8uNyayvXl8AcLiBvkiYbbuBVOILTaHtCtavnO15xtWr12afm280kenJPKDHO?= =?us-ascii?Q?ILbPynEBWTC4wLbm3cuvaG2hOZHl0UQB98alWsi5hv/5+WAfqbiU+oo870yy?= =?us-ascii?Q?KmMBsNxZHLXYRSL3H1UqRg3A0MItJ6O3EzPVMUoPNDMt39gKZmvZkRWW/cb4?= =?us-ascii?Q?f5SzWusJy2MKEDgr25er8lkURuvlF56OXX9TG1eiM0Jt/Nw5Bb0OJdePPYmL?= =?us-ascii?Q?+UM/iLDDfrm0cmi70WoBs3CnhH5Mbf13rFUGru7KANT2XRbYUaxHcHCGmhpq?= =?us-ascii?Q?iAKtfgVI+1XciNQaHOsHT5++vNRIxFJOzF0XEwPen4558stV0+1z8gfzwvlB?= =?us-ascii?Q?y/o+scq6Mf1yYb2MYI4/9U6/?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2ad1eafb-afea-45f1-e534-08d917119bd9 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 May 2021 19:51:04.5620 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9fFb3Ku6S2p/KCm1W0MucvkotRZWxMNPA0H6M7dPv3aoz+873lf6Ua+GFe97z4xAzqdgNtddDM/UZCC3JqQyBg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4539 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9984 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=705 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 bulkscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105140156 X-Proofpoint-ORIG-GUID: oKSjCeh-mgEwg65kJQT6Z4K30v-cVG5X X-Proofpoint-GUID: oKSjCeh-mgEwg65kJQT6Z4K30v-cVG5X X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9984 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0 phishscore=0 priorityscore=1501 suspectscore=0 spamscore=0 lowpriorityscore=0 adultscore=0 clxscore=1011 mlxscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105140156 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48409 Cc: "48409@debbugs.gnu.org" <48409@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Alan, this minibuffer-inactive-mode-map thing doesn't > seem to work with mouse clocks, please take a look. Perhaps the mice just need to wind their clocks? From debbugs-submit-bounces@debbugs.gnu.org Fri May 14 16:14:07 2021 Received: (at 48409) by debbugs.gnu.org; 14 May 2021 20:14:07 +0000 Received: from localhost ([127.0.0.1]:47110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lheCF-0002DI-3J for submit@debbugs.gnu.org; Fri, 14 May 2021 16:14:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44558) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lheC9-0002Ca-Hc for 48409@debbugs.gnu.org; Fri, 14 May 2021 16:14:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39838) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lheC3-0000F9-EW; Fri, 14 May 2021 16:13:55 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3939 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 1lheC2-00064g-Vf; Fri, 14 May 2021 16:13:55 -0400 Date: Fri, 14 May 2021 23:13:50 +0300 Message-Id: <83lf8hxedd.fsf@gnu.org> From: Eli Zaretskii To: acm@muc.de In-Reply-To: <83mtsxxfo8.fsf@gnu.org> (message from Eli Zaretskii on Fri, 14 May 2021 22:45:43 +0300) Subject: Re: bug#48409: Text runs away before user can copy it References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48409 Cc: 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Fri, 14 May 2021 22:45:43 +0300 > From: Eli Zaretskii > Cc: 48409@debbugs.gnu.org > > > (defvar minibuffer-inactive-mode-map > > (let ((map (make-keymap))) > > ... > > (define-key map [mouse-1] 'view-echo-area-messages) > > > > But now clicking mouse-1 reports an error. > > It reports an error because it doesn't invoke view-echo-area-messages. > > Alan, this minibuffer-inactive-mode-map thing doesn't seem to work > with mouse clocks, please take a look. Alan, is the below the right fix? The problem is that no one is setting up the minibuffer in inactive mode until after the first time the minibuffer is activated. diff --git a/src/minibuf.c b/src/minibuf.c index 428998a..9ec93a0 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -2297,6 +2297,8 @@ init_minibuf_once_for_pdumper (void) minibuf_prompt = Qnil; minibuf_save_list = Qnil; last_minibuf_string = Qnil; + Lisp_Object minibuf = get_minibuffer (0); + set_minibuffer_mode (minibuf, 0); } void From debbugs-submit-bounces@debbugs.gnu.org Fri May 14 16:53:47 2021 Received: (at 48409) by debbugs.gnu.org; 14 May 2021 20:53:47 +0000 Received: from localhost ([127.0.0.1]:47164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lheoc-0003EP-Rm for submit@debbugs.gnu.org; Fri, 14 May 2021 16:53:47 -0400 Received: from colin.muc.de ([193.149.48.1]:21993 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lheob-0003ED-8s for 48409@debbugs.gnu.org; Fri, 14 May 2021 16:53:45 -0400 Received: (qmail 61083 invoked by uid 3782); 14 May 2021 20:53:39 -0000 Received: from acm.muc.de (p4fe158f3.dip0.t-ipconnect.de [79.225.88.243]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 14 May 2021 22:53:38 +0200 Received: (qmail 3816 invoked by uid 1000); 14 May 2021 20:53:38 -0000 Date: Fri, 14 May 2021 20:53:38 +0000 To: Eli Zaretskii Subject: Re: bug#48409: Text runs away before user can copy it Message-ID: References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> <83lf8hxedd.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83lf8hxedd.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48409 Cc: 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Eli. On Fri, May 14, 2021 at 23:13:50 +0300, Eli Zaretskii wrote: > > Date: Fri, 14 May 2021 22:45:43 +0300 > > From: Eli Zaretskii > > Cc: 48409@debbugs.gnu.org > > > (defvar minibuffer-inactive-mode-map > > > (let ((map (make-keymap))) > > > ... > > > (define-key map [mouse-1] 'view-echo-area-messages) > > > But now clicking mouse-1 reports an error. > > It reports an error because it doesn't invoke view-echo-area-messages. > > Alan, this minibuffer-inactive-mode-map thing doesn't seem to work > > with mouse clocks, please take a look. > Alan, is the below the right fix? The problem is that no one is > setting up the minibuffer in inactive mode until after the first time > the minibuffer is activated. > diff --git a/src/minibuf.c b/src/minibuf.c > index 428998a..9ec93a0 100644 > --- a/src/minibuf.c > +++ b/src/minibuf.c > @@ -2297,6 +2297,8 @@ init_minibuf_once_for_pdumper (void) > minibuf_prompt = Qnil; > minibuf_save_list = Qnil; > last_minibuf_string = Qnil; > + Lisp_Object minibuf = get_minibuffer (0); > + set_minibuffer_mode (minibuf, 0); > } > > void I'm not entirely sure. I actually added a "get_minibuffer (0);" to init_minibuf_once in my commit earlier on today, so perhaps the "set_minibuffer_mode (minibuf, 0);" really belongs in that function. I'm not quite sure in my own mind what should go into init_minibuf_once and what into init_minibuf_once_for_pdumper. I've taken as the criterion what the comment there says: /* We run this function on first initialization and whenever we restore from a dump file. pdumper doesn't try to preserve frames, windows, and so on, so reset everything related here. */ , and thus put the creation of *Minibuf-0* into init_minibuf_once. It would be good to have a relatively simple fix for something in minibuf.c, for once. ;-) -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat May 15 01:56:57 2021 Received: (at 48409) by debbugs.gnu.org; 15 May 2021 05:56:57 +0000 Received: from localhost ([127.0.0.1]:47394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhnIG-0007cI-9B for submit@debbugs.gnu.org; Sat, 15 May 2021 01:56:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhnIC-0007c2-A5 for 48409@debbugs.gnu.org; Sat, 15 May 2021 01:56:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60762) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhnI5-0007Tv-W1; Sat, 15 May 2021 01:56:46 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3993 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 1lhnI5-0005mZ-9n; Sat, 15 May 2021 01:56:45 -0400 Date: Sat, 15 May 2021 08:56:41 +0300 Message-Id: <83im3ky1ye.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-Reply-To: (message from Alan Mackenzie on Fri, 14 May 2021 20:53:38 +0000) Subject: Re: bug#48409: Text runs away before user can copy it References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> <83lf8hxedd.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48409 Cc: 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Fri, 14 May 2021 20:53:38 +0000 > Cc: juri@linkov.net, 48409@debbugs.gnu.org > From: Alan Mackenzie > > > Alan, is the below the right fix? The problem is that no one is > > setting up the minibuffer in inactive mode until after the first time > > the minibuffer is activated. > > > diff --git a/src/minibuf.c b/src/minibuf.c > > index 428998a..9ec93a0 100644 > > --- a/src/minibuf.c > > +++ b/src/minibuf.c > > @@ -2297,6 +2297,8 @@ init_minibuf_once_for_pdumper (void) > > minibuf_prompt = Qnil; > > minibuf_save_list = Qnil; > > last_minibuf_string = Qnil; > > + Lisp_Object minibuf = get_minibuffer (0); > > + set_minibuffer_mode (minibuf, 0); > > } > > > > void > > I'm not entirely sure. I actually added a "get_minibuffer (0);" to > init_minibuf_once in my commit earlier on today, so perhaps the > "set_minibuffer_mode (minibuf, 0);" really belongs in that function. init_minibuf_once isn't called after dumping, so that would not help. We need to make sure the minibuffer is put in inactive mode when we start Emacs. > I'm not quite sure in my own mind what should go into init_minibuf_once > and what into init_minibuf_once_for_pdumper. I've taken as the > criterion what the comment there says: > > /* We run this function on first initialization and whenever we > restore from a dump file. pdumper doesn't try to preserve > frames, windows, and so on, so reset everything related here. */ > > , and thus put the creation of *Minibuf-0* into init_minibuf_once. See above: this won't survive the dumping because the minibuffer's mode isn't dumped. And I see no reason to dump it; after all, it only makes sense to dump things whose preparation is time-consuming. > It would be good to have a relatively simple fix for something in > minibuf.c, for once. ;-) And I thought I was fine providing a very simple fix. Oh well... From debbugs-submit-bounces@debbugs.gnu.org Sat May 15 07:15:47 2021 Received: (at 48409) by debbugs.gnu.org; 15 May 2021 11:15:47 +0000 Received: from localhost ([127.0.0.1]:47714 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhsGo-0003Qh-NU for submit@debbugs.gnu.org; Sat, 15 May 2021 07:15:46 -0400 Received: from colin.muc.de ([193.149.48.1]:43191 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lhsGk-0003QL-Mg for 48409@debbugs.gnu.org; Sat, 15 May 2021 07:15:45 -0400 Received: (qmail 68733 invoked by uid 3782); 15 May 2021 11:15:36 -0000 Received: from acm.muc.de (p4fe15ace.dip0.t-ipconnect.de [79.225.90.206]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 15 May 2021 13:15:35 +0200 Received: (qmail 17270 invoked by uid 1000); 15 May 2021 11:15:35 -0000 Date: Sat, 15 May 2021 11:15:35 +0000 To: Eli Zaretskii Subject: Re: bug#48409: Text runs away before user can copy it Message-ID: References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> <83lf8hxedd.fsf@gnu.org> <83im3ky1ye.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83im3ky1ye.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48409 Cc: 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Eli. On Sat, May 15, 2021 at 08:56:41 +0300, Eli Zaretskii wrote: > > Date: Fri, 14 May 2021 20:53:38 +0000 > > Cc: juri@linkov.net, 48409@debbugs.gnu.org > > From: Alan Mackenzie > > > Alan, is the below the right fix? The problem is that no one is > > > setting up the minibuffer in inactive mode until after the first time > > > the minibuffer is activated. > > > diff --git a/src/minibuf.c b/src/minibuf.c > > > index 428998a..9ec93a0 100644 > > > --- a/src/minibuf.c > > > +++ b/src/minibuf.c > > > @@ -2297,6 +2297,8 @@ init_minibuf_once_for_pdumper (void) > > > minibuf_prompt = Qnil; > > > minibuf_save_list = Qnil; > > > last_minibuf_string = Qnil; > > > + Lisp_Object minibuf = get_minibuffer (0); > > > + set_minibuffer_mode (minibuf, 0); > > > } > > > void > > I'm not entirely sure. I actually added a "get_minibuffer (0);" to > > init_minibuf_once in my commit earlier on today, so perhaps the > > "set_minibuffer_mode (minibuf, 0);" really belongs in that function. > init_minibuf_once isn't called after dumping, so that would not help. > We need to make sure the minibuffer is put in inactive mode when we > start Emacs. > > I'm not quite sure in my own mind what should go into > > init_minibuf_once and what into init_minibuf_once_for_pdumper. I've > > taken as the criterion what the comment there says: > > /* We run this function on first initialization and whenever we > > restore from a dump file. pdumper doesn't try to preserve > > frames, windows, and so on, so reset everything related here. */ > > , and thus put the creation of *Minibuf-0* into init_minibuf_once. > See above: this won't survive the dumping because the minibuffer's > mode isn't dumped. And I see no reason to dump it; after all, it > only makes sense to dump things whose preparation is time-consuming. Thanks for clarifying that. I'd misunderstood the comments, and got those two functions' purposes mixed up. So, your patch is then entirely correct, and what I'd put in yesterday afternoon is not correct. I'll get that fixed and committed now. > > It would be good to have a relatively simple fix for something in > > minibuf.c, for once. ;-) > And I thought I was fine providing a very simple fix. Oh well... Sorry, bad wording on my part. The fix was simple, and I was rejoicing in that simplicity. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat May 15 08:29:18 2021 Received: (at 48409) by debbugs.gnu.org; 15 May 2021 12:29:18 +0000 Received: from localhost ([127.0.0.1]:47820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhtPy-0007Vk-2E for submit@debbugs.gnu.org; Sat, 15 May 2021 08:29:18 -0400 Received: from olivedrab.birch.relay.mailchannels.net ([23.83.209.135]:53267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhtPw-0007Vb-7F for 48409@debbugs.gnu.org; Sat, 15 May 2021 08:29:16 -0400 X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id BA49F361AD0; Sat, 15 May 2021 12:29:14 +0000 (UTC) Received: from pdx1-sub0-mail-a52.g.dreamhost.com (100-96-17-10.trex.outbound.svc.cluster.local [100.96.17.10]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 1355D361D7B; Sat, 15 May 2021 12:29:14 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org Received: from pdx1-sub0-mail-a52.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.17.10 (trex/6.2.1); Sat, 15 May 2021 12:29:14 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@jidanni.org X-MailChannels-Auth-Id: dreamhost X-Chief-Spot: 1660896b5d69e5b3_1621081754530_3452780541 X-MC-Loop-Signature: 1621081754530:2458452115 X-MC-Ingress-Time: 1621081754530 Received: from pdx1-sub0-mail-a52.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a52.g.dreamhost.com (Postfix) with ESMTP id 59599818D5; Sat, 15 May 2021 05:29:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to:cc :subject:references:date:message-id:mime-version:content-type; s=jidanni.org; bh=M90Cs0pewfRN7vZXvAoVd2P6CNc=; b=ooV+X5Whrh0dr eFoHTQocDKBIN4D5R6GOx/4LntsH1vcll18FIrFy+ZGDyw67yQVbtnqyRXG7pu4s n8n1zpFRecOk5u8z7lrluLdpAvByMOCYjVQwQUOYFF4gbhyMiLW5Hy3bC+x8X2qj qKsEPodXV+lJz/WxHpPcfNfQRqWN6c= Received: from jidanni.org (114-46-57-208.dynamic-ip.hinet.net [114.46.57.208]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by pdx1-sub0-mail-a52.g.dreamhost.com (Postfix) with ESMTPSA id 4C926818B4; Sat, 15 May 2021 05:29:10 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a52 From: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson To: Eli Zaretskii Subject: Re: bug#48409: Text runs away before user can copy it References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83o8ddxif3.fsf@gnu.org> Date: Sat, 15 May 2021 20:29:06 +0800 Message-ID: <87eee86uzx.5.fsf@jidanni.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48409 Cc: 48409@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >>>>> "EZ" == Eli Zaretskii writes: EZ> He is using Emacs 27, where it does work. I'm not too sure about that. Anyway my point is "Average Job Blubb user, who has never been to Emacs School, will feel bad." From debbugs-submit-bounces@debbugs.gnu.org Sat May 15 08:34:55 2021 Received: (at 48409) by debbugs.gnu.org; 15 May 2021 12:34:55 +0000 Received: from localhost ([127.0.0.1]:47830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhtVO-0007fJ-TG for submit@debbugs.gnu.org; Sat, 15 May 2021 08:34:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhtVM-0007f6-RA for 48409@debbugs.gnu.org; Sat, 15 May 2021 08:34:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42470) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhtVH-000788-Et; Sat, 15 May 2021 08:34:47 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2171 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 1lhtVG-0000Pv-CT; Sat, 15 May 2021 08:34:47 -0400 Date: Sat, 15 May 2021 15:34:46 +0300 Message-Id: <83sg2ow4yh.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?56mN5Li55bC8?= Dan Jacobson In-Reply-To: <87eee86uzx.5.fsf@jidanni.org> (message from =?utf-8?B?56mN?= =?utf-8?B?5Li55bC8?= Dan Jacobson on Sat, 15 May 2021 20:29:06 +0800) Subject: Re: bug#48409: Text runs away before user can copy it References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83o8ddxif3.fsf@gnu.org> <87eee86uzx.5.fsf@jidanni.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48409 Cc: 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: 積丹尼 Dan Jacobson > Cc: Juri Linkov , 48409@debbugs.gnu.org > Date: Sat, 15 May 2021 20:29:06 +0800 > > >>>>> "EZ" == Eli Zaretskii writes: > EZ> He is using Emacs 27, where it does work. > > I'm not too sure about that. > > Anyway my point is "Average Job Blubb user, who has never been to Emacs > School, will feel bad." Averag Job Blubb is well advised to read the docs when he or she encounters some issue. From debbugs-submit-bounces@debbugs.gnu.org Mon May 17 18:30:10 2021 Received: (at 48409) by debbugs.gnu.org; 17 May 2021 22:30:10 +0000 Received: from localhost ([127.0.0.1]:53981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lilkY-0003mS-KC for submit@debbugs.gnu.org; Mon, 17 May 2021 18:30:10 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:36461) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lilkU-0003kS-MH for 48409@debbugs.gnu.org; Mon, 17 May 2021 18:30:09 -0400 Received: (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id B6DFA1C0003; Mon, 17 May 2021 22:29:59 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#48409: Text runs away before user can copy it Organization: LINKOV.NET References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> Date: Mon, 17 May 2021 23:53:12 +0300 In-Reply-To: <83mtsxxfo8.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 14 May 2021 22:45:43 +0300") Message-ID: <87h7j12j93.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48409 Cc: Alan Mackenzie , 48409@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> (defvar minibuffer-inactive-mode-map >> (let ((map (make-keymap))) >> ... >> (define-key map [mouse-1] 'view-echo-area-messages) >> >> But now clicking mouse-1 reports an error. > > It reports an error because it doesn't invoke view-echo-area-messages. > > Alan, this minibuffer-inactive-mode-map thing doesn't seem to work > with mouse clocks, please take a look. Something strange is going on here: 1. when the shell output displayed in the echo area is only 1 line: M-! echo -e "line1" RET then clicking on the echo area displays the *Messages* buffer correctly. 2. But when the output has more lines: M-! echo -e "line1\nline2" RET then clicking on the echo area signals an error: mouse-minibuffer-check: Minibuffer window is not active From debbugs-submit-bounces@debbugs.gnu.org Tue May 18 09:13:24 2021 Received: (at 48409) by debbugs.gnu.org; 18 May 2021 13:13:24 +0000 Received: from localhost ([127.0.0.1]:54640 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lizXI-00070r-Bn for submit@debbugs.gnu.org; Tue, 18 May 2021 09:13:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lizXF-00070d-Ek for 48409@debbugs.gnu.org; Tue, 18 May 2021 09:13:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34552) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lizX9-0006VD-3j; Tue, 18 May 2021 09:13:15 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1834 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 1lizX8-0000Dw-JH; Tue, 18 May 2021 09:13:14 -0400 Date: Tue, 18 May 2021 16:13:19 +0300 Message-Id: <83bl98rxqo.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87h7j12j93.fsf@mail.linkov.net> (message from Juri Linkov on Mon, 17 May 2021 23:53:12 +0300) Subject: Re: bug#48409: Text runs away before user can copy it References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> <87h7j12j93.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48409 Cc: acm@muc.de, 48409@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Cc: Alan Mackenzie , 48409@debbugs.gnu.org > Date: Mon, 17 May 2021 23:53:12 +0300 > > Something strange is going on here: > > 1. when the shell output displayed in the echo area is only 1 line: > > M-! echo -e "line1" RET > > then clicking on the echo area displays the *Messages* buffer correctly. > > 2. But when the output has more lines: > > M-! echo -e "line1\nline2" RET > > then clicking on the echo area signals an error: > > mouse-minibuffer-check: Minibuffer window is not active You don't need M-! for this, 'message' is enough: emacs -Q (message "line1\nline2") C-x C-e click mouse-1 in the mini-window Alan, are you looking into this? My guess is that this has something to do with the fact the the echo-area buffer is displayed in the mini-window, and the view-echo-area-messages binding is only active in the minibuffer, not in an echo-area buffer. But that's a guess. From debbugs-submit-bounces@debbugs.gnu.org Tue May 18 14:42:28 2021 Received: (at 48409) by debbugs.gnu.org; 18 May 2021 18:42:28 +0000 Received: from localhost ([127.0.0.1]:57301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lj4fk-0001sF-DP for submit@debbugs.gnu.org; Tue, 18 May 2021 14:42:28 -0400 Received: from colin.muc.de ([193.149.48.1]:51592 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lj4ff-0001rw-Nh for 48409@debbugs.gnu.org; Tue, 18 May 2021 14:42:27 -0400 Received: (qmail 19981 invoked by uid 3782); 18 May 2021 18:42:17 -0000 Received: from acm.muc.de (p4fe1589d.dip0.t-ipconnect.de [79.225.88.157]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 18 May 2021 20:42:16 +0200 Received: (qmail 8017 invoked by uid 1000); 18 May 2021 18:42:16 -0000 Date: Tue, 18 May 2021 18:42:16 +0000 To: Eli Zaretskii Subject: Re: bug#48409: Text runs away before user can copy it Message-ID: References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> <87h7j12j93.fsf@mail.linkov.net> <83bl98rxqo.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83bl98rxqo.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48409 Cc: 48409@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Eli and Juri. On Tue, May 18, 2021 at 16:13:19 +0300, Eli Zaretskii wrote: > > From: Juri Linkov > > Cc: Alan Mackenzie , 48409@debbugs.gnu.org > > Date: Mon, 17 May 2021 23:53:12 +0300 > > Something strange is going on here: > > 1. when the shell output displayed in the echo area is only 1 line: > > M-! echo -e "line1" RET > > then clicking on the echo area displays the *Messages* buffer correctly. > > 2. But when the output has more lines: > > M-! echo -e "line1\nline2" RET > > then clicking on the echo area signals an error: > > mouse-minibuffer-check: Minibuffer window is not active > You don't need M-! for this, 'message' is enough: > emacs -Q > (message "line1\nline2") C-x C-e > click mouse-1 in the mini-window Yes. But I think Juri's right about it being the number of lines in the echo area which is the key to the error. > Alan, are you looking into this? I am now, yes. > My guess is that this has something to do with the fact the the > echo-area buffer is displayed in the mini-window, and the > view-echo-area-messages binding is only active in the minibuffer, not > in an echo-area buffer. But that's a guess. The error message "Minibuffer window is not active" comes from the function mouse-minibuffer-check (mouse.el), which has just been called from mouse-set-region, which has somehow been given a drag event as argument. How can a simple stationary click in the echo area become a drag event? I'm guessing there's some subtle bug in some function such as make_lispy_event in keyboard.c. Any mouse experts who have suggestions, please chime in, here! -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Tue May 18 15:05:09 2021 Received: (at 48409) by debbugs.gnu.org; 18 May 2021 19:05:09 +0000 Received: from localhost ([127.0.0.1]:57320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lj51h-0004c6-Jj for submit@debbugs.gnu.org; Tue, 18 May 2021 15:05:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lj51f-0004bc-22 for 48409@debbugs.gnu.org; Tue, 18 May 2021 15:05:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47762) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lj51Y-0006os-PG; Tue, 18 May 2021 15:05:00 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4483 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 1lj51Y-0006OA-6j; Tue, 18 May 2021 15:05:00 -0400 Date: Tue, 18 May 2021 22:05:03 +0300 Message-Id: <83k0nvrhgg.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-Reply-To: (message from Alan Mackenzie on Tue, 18 May 2021 18:42:16 +0000) Subject: Re: bug#48409: Text runs away before user can copy it References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> <87h7j12j93.fsf@mail.linkov.net> <83bl98rxqo.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48409 Cc: 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Tue, 18 May 2021 18:42:16 +0000 > Cc: Juri Linkov , 48409@debbugs.gnu.org > From: Alan Mackenzie > > How can a simple stationary click in the echo area become a drag event? > I'm guessing there's some subtle bug in some function such as > make_lispy_event in keyboard.c. Any mouse experts who have suggestions, > please chime in, here! I think this is explained at the end of the node "Drag Events" in the ELisp manual. From debbugs-submit-bounces@debbugs.gnu.org Tue May 18 16:24:05 2021 Received: (at 48409) by debbugs.gnu.org; 18 May 2021 20:24:05 +0000 Received: from localhost ([127.0.0.1]:57390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lj6G5-0000Ga-El for submit@debbugs.gnu.org; Tue, 18 May 2021 16:24:05 -0400 Received: from colin.muc.de ([193.149.48.1]:54163 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lj6G2-0000G4-EQ for 48409@debbugs.gnu.org; Tue, 18 May 2021 16:24:03 -0400 Received: (qmail 89872 invoked by uid 3782); 18 May 2021 20:23:56 -0000 Received: from acm.muc.de (p4fe1589d.dip0.t-ipconnect.de [79.225.88.157]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 18 May 2021 22:23:55 +0200 Received: (qmail 17279 invoked by uid 1000); 18 May 2021 20:23:55 -0000 Date: Tue, 18 May 2021 20:23:55 +0000 To: Eli Zaretskii Subject: Re: bug#48409: Text runs away before user can copy it Message-ID: References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> <87h7j12j93.fsf@mail.linkov.net> <83bl98rxqo.fsf@gnu.org> <83k0nvrhgg.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83k0nvrhgg.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48409 Cc: acm@muc.de, 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Eli. On Tue, May 18, 2021 at 22:05:03 +0300, Eli Zaretskii wrote: > > Date: Tue, 18 May 2021 18:42:16 +0000 > > Cc: Juri Linkov , 48409@debbugs.gnu.org > > From: Alan Mackenzie > > How can a simple stationary click in the echo area become a drag event? > > I'm guessing there's some subtle bug in some function such as > > make_lispy_event in keyboard.c. Any mouse experts who have suggestions, > > please chime in, here! > I think this is explained at the end of the node "Drag Events" in the > ELisp manual. Erm, not really. That bit explains how a drag event can become a click event, not the other way around. Thanks anyhow. I think I know why the problem is happening. When there are two lines of text in the miniwindow: (i) A down-mouse event occurs in the miniwindow: o - the mouse position relative to the top of the two-line miniwindow is stored somewhere. o - redisplay (or something) changes the two-line miniwindow into a one-line miniwindow. (ii) The up-mouse event occurs in the same place: o - the mouse position is determined RELATIVE TO THE NEWLY SIZED MINIWINDOW. o - The y coordinate is significantly different from that of the stored mouse position. o - Due to this difference, make_lispy_event thinks the mouse has moved, so returns a drag event. The above is the basic scenario. If the mouse is on the top line of the miniwindow when the mouse is clicked, the returned y coordinate at (ii) is in the mode line of the window above, and is determined relative to that window. I don't have any workable ideas on how to fix this bug. The only idea which springs to mind is to move from expressing mouse positions relative to a window to expressing it relative to a frame. Or, maybe the resizing of the miniwindow could be postponed till after the up-mouse event. Who is the mouse expert in Emacs? What does he say? -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed May 19 08:12:34 2021 Received: (at 48409) by debbugs.gnu.org; 19 May 2021 12:12:34 +0000 Received: from localhost ([127.0.0.1]:58323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljL3x-0005Kq-QD for submit@debbugs.gnu.org; Wed, 19 May 2021 08:12:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58248) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljL3w-0005Kd-He for 48409@debbugs.gnu.org; Wed, 19 May 2021 08:12:33 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46452) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljL3q-00035I-8L; Wed, 19 May 2021 08:12:26 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4092 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 1ljL3p-00088X-Dp; Wed, 19 May 2021 08:12:25 -0400 Date: Wed, 19 May 2021 15:12:35 +0300 Message-Id: <831ra2rkgc.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-Reply-To: (message from Alan Mackenzie on Tue, 18 May 2021 20:23:55 +0000) Subject: Re: bug#48409: Text runs away before user can copy it References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> <87h7j12j93.fsf@mail.linkov.net> <83bl98rxqo.fsf@gnu.org> <83k0nvrhgg.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48409 Cc: acm@muc.de, 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Tue, 18 May 2021 20:23:55 +0000 > Cc: juri@linkov.net, 48409@debbugs.gnu.org, acm@muc.de > From: Alan Mackenzie > > (i) A down-mouse event occurs in the miniwindow: > o - the mouse position relative to the top of the two-line miniwindow > is stored somewhere. > o - redisplay (or something) changes the two-line miniwindow into a > one-line miniwindow. > (ii) The up-mouse event occurs in the same place: > o - the mouse position is determined RELATIVE TO THE NEWLY SIZED > MINIWINDOW. > o - The y coordinate is significantly different from that of the > stored mouse position. > o - Due to this difference, make_lispy_event thinks the mouse has > moved, so returns a drag event. > > The above is the basic scenario. If the mouse is on the top line of the > miniwindow when the mouse is clicked, the returned y coordinate at (ii) > is in the mode line of the window above, and is determined relative to > that window. > > I don't have any workable ideas on how to fix this bug. The only idea > which springs to mind is to move from expressing mouse positions > relative to a window to expressing it relative to a frame. You could simply recalculate the position to be frame-relative, and if so, invoke the click-event binding. Right? From debbugs-submit-bounces@debbugs.gnu.org Wed May 19 11:49:59 2021 Received: (at 48409) by debbugs.gnu.org; 19 May 2021 15:49:59 +0000 Received: from localhost ([127.0.0.1]:60500 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljOSN-0007Pk-HR for submit@debbugs.gnu.org; Wed, 19 May 2021 11:49:59 -0400 Received: from colin.muc.de ([193.149.48.1]:26977 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1ljOSL-0007PU-VH for 48409@debbugs.gnu.org; Wed, 19 May 2021 11:49:58 -0400 Received: (qmail 93540 invoked by uid 3782); 19 May 2021 15:49:51 -0000 Received: from acm.muc.de (p4fe15999.dip0.t-ipconnect.de [79.225.89.153]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 19 May 2021 17:49:50 +0200 Received: (qmail 7488 invoked by uid 1000); 19 May 2021 15:49:50 -0000 Date: Wed, 19 May 2021 15:49:50 +0000 To: Eli Zaretskii Subject: Re: bug#48409: Text runs away before user can copy it Message-ID: References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> <87h7j12j93.fsf@mail.linkov.net> <83bl98rxqo.fsf@gnu.org> <83k0nvrhgg.fsf@gnu.org> <831ra2rkgc.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <831ra2rkgc.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48409 Cc: 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Eli. On Wed, May 19, 2021 at 15:12:35 +0300, Eli Zaretskii wrote: > > Date: Tue, 18 May 2021 20:23:55 +0000 > > Cc: juri@linkov.net, 48409@debbugs.gnu.org, acm@muc.de > > From: Alan Mackenzie > > (i) A down-mouse event occurs in the miniwindow: > > o - the mouse position relative to the top of the two-line miniwindow > > is stored somewhere. > > o - redisplay (or something) changes the two-line miniwindow into a > > one-line miniwindow. > > (ii) The up-mouse event occurs in the same place: > > o - the mouse position is determined RELATIVE TO THE NEWLY SIZED > > MINIWINDOW. > > o - The y coordinate is significantly different from that of the > > stored mouse position. > > o - Due to this difference, make_lispy_event thinks the mouse has > > moved, so returns a drag event. > > The above is the basic scenario. If the mouse is on the top line of the > > miniwindow when the mouse is clicked, the returned y coordinate at (ii) > > is in the mode line of the window above, and is determined relative to > > that window. > > I don't have any workable ideas on how to fix this bug. The only idea > > which springs to mind is to move from expressing mouse positions > > relative to a window to expressing it relative to a frame. > You could simply recalculate the position to be frame-relative, and if > so, invoke the click-event binding. Right? Yes, that should work. The Lisp function window-edges, with appropriate arguments, appears to do what we need. I'll try that, and see if it works. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed May 19 13:40:20 2021 Received: (at 48409) by debbugs.gnu.org; 19 May 2021 17:40:20 +0000 Received: from localhost ([127.0.0.1]:60629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljQBA-00028h-2x for submit@debbugs.gnu.org; Wed, 19 May 2021 13:40:20 -0400 Received: from mout.gmx.net ([212.227.17.20]:33685) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljQB7-00028Q-Uu for 48409@debbugs.gnu.org; Wed, 19 May 2021 13:40:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621446009; bh=H1Y/qtkjesMcaAg9CjE0LnEPnL3wMCatArNhBBL6Oik=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=EEm9vGDHaLmKxjUs6AUq/tF7wEZZT0TmfyJ181+N9rmSksdJg9W9cexrwwuT/Nts3 GHD5C7B8Cbg5iUOYQicwJ5YqhdvLQwF96bNqBLmn5MAJl/ZeF7/gnwOnLjeEIRiXPQ /Zy7hH1o8FnGeTAlx0aDQdvZRD08xme/cCpCGacE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.100] ([212.95.5.159]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1McH5Q-1lBRrx1ZbI-00cinz; Wed, 19 May 2021 19:40:09 +0200 Subject: Re: bug#48409: Text runs away before user can copy it To: Alan Mackenzie , Eli Zaretskii References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> <87h7j12j93.fsf@mail.linkov.net> <83bl98rxqo.fsf@gnu.org> <83k0nvrhgg.fsf@gnu.org> From: martin rudalics Message-ID: Date: Wed, 19 May 2021 19:40:06 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------D3DD735A746CAA41B7824F60" Content-Language: en-US X-Provags-ID: V03:K1:+mQQwymJGpqZy8E+gJjXEzuZEux5tIuZvevXKZ9RSCW2+Ol5eTn H0EWXGbZj9MUAzM2Eiermm0koAjTkPAYNQkqAC7dBHHZIakM/sftUYexmXrXVU5+F9aNmzY ZSEMRDVMKXU43DQAq7lNAgLs6HaccSLScHdm8YezaxLKCyeCJ1gyjRcHL973tpDmGrPlRA7 B+lm3hFu3gaBQQrJOEQ1A== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:W4kfwvA03Zw=:MDjR6nZLCqIQD1HcU4KjfG oWfs/pqUuwCiCNkcAXqiocZVkYwfo+yQKu3iSfN6YeSZlxRvIouqyLBTAWvVCDMtc8r8np1og cvcw8DRkP1mGasFDXmIN4Lz4N6/bsFg7S5h9cbHwABrtSo0ABVXFkRu8YiFQ+Z1xc4zI6KJji pqJeDSyY3kvx0s0MblaHial5GEusivCY85TQjq4yZ9bGF3Xa/BcINBbCxyg/T2WUPRS1HEeGd YLHqxy2tx6CsRcYc1Sx7g4yi/7PTLt/EC3+MrkHUB/CWvmN7lTZ4pPBwR0jTQy4zxf1a7MpKu md+Tl4DsPkIfAgPiUzJju1SForRcUTY5HlIYJLyCvGzYaK2HZwgyKFABCt4ohhhi+uzdmX/zx tpKg4ut5RhM0zHodflKhZmspSYbV0o9xzMRvWIIPvjQyNfziafaHCfGJsl7gn6w5ze0dZcKlF MSHgYem9dJh6vA+DQhtlATHOPVAf1CiyYrLdY+Gre2//b/prt4NlFgQzVBRcdeGIkktd9vSYO trI5zxT9asn6Q9A5ZDHkVQKdB3ZLcDuShvghC167Dr7zE53sznJatQOWrJy6MXUyzk+L1keRc IIpVrcpo3mLByxZYf4UFQHbMXGYyWMYOc6AKYixbKuJeqg5aFLyih6nqpztwJTmyMyaZuEKqw xk0xy7gh24Y2eRBtFjLtArv4MuEJiH1Cfa8winsLNhQtgpCnoEeOCzS9TONzND4J76gEnaN4Y 79Jya9G6xKt+MXO+/cINiM4PuljwYInhCKKE7G6J3N0TWTUyGC49PRVFWLvsePOjSbAfyMche 8uvSH+vfIOSCxyydpoM6ru7OZ3LcWCh/nwcSctlfdRIaAwm/rTeZYnDKuplAju74vltjb7y4r KhxZwXnUjTfHseBqvYPR/UVexe/fjI0fmd+oo6bhfEVy/feiyKtbd34lk5Mp8uXpPJDaFMfge BIrTLyVlLlYN+E1Uh1Tz33FcAopvAolso59U9RWZV93GJ8QzEEPsJ+f8g3cs2KLqjFK7wUOkh jrXuEVuy6jjrrG30Gq3AgFW+PHXMrV2aD7kMUCUXbXz70V3yqDoPzL+hlHxbmK9gldEjbyHHU X1eBZsO/bczHi+Xrim4m9IeTjVmYhfopq61 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48409 Cc: 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This is a multi-part message in MIME format. --------------D3DD735A746CAA41B7824F60 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > The above is the basic scenario. If the mouse is on the top line of the > miniwindow when the mouse is clicked, the returned y coordinate at (ii) > is in the mode line of the window above, and is determined relative to > that window. Are you sure? If the click happens on the bottom line, it's still here reported for the minibuffer window only that now the double click fuzz rigmarole breaks in and says that the mouse has moved. > I don't have any workable ideas on how to fix this bug. The only idea > which springs to mind is to move from expressing mouse positions > relative to a window to expressing it relative to a frame. Or, maybe > the resizing of the miniwindow could be postponed till after the > up-mouse event. For clicks into the bottom line the attached might help. Clicks above must be caught elsewhere. But you don't get a drag event and no error message for them. martin --------------D3DD735A746CAA41B7824F60 Content-Type: text/x-patch; name="keyboard.c.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="keyboard.c.diff" diff --git a/src/keyboard.c b/src/keyboard.c index 47b5e59024..2aa47b57fa 100644 =2D-- a/src/keyboard.c +++ b/src/keyboard.c @@ -5727,9 +5727,21 @@ make_lispy_event (struct input_event *event) it's probably OK to ignore it as well. */ && EQ (Fcar (Fcdr (start_pos)), Fcar (Fcdr (position))))) { - /* Mouse has moved enough. */ - button_down_time =3D 0; - click_or_drag_modifier =3D drag_modifier; + Lisp_Object pos_window =3D XCAR (position); + + if (EQ (XCAR (start_pos), pos_window) + && (!WINDOW_LIVE_P (pos_window) + /* Make sure down has still valid coordinates + within position's window. */ + || ((XWINDOW (pos_window)->pixel_height + >=3D XFIXNUM (XCDR (down))) + && (XWINDOW (pos_window)->pixel_width + >=3D XFIXNUM (XCAR (down)))))) + /* Mouse has moved enough. */ + { + button_down_time =3D 0; + click_or_drag_modifier =3D drag_modifier; + } } } --------------D3DD735A746CAA41B7824F60-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 20 12:55:00 2021 Received: (at 48409) by debbugs.gnu.org; 20 May 2021 16:55:00 +0000 Received: from localhost ([127.0.0.1]:35116 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljlwp-0001Oj-Ow for submit@debbugs.gnu.org; Thu, 20 May 2021 12:55:00 -0400 Received: from mout.gmx.net ([212.227.15.15]:56209) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ljlwl-0001OT-1R for 48409@debbugs.gnu.org; Thu, 20 May 2021 12:54:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621529686; bh=clTmIMu6sGoDKi5WRh+7uacEnOgxurSfhhSs88PQMKI=; h=X-UI-Sender-Class:Subject:From:To:Cc:References:Date:In-Reply-To; b=Yb9QtA28/gtPcHn4GxA9OPLgOhlqkJAM2ByuvBgSKyqssD+/+AC2EQ+KmJVYX2Lij PSV34eZ2YTgxqn3Ht505n9qsXdNfU0tPVN1MG3bl4oSmwTPNP+pHq6wULfgpmD3YT9 E7af7G2Z2v6fny1XNXLfJDX3MR/CKEJ7ARl+lGvI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.100] ([213.142.96.175]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1My32L-1lXJtZ22G7-00zaeL; Thu, 20 May 2021 18:54:46 +0200 Subject: Re: bug#48409: Text runs away before user can copy it From: martin rudalics To: Alan Mackenzie , Eli Zaretskii References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> <87h7j12j93.fsf@mail.linkov.net> <83bl98rxqo.fsf@gnu.org> <83k0nvrhgg.fsf@gnu.org> Message-ID: Date: Thu, 20 May 2021 18:54:45 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------458BA38FDF78F9747EFEE509" Content-Language: en-US X-Provags-ID: V03:K1:L186QoZPKcjMmTpKEUMBVhtwGaE4Zrfoanbh6ChmofOCa8WghNY CF3ZMq1FD1lo4TPnCET8Hly9AUUD2iVDy8h37QdLACpjgUVPqSxrNiY60AxWNcDmKypk+RP uFz3fIhlCjHVwrvRCRlYVOHa1Bukv4gN0Mh0XwQ7dzDzN9gSnCq4tbPlTTb+m+gw0Ps9dUY VmMKv6uPAhzHJKY8Xtfig== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:pleOxvQ8I3Q=:IC64bcXdSKX5RWfzR0sf1f k3ofuC2nxw24Q7AT+KV9MjgS8gkcYm/9uKpHaCZdSVbbV1HmsV7HHrSg8cp02x/PCbJOJ3PkH xu/2wfVrWX2xdFk51EDFWe1jdCuCocNzUJjOTWty2QPvkOMSEaUum+qhhkxQCMw8ga6WIgrgd ycc6Td7ZoluafHFnzrBCf52LNaVhW+ekG4owl39+C+Ph8p3ZVn2EcfUxXo6B50Che1+0KfPfz mNY3lTKgU6qV8lVRMwxpezdriB/GSpoqOFLf7NfySE+7KywpVZlHcTegT5OLBtxaM2dnJdnoV VgR0cvfRw9+FtkJnXRtpcgHnDhAk1WMV/icdN+ikkDQoErxbO8k0dWAaUAoNHrpQX2KIDwsYs NRRxGVuB/rf94viXyLvnAN3Z2e5KMWz9a4htSnNgHwdpgzFAtVISA3WwHNEDda0o9ajP7tUhJ 7+X1xiipweF7rSzqaaMSacoFFFiu+AisJJKa50huvZX14CcHBh8wdBhnKev4j+vPdYkB0p+Pw ERqKrMC6w85L/k2RZufCBIrI89cCENWxkzP9N4APHErBG7xZDK9yKVDCrUYtxI3Ofw0UWSWJ5 mhN9kvBnuSCktHXgEV9W6L+G/J+rKARFLPQSEt2k/iOcnhD4Z1c/B2qF1GKdC/vYim/IpebJY 7G6vVmtEih870KzbEI87RyGvN9HTKH+A0emRNQS5Y4vKWVtpxm/m1cTFFWS5NLF+JW3GSm4iZ zH/67/8VAEMqUjydY+n7mQFAmN3EFKBjCE3sgLXN3fvOv8VV6MVT0sYRTW0Q3SVZ92TLe4vdH c+fg1vY++VthDPiP4X2Gpn2ejJSkvgPcxWAq6EcHFu9YJAdhQYiJQWHA+s6dXpvgUG1uotoFI JlRUIPr4psSq3t1O/onDf3XOOWLmgklUJgDLekfzhsMA9PV4p25RGQIfpvNM5P1HTSRx7LfoZ LZspgMZt+e3fxeI5i+sqdr3vgpSWQfGBwpmsZ5lW7tFROjIiBqdHPdizF+3IgwzH0sjWlgrqr gJpkbsOD5bCSjzIah3wABKymD4k1NF2qMI9RhW+zJ5Tngn+pI3AxBsZ2vnRotv9iXGjf4Tquy /roW3rK61iHdQTdEqoYhuyf64A4b7O7xzRrC9yad3xcxcRoIFH2mQ63+d/tKYaWc/ta/nsR0A NnxBK8e2zC6xuArXjkY+XFoYqZ9E6WdRRQJlO/3r5Y6264MmFQbfYdEnGwDFXhrz9kZgo= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48409 Cc: 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) This is a multi-part message in MIME format. --------------458BA38FDF78F9747EFEE509 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > For clicks into the bottom line the attached might help. Clicks above > must be caught elsewhere. But you don't get a drag event and no error > message for them. The attached patch should allow clicking anywhere in the minibuffer window. Its more than kludgy but this is a bug that has annoyed me for years. martin --------------458BA38FDF78F9747EFEE509 Content-Type: text/x-patch; name="keyboard.c.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="keyboard.c.diff" diff --git a/src/keyboard.c b/src/keyboard.c index 47b5e59024..92f842f2d7 100644 =2D-- a/src/keyboard.c +++ b/src/keyboard.c @@ -5625,11 +5625,12 @@ make_lispy_event (struct input_event *event) start_pos =3D *start_pos_ptr; *start_pos_ptr =3D Qnil; + struct frame *f; + { /* On window-system frames, use the value of double-click-fuzz as is. On other frames, interpret it as a multiple of 1/8 characters. */ - struct frame *f; intmax_t fuzz; if (WINDOWP (event->frame_or_window)) @@ -5727,9 +5728,48 @@ make_lispy_event (struct input_event *event) it's probably OK to ignore it as well. */ && EQ (Fcar (Fcdr (start_pos)), Fcar (Fcdr (position))))) { - /* Mouse has moved enough. */ - button_down_time =3D 0; - click_or_drag_modifier =3D drag_modifier; + Lisp_Object start_window =3D XCAR (start_pos); + Lisp_Object pos_window =3D XCAR (position); + + /* For the minibuffer window special precautions are + needed because it may change its height in between + two clicks. */ + if (WINDOW_LIVE_P (pos_window) + && WINDOW_LIVE_P (start_window) + && MINI_WINDOW_P (XWINDOW (start_window))) + { + struct window *start_w =3D XWINDOW (start_window); + struct window *pos_w =3D XWINDOW (pos_window); + + if (start_w =3D=3D pos_w + && WINDOW_PIXEL_HEIGHT (pos_w) >=3D XFIXNUM (XCDR (down)) + && WINDOW_PIXEL_WIDTH (pos_w) >=3D XFIXNUM (XCAR (down))) + /* Mouse has moved enough. */ + { + button_down_time =3D 0; + click_or_drag_modifier =3D drag_modifier; + } + else if (start_w !=3D pos_w + && (WINDOW_PIXEL_HEIGHT (start_w) >=3D XFIXNUM (XCDR (down)) + || WINDOW_PIXEL_WIDTH (start_w) >=3D XFIXNUM (XCDR (down)))) + /* Artificially move mouse into the minibuffer + window's new text area. */ + position + =3D make_lispy_position (f, + make_fixnum (WINDOW_BOX_LEFT_EDGE_X (start_w) + + WINDOW_LEFT_FRINGE_WIDTH (start_w) + + WINDOW_LEFT_MARGIN_WIDTH (start_w) + + 1), + make_fixnum (WINDOW_TOP_EDGE_Y (start_w) + 1), + event->timestamp); + } + else + /* Mouse has moved enough. */ + { + button_down_time =3D 0; + click_or_drag_modifier =3D drag_modifier; + } + } } --------------458BA38FDF78F9747EFEE509-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 21 16:55:40 2021 Received: (at 48409) by debbugs.gnu.org; 21 May 2021 20:55:40 +0000 Received: from localhost ([127.0.0.1]:37867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkCBH-0003IF-Ok for submit@debbugs.gnu.org; Fri, 21 May 2021 16:55:40 -0400 Received: from colin.muc.de ([193.149.48.1]:54203 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lkCBC-0003HO-AP for 48409@debbugs.gnu.org; Fri, 21 May 2021 16:55:38 -0400 Received: (qmail 30226 invoked by uid 3782); 21 May 2021 20:55:27 -0000 Received: from acm.muc.de (p4fe15bd1.dip0.t-ipconnect.de [79.225.91.209]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 21 May 2021 22:55:27 +0200 Received: (qmail 20335 invoked by uid 1000); 21 May 2021 20:55:27 -0000 Date: Fri, 21 May 2021 20:55:27 +0000 To: martin rudalics Subject: Re: bug#48409: Text runs away before user can copy it Message-ID: References: <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> <87h7j12j93.fsf@mail.linkov.net> <83bl98rxqo.fsf@gnu.org> <83k0nvrhgg.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48409 Cc: Eli Zaretskii , 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Martin. On Thu, May 20, 2021 at 18:54:45 +0200, martin rudalics wrote: > > For clicks into the bottom line the attached might help. Clicks above > > must be caught elsewhere. But you don't get a drag event and no error > > message for them. > The attached patch should allow clicking anywhere in the minibuffer > window. Its more than kludgy but this is a bug that has annoyed me > for years. I've been laboriously working out a patch, too, and have come up with the one below. It takes a surprisingly similar approach to your own patch [snipped], but doesn't test for a minibuffer, so perhaps is more general. I didn't actually study your patch till my own was nearly finished. To detect mouse movement, my patch changes from comparing window relative x, y to frame relative x, y. If the code detects no movement, but a different window, the position of the up event is changed to be inside the window of the down event. diff --git a/src/keyboard.c b/src/keyboard.c index 47b5e59024..08386e0685 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -5022,6 +5022,10 @@ static short const internal_border_parts[] = { static Lisp_Object button_down_location; +/* A cons recording the original frame-relative x and y coordinates of + the down mouse event. */ +static Lisp_Object frame_relative_event_pos; + /* Information about the most recent up-going button event: Which button, what location, and what time. */ @@ -5673,6 +5677,7 @@ make_lispy_event (struct input_event *event) double_click_count = 1; button_down_time = event->timestamp; *start_pos_ptr = Fcopy_alist (position); + frame_relative_event_pos = Fcons (event->x, event->y); ignore_mouse_drag_p = false; } @@ -5695,20 +5700,12 @@ make_lispy_event (struct input_event *event) ignore_mouse_drag_p = false; else { - Lisp_Object new_down, down; intmax_t xdiff = double_click_fuzz, ydiff = double_click_fuzz; - /* The third element of every position - should be the (x,y) pair. */ - down = Fcar (Fcdr (Fcdr (start_pos))); - new_down = Fcar (Fcdr (Fcdr (position))); - - if (CONSP (down) - && FIXNUMP (XCAR (down)) && FIXNUMP (XCDR (down))) - { - xdiff = XFIXNUM (XCAR (new_down)) - XFIXNUM (XCAR (down)); - ydiff = XFIXNUM (XCDR (new_down)) - XFIXNUM (XCDR (down)); - } + xdiff = XFIXNUM (event->x) + - XFIXNUM (XCAR (frame_relative_event_pos)); + ydiff = XFIXNUM (event->y) + - XFIXNUM (XCDR (frame_relative_event_pos)); if (! (0 < double_click_fuzz && - double_click_fuzz < xdiff @@ -5725,12 +5722,51 @@ make_lispy_event (struct input_event *event) a click. But mouse-drag-region completely ignores this case and it hasn't caused any real problem, so it's probably OK to ignore it as well. */ - && EQ (Fcar (Fcdr (start_pos)), Fcar (Fcdr (position))))) + && (EQ (Fcar (Fcdr (start_pos)), + Fcar (Fcdr (position))) /* Same buffer pos */ + || !EQ (Fcar (start_pos), + Fcar (position))))) /* Different window */ { /* Mouse has moved enough. */ button_down_time = 0; click_or_drag_modifier = drag_modifier; } + else if (((!EQ (Fcar (start_pos), Fcar (position))) + || (!EQ (Fcar (Fcdr (start_pos)), + Fcar (Fcdr (position))))) + /* Was the down event in a window body? */ + && FIXNUMP (Fcar (Fcdr (start_pos))) + && WINDOW_LIVE_P (Fcar (start_pos)) + && Ffboundp (Qwindow_edges)) + /* If the window (etc.) at the mouse position has + changed between the down event and the up event, + we assume there's been a redisplay between the + two events, and we pretend the mouse is still in + the old window to prevent a spurious drag event + being generated. */ + { + Lisp_Object edges + = call4 (Qwindow_edges, Fcar (start_pos), Qt, Qnil, Qt); + int new_x = XFIXNUM (Fcar (frame_relative_event_pos)); + int new_y = XFIXNUM (Fcdr (frame_relative_event_pos)); + + /* If the up-event is outside the down-event's + window, use coordinates that are within it. */ + if (new_x < XFIXNUM (Fcar (edges))) + new_x = XFIXNUM (Fcar (edges)); + else if (new_x >= XFIXNUM (Fcar (Fcdr (Fcdr (edges))))) + new_x = XFIXNUM (Fcar (Fcdr (Fcdr (edges)))) - 1; + if (new_y < XFIXNUM (Fcar (Fcdr (edges)))) + new_y = XFIXNUM (Fcar (Fcdr (edges))); + else if (new_y + >= XFIXNUM (Fcar (Fcdr (Fcdr (Fcdr (edges)))))) + new_y = XFIXNUM (Fcar (Fcdr (Fcdr (Fcdr (edges))))) - 1; + + position = make_lispy_position + (XFRAME (event->frame_or_window), + make_fixnum (new_x), make_fixnum (new_y), + event->timestamp); + } } /* Don't check is_double; treat this as multiple if the @@ -11649,6 +11685,7 @@ syms_of_keyboard (void) DEFSYM (Qmake_frame_visible, "make-frame-visible"); DEFSYM (Qselect_window, "select-window"); DEFSYM (Qselection_request, "selection-request"); + DEFSYM (Qwindow_edges, "window-edges"); { int i; @@ -11665,6 +11702,7 @@ syms_of_keyboard (void) button_down_location = make_nil_vector (5); staticpro (&button_down_location); + staticpro (&frame_relative_event_pos); mouse_syms = make_nil_vector (5); staticpro (&mouse_syms); wheel_syms = make_nil_vector (ARRAYELTS (lispy_wheel_names)); > martin -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat May 22 04:05:17 2021 Received: (at 48409) by debbugs.gnu.org; 22 May 2021 08:05:17 +0000 Received: from localhost ([127.0.0.1]:38278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkMdI-00058F-PI for submit@debbugs.gnu.org; Sat, 22 May 2021 04:05:17 -0400 Received: from mout.gmx.net ([212.227.15.19]:45095) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkMdG-000581-Jg for 48409@debbugs.gnu.org; Sat, 22 May 2021 04:05:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621670707; bh=67sXMTlXOYFVP67JvgXSUAd/2H0T0kRpwYtKsiEpQM4=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=VPlQfYSC4iMFQm/Ndy525SCSB09wd/GFs949/UAg1zh3NyQqA5IFZSTV6uNLtBPtj 0J+oQNKsGU2TlV0GoUnZGPfSL/niqL3ornuOfqMLTj5Qz0QZSVn9I0C5kVtu1VrDG6 RbE7OV/MzYH4tht5WcgDne3VsxCr2mElOSBcUmUU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.100] ([213.142.96.249]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M8ykW-1lqOlo3Lr4-0066dB; Sat, 22 May 2021 10:05:06 +0200 Subject: Re: bug#48409: Text runs away before user can copy it To: Alan Mackenzie References: <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> <87h7j12j93.fsf@mail.linkov.net> <83bl98rxqo.fsf@gnu.org> <83k0nvrhgg.fsf@gnu.org> From: martin rudalics Message-ID: <844b5fd3-7d5a-a00a-00e6-4b853de199fa@gmx.at> Date: Sat, 22 May 2021 10:05:05 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:BEJ9N4NYfZeYAwTqX1ZgaQjKV1CUb8AKSWCz6JtYnhlG8RPIkTX G166K+HcXjhPDogVUteUYSJYX1qfarn2KuLWwVMr/DckhPVKujrRhkx3n+6t/VdylhgOvVr Yjd8Nfew+1JzlqBMmziV2dQzsQSSadmPgKcK9FzRHVkuhEuFKGNQUY6XZX+9J+3QgUo1uBz 4c5cazeHvqHLzZ0EE0CzA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:1w2ioJTElq8=:PooLQpGMomPXhKM99QtQST Ju1u068vuh48JZZS7go/TnlHFoI8GvxF6dIxUTl+vE0nzNl0fpVXAYJYkRFlvdltK1VHESoFp RcBP6Vlogt5lauA7rZBjbf1DWmNQhWv7T/DI06z8ZRhlhOIyl4Acjrsz20CsHpUIYt+ndc5s+ 3WlhS1mmr/i2rrJtnKH07SXl7dw5G1XUUjvByqupJEON0SmaE81XfglCN3YJ+cacsABTXnMY+ o24+A9EWbZ1/Vj7E9RFhjMb3p4GLP0dLJErP7PVsWNMd6NQW+Tr5JNSlwao/cXDBeQXSGNrYT pMlWyGA1GGOc4mvGKzFDA+Hmor+oyqAL8a4HIUzyxm025IP8hGX506QBKkOvMhea8MLwjV9Iw ImOcN+Mfkitqx1I5gh3ydQZsQDCiGRY5iA6YRIAg57kPtcYGR1YrUZuBAAozg5xs8BmkRPiec XKQE3qLF7kk3ZV+desJzA40QpOv0lAXBZ3xVMo2QB8a2etRz6KcEkFKEVwR8ZO7Aj9NKf9+1n mA8EZORA5NECcTax6YqUrgsCknqxxUxBY0KWY91QJKzpyRLF6imQlHLTg1Kk/cbQMcTxBpzsy hKcT4gFEjNe0NkJ6J7pYIcocb+83eF4S3fhks6rMkN8Ki2SYiNshayVh962885ARoX66iTdaJ LWK3cu4PwtOiGcLLXvbwUFkdDJv9Khc7bXa2xo4w73XQ6SQg9RG7hvjNymrq+UMOIpbha6n5R SeQZhC0mQS03wUq2ivFCFmZcMjy2e65RyTT0VCUP1jJ/Y3QEjzkba5lvh6pwM1efwmb3Pp7Ma lQZSNzJFnY6tf0iZuA6k/f8OBeaQ1Y0UVttWGYObO208g/z35WikhpePHTmYoGMl68DleQkyq dtyFb+f7QTz3MEDtK8PcQSiKZ7q26YN0jTwz/LIpdgDYkmSp3+io/UZc/E35CiMFovu7QUVzY NU57ERVzyTAjxvjVMk16/xCIqGUAiCjh85i4F+EYBEXpsL16bHU/18FhzEmd062Xid3lTSBXv UoBkc+7DXoGFgvY+u6wNvlAO0aiwxHAgMl1WXbyEbz9dLSdHpjwYsC6X9CPa4zxljtRixx9GO utdopacpsWMMY1nrhyv05876Zyu+Y+RRh/C1OEWODUx5Y+Ax3Vtplx/9AXT2aSv6w48ZVpcwc yKW6OZOFsfUrgrPRWB0RxKZZDxd7UGT8g9pgTVo8ZufAYwTSxqFfGzPzfz2iQR0PxRQJg= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48409 Cc: Eli Zaretskii , 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > I've been laboriously working out a patch, too, and have come up with > the one below. It takes a surprisingly similar approach to your own > patch [snipped], but doesn't test for a minibuffer, so perhaps is more > general. I didn't actually study your patch till my own was nearly > finished. I didn't include the minibuffer check initially. But since I can't think of any other occasion where we would change window coordinates in between a down and up event, I thought it's cheaper to use it. > To detect mouse movement, my patch changes from comparing window > relative x, y to frame relative x, y. In order to identify clicks on the bottom line, I check whether the top y-coordinate of the (mini-)window has changed. If it has changed, I simply declare that no mouse movement occurred. Comparing frame relative coordinates is cleaner at the expense of having to store them always for each button down event. > If the code detects no movement, > but a different window, the position of the up event is changed to be > inside the window of the down event. I didn't check that part but I think that using `window-edges' here is slightly over-engineered. OTOH, it gives you the body of the minibuffer window at no cost. So I'm undecided what's better. Am I right that you return a position near the upper right corner of the window? If so why? Finally, I'm now completely lost wrt what our patches are trying to achieve. Ruling out drag events when there are none is not a bad idea. But do we really want to show echo area messages even when there is no echo in the first place? Or am I missing something? martin From debbugs-submit-bounces@debbugs.gnu.org Sat May 22 07:42:28 2021 Received: (at 48409) by debbugs.gnu.org; 22 May 2021 11:42:29 +0000 Received: from localhost ([127.0.0.1]:38397 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkQ1U-00048s-Iz for submit@debbugs.gnu.org; Sat, 22 May 2021 07:42:28 -0400 Received: from colin.muc.de ([193.149.48.1]:21547 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lkQ1R-00048c-Pz for 48409@debbugs.gnu.org; Sat, 22 May 2021 07:42:26 -0400 Received: (qmail 15306 invoked by uid 3782); 22 May 2021 11:42:19 -0000 Received: from acm.muc.de (p4fe1563e.dip0.t-ipconnect.de [79.225.86.62]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 22 May 2021 13:42:19 +0200 Received: (qmail 4843 invoked by uid 1000); 22 May 2021 11:42:18 -0000 Date: Sat, 22 May 2021 11:42:18 +0000 To: martin rudalics Subject: Re: bug#48409: Text runs away before user can copy it Message-ID: References: <83mtsxxfo8.fsf@gnu.org> <87h7j12j93.fsf@mail.linkov.net> <83bl98rxqo.fsf@gnu.org> <83k0nvrhgg.fsf@gnu.org> <844b5fd3-7d5a-a00a-00e6-4b853de199fa@gmx.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <844b5fd3-7d5a-a00a-00e6-4b853de199fa@gmx.at> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48409 Cc: acm@muc.de, Eli Zaretskii , 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Martin. On Sat, May 22, 2021 at 10:05:05 +0200, martin rudalics wrote: > > I've been laboriously working out a patch, too, and have come up > > with the one below. It takes a surprisingly similar approach to > > your own patch [snipped], but doesn't test for a minibuffer, so > > perhaps is more general. I didn't actually study your patch till my > > own was nearly finished. > I didn't include the minibuffer check initially. But since I can't > think of any other occasion where we would change window coordinates in > between a down and up event, I thought it's cheaper to use it. I can't think of any other sensible use where the window layout might change, either. But if somebody puts a command on down-mouse-1 which does this, we might end up generating a spurious drag event. It's difficult to predict precisely what people might do with Emacs. > > To detect mouse movement, my patch changes from comparing window > > relative x, y to frame relative x, y. > In order to identify clicks on the bottom line, I check whether the top > y-coordinate of the (mini-)window has changed. If it has changed, I > simply declare that no mouse movement occurred. Comparing frame > relative coordinates is cleaner at the expense of having to store them > always for each button down event. Yes. Such are the decisions one has, somewhat arbitrarily, to make. ;-) > > If the code detects no movement, but a different window, the > > position of the up event is changed to be inside the window of the > > down event. > I didn't check that part but I think that using `window-edges' here is > slightly over-engineered. I was considering using the available C functions, but in the end decided it was too much bother. ;-( At least the processing here isn't time-critical. > OTOH, it gives you the body of the minibuffer window at no cost. So > I'm undecided what's better. Am I right that you return a position > near the upper right corner of the window? If so why? No, I don't think that's the case. If the up event position is outside the window, I move it to the nearest border (at a left/top border, or (1- border) for a right/bottom border). > Finally, I'm now completely lost wrt what our patches are trying to > achieve. Ruling out drag events when there are none is not a bad idea. I think it's a good idea. Diagnosing the original symptoms was quite a bit harder than for most bugs, so it would be good to try to avoid similar things happening again. > But do we really want to show echo area messages even when there is no > echo in the first place? You mean, is view-echo-area-messages really a sensible command to bind to mouse-1? I wasn't actually aware of this facility until Juri (or was it Drew?) pointed it out in the bug report. It's not something I use myself (on a Linux tty with gpm-mouse-mode disabled). > Or am I missing something? I don't think so. > martin -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat May 22 10:36:57 2021 Received: (at 48409) by debbugs.gnu.org; 22 May 2021 14:36:57 +0000 Received: from localhost ([127.0.0.1]:39953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkSkL-0002dA-1M for submit@debbugs.gnu.org; Sat, 22 May 2021 10:36:57 -0400 Received: from mout.gmx.net ([212.227.17.22]:36659) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkSkE-0002cq-QS for 48409@debbugs.gnu.org; Sat, 22 May 2021 10:36:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621694202; bh=faF4E7pL1yXsunfCbphda9Yz23XXI7ibgfmWcXdxVPQ=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=GaUrmIU7rBPD8UpTTYGrqkUXHcB4Nd2CjYWKU12COG3txwLBhAk0QfvD0++Yk4JlP pqqBLF+F/Bv9deGLtS8i5MSnlMDwAc1erkaJjycDcDyLzPzuTYPVWkZ2/npMpfpseI WLxmzTJERheB2KsSTuISKwWBnWWXY1R2e3jvzZHc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.100] ([213.142.96.249]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N2mBQ-1lJCyc1joa-0135Qf; Sat, 22 May 2021 16:36:42 +0200 Subject: Re: bug#48409: Text runs away before user can copy it To: Alan Mackenzie References: <83mtsxxfo8.fsf@gnu.org> <87h7j12j93.fsf@mail.linkov.net> <83bl98rxqo.fsf@gnu.org> <83k0nvrhgg.fsf@gnu.org> <844b5fd3-7d5a-a00a-00e6-4b853de199fa@gmx.at> From: martin rudalics Message-ID: <713df055-e60b-16e7-42df-050892dc40b2@gmx.at> Date: Sat, 22 May 2021 16:36:40 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:Xu+yvj+MIQ2Ex9UHwfwYSkCKoSIsL0NNKS1fPs1SYXMlY9RkRqs ibrXPZlM1mE/UGDVKTRauhIgUPxx1rCQtHF/yN7WOccQOxqGgok7Te+fr8rbr8RFDANE9PX 3Q+Z2TOISmkJxeiB/inLk7rZBvlsoRy9roSHDoxdceBim7B6pTBNkVEjqUTmZcLFvqSzmHR OdXS47zuibH/crhNJ3gdQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:7Grh/kRx+HE=:nqUFhzwU/k0TxDjz7eNbMy RLh6Jf2t382g9pbfu/c7sejhvJfEvwPUQgti/Eftf95mzQdiYtWNlhQniEAIKWGCT+uYbiJB7 rEOav9Ux6cWLeqBykem66q3sDiWRMMPnKqETNy1l1LdYv3UKBLiEY72wywIgzN/0xu2WsSJ8/ np13NxoAzTfbq7bOhU6+WrFQ8EIaLm3RcxU4cDSvHRMy+Mm1MSgx49Yc8B4kTHh9kwwQfWTrQ H0RyKK17rGMVgd74LWKPjPGcRoVEtGB/oQ+Wb+v7hYPDQSof0arhuea7BREITBOSKkfg9XHjs D7tQDaAHkET6zlCPbOGRz6MI1mNVhuGUn95trIgWg5YvoSxrgkHLCfss6vEwVNOrK6hzbhS7J bWe+z6jbdST2K65mcUhEKEWeyiuc9RmbyLHLX5Tjta3zXvwm7MJZcMpwtU5nMKcM7PQ9K921e e+h5ieTG1jAFgeGQuqYR9URQb4gG2fT8ytZHmK5ao23VuDeUCrBrWd+lQOvURuZSU7CLiXTHw bGpQUYSudrFb8n2LS4M8FT06YWAQSPsINa+zU0+0PimzxyKAqmVMThtqP9fj4CMx8lSQ+p0od yyuJp5qX1/1kDg+AGjXDMnTHVghw67v8UQDWvDnhZdQOvTK77tfzGczdVyo0DHhRGkmJtFYPh YL5nNYH6B/VkftbuLaqg7dwSH0mUPLnP4dmSvuab0St5ebbPdLumJXw9XnW6Jp5rduZuHsh4c AKFpoZy2jWliVzXKSOVeS/OLdMi2VG6HskMzLpXK/k3VLwdUPMGYsY1KqH9CoWrlQqhs/lOAi SCXsBgwGHCmcHftDv28LEB7i77diooSPTWgUJ3bMMMZH+9AOyLBEgsVgBqBkbfezFB6Qd0QF/ ordrFn58plVTGphFyhDP6XKhOqG1TGFvBC8vxDStrpHSRHn5UXz6q+kr3kRopVyevV4+IYy7X I5BK90eOurLbC3z+fY11UEgVrx9dX9Dq317Mvw5QjjekIH+NCJGlO9cBIyrJWhnllk4IUY1QZ gWm4Xt2/AOHP3kG4PhtNPVVPVPeNWJGuOx9mpJ9hmO4uRd0zkhxdQ2vuucAHQFjmGyONL+xVE ciuYQ2WdyT4UTzY3vzmlzEAIi5frnGoq5uCsWgzIXnkqlifUNfnJCWwk+UqkICxNzwRWti0xM S/OMxchLORqZ7nxaLki0ST4ggjePAKyXfWvB8m0VfknsilXgHU6nbnERNpM67BfhGBWsY= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48409 Cc: Eli Zaretskii , 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> But do we really want to show echo area messages even when there is no >> echo in the first place? > > You mean, is view-echo-area-messages really a sensible command to bind to > mouse-1? I wasn't actually aware of this facility until Juri (or was it > Drew?) pointed it out in the bug report. It's not something I use myself > (on a Linux tty with gpm-mouse-mode disabled). I just wouldn't want to have the echo area messages pop up whenever I accidentally click into an empty minibuffer window. So far this was no issue because the mouse code prevented it ... martin From debbugs-submit-bounces@debbugs.gnu.org Sat May 22 11:12:18 2021 Received: (at 48409) by debbugs.gnu.org; 22 May 2021 15:12:18 +0000 Received: from localhost ([127.0.0.1]:39964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkTIX-0003S0-U8 for submit@debbugs.gnu.org; Sat, 22 May 2021 11:12:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkTIV-0003Rm-7k for 48409@debbugs.gnu.org; Sat, 22 May 2021 11:12:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60710) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkTIN-0005ka-Sl; Sat, 22 May 2021 11:12:07 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4627 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 1lkTIN-0005tx-EK; Sat, 22 May 2021 11:12:07 -0400 Date: Sat, 22 May 2021 18:12:06 +0300 Message-Id: <83r1hykdkp.fsf@gnu.org> From: Eli Zaretskii To: martin rudalics In-Reply-To: <713df055-e60b-16e7-42df-050892dc40b2@gmx.at> (message from martin rudalics on Sat, 22 May 2021 16:36:40 +0200) Subject: Re: bug#48409: Text runs away before user can copy it References: <83mtsxxfo8.fsf@gnu.org> <87h7j12j93.fsf@mail.linkov.net> <83bl98rxqo.fsf@gnu.org> <83k0nvrhgg.fsf@gnu.org> <844b5fd3-7d5a-a00a-00e6-4b853de199fa@gmx.at> <713df055-e60b-16e7-42df-050892dc40b2@gmx.at> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48409 Cc: acm@muc.de, 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: Eli Zaretskii , 48409@debbugs.gnu.org, juri@linkov.net > From: martin rudalics > Date: Sat, 22 May 2021 16:36:40 +0200 > > I just wouldn't want to have the echo area messages pop up whenever I > accidentally click into an empty minibuffer window. But that exactly what has been happening in Emacs 27 and before, since this feature was added in Emacs 24. And it _is_ a feature. From debbugs-submit-bounces@debbugs.gnu.org Sat May 22 12:36:37 2021 Received: (at 48409) by debbugs.gnu.org; 22 May 2021 16:36:37 +0000 Received: from localhost ([127.0.0.1]:39974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkUc9-0005NR-DJ for submit@debbugs.gnu.org; Sat, 22 May 2021 12:36:37 -0400 Received: from mout.gmx.net ([212.227.15.19]:34187) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkUc4-0005NB-TF for 48409@debbugs.gnu.org; Sat, 22 May 2021 12:36:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1621701385; bh=E4XO16Q4KvlqejY3Xras9YgWOeM4atghP/AMshMkPKg=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=L2QVzyCwrlzkoFoWTgm3lpc9S/9/s3lIKxDqpgh/e08useCRUEa3poHo7EX87zkoo cLerdToyXI6alQixjzAhBtX/nBE45rApAcfjxoAlLO7r2li4YXjaBcPWQavykrxaRu npknWLZhMv/MIy71ORK4+BoNKrxK7ao/H/3qhF+c= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.100] ([213.142.96.249]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M6lpM-1loKtq3sQI-008JdS; Sat, 22 May 2021 18:36:25 +0200 Subject: Re: bug#48409: Text runs away before user can copy it To: Eli Zaretskii References: <83mtsxxfo8.fsf@gnu.org> <87h7j12j93.fsf@mail.linkov.net> <83bl98rxqo.fsf@gnu.org> <83k0nvrhgg.fsf@gnu.org> <844b5fd3-7d5a-a00a-00e6-4b853de199fa@gmx.at> <713df055-e60b-16e7-42df-050892dc40b2@gmx.at> <83r1hykdkp.fsf@gnu.org> From: martin rudalics Message-ID: Date: Sat, 22 May 2021 18:36:23 +0200 MIME-Version: 1.0 In-Reply-To: <83r1hykdkp.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:WrinK721WpRNE5MfwxSzE0M9GPoavcM7CyjJtcnQuz//yjgYfjU u5Qe/MIPC/V/EcJbocCaqxZRkCayBDD6ZxwMGMspE+oOEjUNVBHAjGQSjbhhsstzdw+YxEY NYDuQoYinnA5xi6WnQa9fOfaAWs83xpK45zNmIg9P5V9GDensVP3PnnGU1MtbMZOPRPMUH0 kOabfxG/WP3/bm0BOaSdg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ScUnWkRbp8M=:ZY0+v4S5EvNgbFTaItZRpA NaZ2C8n6A4dwLODOApVA0OpoHdwFH2uD0CbnYTXtXr+WyNgaKciA2/eO6hNZzJ6lawusp5sKJ kfXnyGhUVp0oResXSRnX2UbuRH6H2G/xj0cPCN9C3Be8byPB+ZrjSuWPGwF7Pyy7aS4QmHL22 GWR+lr531OKYqdsuxGDrFbjmmYCprPvs172wSB4VSS33lp9CaV83xPqh7WQTEmSjLaoKlwiLO vDGcHIqAHGAiPBLMNse09ZItwrrIDJLJy+sYYO+8Pjcl1jfwHSec2XVZ0+okkrUuEi+OsmztG Cu7ccI7trg1AItHhU/kssF5WPUsyNQjJDv5wlhVFhowL6xm1zmbN8XdzIfQX9XglTtf7Yo8v3 Zc3TW6R3HgOD51AAqSND9sImLLx0JZerQyWxDAkF2B1GKThfoV/KbA3bpeTEAYDxPCYwqdpdS 0ipw6DLYRWC6Wroq767UYHATxKA3PnKu1qhnxqo+xfNLu/bTTzYWB2yC5AZOO47u3GC9Wp808 UJvoopVfn/LkGjFbiRbkc8TaNk8R1A+yKcxdFFi+BNdtmGfClKjuktEaQRyivC8M0n8vQLl0J DgJp2IyGwX6iHI15hLvYJcw3mP5baertC9jQZDk41P8bwDgl3MG9P0ntTc7fyhC2WeKHrl34A WpBe3CatcnaLnCdLjaPThL4EBMqQzzROOashSeSl4ac0nqjTvTtffzL+3+O/E9AFwmu7uDu2E sXgcS3LWFNcDF4sxdcQlW8L7FprNmhkHLBa4qAj6IqUUwCgGf7BEYi+WZk6NGhvDHlTcBNlGg Mtx0YS6T593nhkgBRMPMgK23gtQByhzBZGRgY2y4uGcJOGTFg5ogQOaSdfxr7IdyQp9/44MRS o1eIPoFxSWMPOA5JJ98+1Gr/4p1s8KAcLD7Kf4RRUDbi8mu9HphOPUu5NHI92vQMgkr3jXDnz acCex1GtW089ytAYhH4fJwoEEIzxgQt891Vy8jbGt43EaEaL3YfdBbw2ZiNz/XZFLTt5vX6li Z1jHw6/2qCGsAqSQuxuO90sOk96O6aLAg6QTFKNUxqC0vkDuEbLhsbgtUge1EWrw9F7CWxhNe /hItGgkuX9cP8evRwEGRHrb+JWtImvzSH+B4MBTiGyi8D3hAnwthXG/wFR/YrRiTePnj5M4AM 4ibzGBnKk1oW+43vloRrqEGDLZpbGvJhmOo1EfGuPoPMwIDaff8syNjkfbsb4CNOXCzgA= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48409 Cc: acm@muc.de, 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) >> I just wouldn't want to have the echo area messages pop up whenever I >> accidentally click into an empty minibuffer window. > > But that exactly what has been happening in Emacs 27 and before, since > this feature was added in Emacs 24. And it _is_ a feature. It never worked with an auto-resizing minibuffer window where it might be a feature. But since I never noticed it before, it's apparently no great nuisance either. martin From debbugs-submit-bounces@debbugs.gnu.org Sun May 30 11:44:11 2021 Received: (at 48409) by debbugs.gnu.org; 30 May 2021 15:44:11 +0000 Received: from localhost ([127.0.0.1]:60203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnNbm-0001ob-NA for submit@debbugs.gnu.org; Sun, 30 May 2021 11:44:10 -0400 Received: from colin.muc.de ([193.149.48.1]:60885 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lnNbj-0001ny-Ed for 48409@debbugs.gnu.org; Sun, 30 May 2021 11:44:10 -0400 Received: (qmail 33468 invoked by uid 3782); 30 May 2021 15:44:01 -0000 Received: from acm.muc.de (p2e5d5a0f.dip0.t-ipconnect.de [46.93.90.15]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 30 May 2021 17:44:01 +0200 Received: (qmail 18876 invoked by uid 1000); 30 May 2021 15:44:00 -0000 Date: Sun, 30 May 2021 15:44:00 +0000 To: martin rudalics Subject: Re: bug#48409: Text runs away before user can copy it Message-ID: References: <87h7j12j93.fsf@mail.linkov.net> <83bl98rxqo.fsf@gnu.org> <83k0nvrhgg.fsf@gnu.org> <844b5fd3-7d5a-a00a-00e6-4b853de199fa@gmx.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48409 Cc: acm@muc.de, Eli Zaretskii , 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Martin. The conversation about this bug has gone a bit quiet. It seems neither of us has got much more to say about it. I propose committing my patch in the next day or two. If there's anything more to say about it, please let me know, soon. Thanks! On Sat, May 22, 2021 at 11:42:18 +0000, Alan Mackenzie wrote: > On Sat, May 22, 2021 at 10:05:05 +0200, martin rudalics wrote: > > > I've been laboriously working out a patch, too, and have come up > > > with the one below. It takes a surprisingly similar approach to > > > your own patch [snipped], but doesn't test for a minibuffer, so > > > perhaps is more general. I didn't actually study your patch till my > > > own was nearly finished. > > I didn't include the minibuffer check initially. But since I can't > > think of any other occasion where we would change window coordinates in > > between a down and up event, I thought it's cheaper to use it. > I can't think of any other sensible use where the window layout might > change, either. But if somebody puts a command on down-mouse-1 which > does this, we might end up generating a spurious drag event. It's > difficult to predict precisely what people might do with Emacs. > > > To detect mouse movement, my patch changes from comparing window > > > relative x, y to frame relative x, y. > > In order to identify clicks on the bottom line, I check whether the top > > y-coordinate of the (mini-)window has changed. If it has changed, I > > simply declare that no mouse movement occurred. Comparing frame > > relative coordinates is cleaner at the expense of having to store them > > always for each button down event. > Yes. Such are the decisions one has, somewhat arbitrarily, to make. ;-) > > > If the code detects no movement, but a different window, the > > > position of the up event is changed to be inside the window of the > > > down event. > > I didn't check that part but I think that using `window-edges' here is > > slightly over-engineered. > I was considering using the available C functions, but in the end decided > it was too much bother. ;-( At least the processing here isn't > time-critical. > > OTOH, it gives you the body of the minibuffer window at no cost. So > > I'm undecided what's better. Am I right that you return a position > > near the upper right corner of the window? If so why? > No, I don't think that's the case. If the up event position is outside > the window, I move it to the nearest border (at a left/top border, or (1- > border) for a right/bottom border). > > Finally, I'm now completely lost wrt what our patches are trying to > > achieve. Ruling out drag events when there are none is not a bad idea. > I think it's a good idea. Diagnosing the original symptoms was quite a > bit harder than for most bugs, so it would be good to try to avoid > similar things happening again. > > But do we really want to show echo area messages even when there is no > > echo in the first place? > You mean, is view-echo-area-messages really a sensible command to bind to > mouse-1? I wasn't actually aware of this facility until Juri (or was it > Drew?) pointed it out in the bug report. It's not something I use myself > (on a Linux tty with gpm-mouse-mode disabled). > > Or am I missing something? > I don't think so. > > martin -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Mon May 31 03:55:56 2021 Received: (at 48409) by debbugs.gnu.org; 31 May 2021 07:55:56 +0000 Received: from localhost ([127.0.0.1]:60981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lncmB-0003ow-TD for submit@debbugs.gnu.org; Mon, 31 May 2021 03:55:56 -0400 Received: from mout.gmx.net ([212.227.15.18]:51445) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lncm9-0003of-Sh for 48409@debbugs.gnu.org; Mon, 31 May 2021 03:55:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1622447746; bh=uaTdJdcpQAO6J/O85EbHv5oovQtRfi3ieumEebpNhaY=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=RWQhJ5Ig1OlroppOFwrMibBg3xKxg1FWG1aZOY4vshw6VR0ofvm8aXIP/cP2/UUTQ uaA6PWe1x6ndlT0Ren3za+jyX5aCwKCeKJfm1B9Y8LVHZ5DIJmYA/0W6wsujTqaMq3 fIdtCY7H5wI51xtHB4UqbVyHe5ozJ3E7rwJsbvd0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.100] ([213.142.96.227]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MtOKi-1lXbnI2lfq-00urvc; Mon, 31 May 2021 09:55:46 +0200 Subject: Re: bug#48409: Text runs away before user can copy it To: Alan Mackenzie References: <87h7j12j93.fsf@mail.linkov.net> <83bl98rxqo.fsf@gnu.org> <83k0nvrhgg.fsf@gnu.org> <844b5fd3-7d5a-a00a-00e6-4b853de199fa@gmx.at> From: martin rudalics Message-ID: <48492d79-c150-1651-f6c1-91ac4843581a@gmx.at> Date: Mon, 31 May 2021 09:55:45 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:1Ui2W+Pk8vnsErvMYRuYtM5XFm7GLFoq188JbXPp+TfYee1GIKl FGVUrI4b2llpEhhPYQZObaBf1aiLo8cFSOqsN8Jj0eNTLd2TMB6CJ1GjI0LCwgiRqzy8N8h 991DugAryNxdegvAWfF5VMhHDyOB/H+WtRHslUY2ZwuM3vakxVPUA6y70dzR7uNXloar/nB QJbSFb3rHHDV8xUaJ+iHw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:VEgABdOr8BE=:xHeNEHEG12rmmRWBjWvp1V vTRtU39Wan+xIYv3gJpMvQ3Kt0GHrFX2BE6aZJ7J9N9wOKk7VpHBr5ONriJ0a6KOTDlNKy86r l4ph3ao9/pPYflXl/Zy9f95SVTYeiDWpyyxxOpzPQghw6gP5SRlQsKRCmO4KuBlkVfmlomFRb tguEqRY21NiCoGxQNxzT3DuFPbaZIdtWAM9d5abqFuXuvkGR09k6SRMZUQ1HR4Zgncs2QfDAE 5Ma6l/dlrXfMSqd3uZu55973yZXhVzofeTNSeT81+x6A2DAonep2GOJSZjrkVJFEmVQ7lOfUL 9XohTIy5LCkMTagnf8nPM9VSKAwC97vj8bvammuNVeTIXAKEgMTTZ7lVAyC82zU72YZCTCuBX QwGjmoCz9v5B3OU1mfcx1LKzlKVBnmFwPMuVQdJuML2a8i872ICqxns+ie8Q6Kt4v1rXkRG8x +lxhTPaUzXVZ2kAeSopS33n3goNXuo9Dk5SsV7n96i0d3lGbaECjygefB0FwssZpZzY3zVejp +/IyFLXlZF++LEL21xQum35PmDPgjmHYGA0ljYsnY89MLX/YgutFtc31xMrXOlKNRL8yNTO57 E4de7SDU1G6q8Q/spSnkvjRrf89EmC+qqixMCcmjpy/6Ltzj2xZHD6mKhXf5+BdeqJ55XSrK9 wQhdD8wQEuGDDIkO8P8srn7/0RARwvUsygRv1Fa8LbMUMTz4/0AsSvBVoRfrzfS4po74aEZxm e3OQUgP58LSgtgN1z4IvTUX3Ll6gJab+d7CajmNhNy0UWCN2MiHc89lrXmlVrCJlnrj2tQCBe ZcjbETktRLV4jvRjLwdpMw3Q98gvo/WgTdayPubV3c/nFAGMsWlNpGbihws/0y6nXHM+DpCdk /RLA2zPn+3ZzyA0PPLbp1eMO4E8YNcvMrK+dAQp6TxaDOcpxafODfu/uCOVyj/iBypbl0+gKu +U5raTMWa9Zlo47j/qzxpu7GmIGDDymYZcD7LKWiZ8U6/DRtqyY+fdc9dwpaUVrYtiwWNdI93 NtVozLNyN+k8jr6DjSeX94xnpOb37bNEOnzB3Lh1FVSMFMzGGx1V0xfxQowktQi0fRatrFkX5 0nv6L1B0t7H+gf+PCvUxA94uh/ooktowLRG X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48409 Cc: Eli Zaretskii , 48409@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > I propose committing my patch in the next day or two. Please go ahead. > If there's > anything more to say about it, please let me know, soon. Thanks! Thanks for fixing it, martin From debbugs-submit-bounces@debbugs.gnu.org Mon May 31 06:44:27 2021 Received: (at 48409) by debbugs.gnu.org; 31 May 2021 10:44:28 +0000 Received: from localhost ([127.0.0.1]:32870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnfPH-0002N7-Ip for submit@debbugs.gnu.org; Mon, 31 May 2021 06:44:27 -0400 Received: from colin.muc.de ([193.149.48.1]:35813 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1lnfPF-0002Mt-Kc for 48409@debbugs.gnu.org; Mon, 31 May 2021 06:44:26 -0400 Received: (qmail 61800 invoked by uid 3782); 31 May 2021 10:44:19 -0000 Received: from acm.muc.de (p4fe15aad.dip0.t-ipconnect.de [79.225.90.173]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 31 May 2021 12:44:19 +0200 Received: (qmail 19882 invoked by uid 1000); 31 May 2021 10:44:18 -0000 Date: Mon, 31 May 2021 10:44:18 +0000 To: Eli Zaretskii Subject: Re: bug#48409: Text runs away before user can copy it Message-ID: References: <87cztt4yg9.5.fsf@jidanni.org> <83fsypztd4.fsf@gnu.org> <87cztt9qdj.fsf@mail.linkov.net> <83mtsxxfo8.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83mtsxxfo8.fsf@gnu.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48409 Cc: martin rudalics , 48409@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Eli. On Fri, May 14, 2021 at 22:45:43 +0300, Eli Zaretskii wrote: > > From: Juri Linkov > > Cc: eliz@gnu.org, jidanni@jidanni.org > > Date: Fri, 14 May 2021 20:58:24 +0300 > > I vaguely remember a feature that clicking on the echo area > > pops up the *Messages* buffer with the recent messages > > at the end of the *Messages* buffer. So Jidanni could just click > > on the shell output in the echo area, and copy the complete output > > from the displayed *Messages* buffer. > > But this feature doesn't work anymore. Searching the source code > > indicates that such a feature existed before. In minibuffer.el: > > (defvar minibuffer-inactive-mode-map > > (let ((map (make-keymap))) > > ... > > (define-key map [mouse-1] 'view-echo-area-messages) > > But now clicking mouse-1 reports an error. > It reports an error because it doesn't invoke view-echo-area-messages. > Alan, this minibuffer-inactive-mode-map thing doesn't seem to work > with mouse clicks, please take a look. This has now been fixed with commit 6e2d3bce087d30a535b1f01715d7820576ffe390 Author: Alan Mackenzie Date: Mon May 31 10:33:10 2021 +0000 Correct mouse handling when window origin changes between down and up events -- Alan Mackenzie (Nuremberg, Germany). From unknown Sun Aug 17 09:11:04 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 28 Jun 2021 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator