From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andrea Rossetti Newsgroups: gmane.emacs.bugs Subject: bug#18249: 24.3; expected a button click, text pasted into button label instead Date: Mon, 11 Aug 2014 23:59:37 +0200 Message-ID: <84k36eofg6.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1407794492 21427 80.91.229.3 (11 Aug 2014 22:01:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Aug 2014 22:01:32 +0000 (UTC) To: 18249@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 12 00:01:25 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XGxee-00066V-1T for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Aug 2014 00:01:24 +0200 Original-Received: from localhost ([::1]:38098 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGxed-00036R-Ob for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Aug 2014 18:01:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGxeR-00035I-Lc for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2014 18:01:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XGxeI-0001zl-DZ for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2014 18:01:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:32802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGxeI-0001zh-AY for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2014 18:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XGxeI-0000Ky-1b for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2014 18:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Rossetti Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Aug 2014 22:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18249 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.14077944271245 (code B ref -1); Mon, 11 Aug 2014 22:01:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Aug 2014 22:00:27 +0000 Original-Received: from localhost ([127.0.0.1]:39745 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XGxdi-0000K0-7z for submit@debbugs.gnu.org; Mon, 11 Aug 2014 18:00:26 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53821) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XGxdf-0000Jm-Gc for submit@debbugs.gnu.org; Mon, 11 Aug 2014 18:00:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XGxdR-0001Wv-5z for submit@debbugs.gnu.org; Mon, 11 Aug 2014 18:00:18 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:50352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGxdR-0001Wq-3k for submit@debbugs.gnu.org; Mon, 11 Aug 2014 18:00:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGxdI-0002uu-1m for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2014 18:00:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XGxd9-0001Fk-0B for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2014 18:00:00 -0400 Original-Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]:59961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGxd8-0001FY-PQ for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2014 17:59:50 -0400 Original-Received: by mail-wi0-f178.google.com with SMTP id hi2so4907320wib.5 for ; Mon, 11 Aug 2014 14:59:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type; bh=JveUIe54AtvADWsUm7kTU55X4wLRjrarJ00/ZYmsnBU=; b=XDhvdHsGqhawMhWpMXQ9E5CRoQklvdNYWIJPJydHaQA01nYAW37jwzrZNpzg4WTX0u QDQtgKAJseQLIPYx9fmv7CkvRHsm0JUEnLKip/ZdUljDbZouNKFTGIB2UHIwK/OjdaWy MZ1Ik5F0MWQ65eiGMv1+vbxoqXIsrm8zC7rr24sMtkHcJZqBBA8J/ROwNKstuNBgjs+1 rBs5tD9rQCXf5UAHoPfoc3qcoc2Sh8IxCJB5QLkIRifDLXKU27lpbZREPGnaWckERNS1 8mTTGAaZGwfUmjuRjvoN9AFq9mppOFyGNYh8Gq++UJcyyIp8uXZwWDtjHD6uKzoJKt0Y DOSw== X-Received: by 10.194.237.194 with SMTP id ve2mr555712wjc.89.1407794389075; Mon, 11 Aug 2014 14:59:49 -0700 (PDT) Original-Received: from LAPTOP-ANDREA.laptop-andrea.trieste.it (net-93-144-101-209.cust.dsl.teletu.it. [93.144.101.209]) by mx.google.com with ESMTPSA id ho7sm4568663wjb.2.2014.08.11.14.59.45 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 11 Aug 2014 14:59:48 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92425 Archived-At: Hello, I found some odd behaviour while clicking with over a button. I can't say if it's exactly a bug, but I believe it's unexpected and unwanted behaviour for the user. Here's a recipe to replicate it. 1) start emacs -Q 2) clear buffer with C-x h C-w 3) type or paste the following five lines of text (line 3 is empty on purpose): ;---------- line1: start (insert-button "[ciao]" 'action (lambda (x) (message "ciao!"))) ; line 2 ; line 4: pastethis ; --------- line 5: end 4) put the text cursor at line 3, type C-x C-e so that the "[ciao]" button will be created in line 3 5) select the word "pastethis" with the mouse, by dragging with mouse-1 button from first to last letter of the word 6a) put the mouse cursor over the [ciao] button and click there with mouse-2 (center button). Result: you should see that the message "ciao!" appears at the bottom line; this is correct and expected behaviour 6b) move the mouse cursor over the letter "i" of the text "line 4:", click mouse-2 and hold it pressed; continue dragging and move the mouse cursor over the [ciao] button, then release mouse-2. Result: you should see that the word "pastethis" has been pasted into the button label, so that it looks similar to [ciapastethiso]; this is unexpected behaviour. May I please ask if the result 6b) is reproducible for you too. I believe 6b) is odd/buggy because typically the user wants to do action 6a) but accidentally drags the mouse by a few pixel, thus actually performing action 6b). Please let me know if this opinion seems wrong/flawed to you. If the above makes sense for you too, then a possible correction could be: if a event ends on a pushable button, then Emacs should always perform the button action, not a text paste like it does now. Thanks for your attention and patience in reading this, kindest regards. Andrea In GNU Emacs 24.3.1 (i386-mingw-nt6.1.7600) of 2013-03-17 on MARVIN Windowing system distributor `Microsoft Corp.', version 6.1.7600 Configured using: `configure --with-gcc (4.7) --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-3.0.9/include -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2' Important settings: value of $LANG: ITA locale-coding-system: cp1252 default enable-multibyte-characters: t Major mode: Article Minor modes in effect: shell-dirtrack-mode: t show-paren-mode: t server-mode: t recentf-mode: t cua-mode: t tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t