GNU bug report logs - #18249
24.3; expected a button click, text pasted into button label instead

Previous Next

Package: emacs;

Reported by: Andrea Rossetti <andrea.rossetti <at> gmail.com>

Date: Mon, 11 Aug 2014 22:01:01 UTC

Severity: minor

Found in versions 24.3, 28.0.50

To reply to this bug, email your comments to 18249 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#18249; Package emacs. (Mon, 11 Aug 2014 22:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrea Rossetti <andrea.rossetti <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 11 Aug 2014 22:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andrea Rossetti <andrea.rossetti <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; expected a button click, text pasted into button label instead
Date: Mon, 11 Aug 2014 23:59:37 +0200
Hello,

  I found some odd behaviour while clicking with <mouse-2>
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 <drag-mouse-2> 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





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18249; Package emacs. (Sat, 03 Aug 2019 19:03:03 GMT) Full text and rfc822 format available.

Message #8 received at 18249 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Andrea Rossetti <andrea.rossetti <at> gmail.com>
Cc: 18249 <at> debbugs.gnu.org
Subject: Re: bug#18249: 24.3; expected a button click, text pasted into
 button label instead
Date: Sat, 03 Aug 2019 21:02:12 +0200
Andrea Rossetti <andrea.rossetti <at> gmail.com> writes:

> (insert-button "[ciao]" 'action (lambda (x) (message "ciao!"))) ; line 2

[...]

> 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'm going through old bug reports that unfortunately have not received
any responses yet.)

I tried this in Emacs 27, and I was unable to reproduce the bug.
Holding down mouse-2 and moving the mouse around just moves text around,
and releasing it doesn't do anything special on the button inserted.

Are you still seeing this bug?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 03 Aug 2019 19:03:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18249; Package emacs. (Sun, 04 Aug 2019 13:08:01 GMT) Full text and rfc822 format available.

Message #13 received at 18249 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Rossetti <andrea.rossetti <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 18249 <at> debbugs.gnu.org
Subject: Re: bug#18249: 24.3;
 expected a button click, text pasted into button label instead
Date: Sun, 04 Aug 2019 15:06:54 +0200
Hello Lars,

Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> I tried this in Emacs 27, and I was unable to reproduce the bug.
> Holding down mouse-2 and moving the mouse around just moves text around,
> and releasing it doesn't do anything special on the button inserted.
>
> Are you still seeing this bug?

  and thanks for your feedback. I confirm I can still reproduce the
issue on these binaries:

https://alpha.gnu.org/gnu/emacs/pretest/windows/emacs-27/emacs-27.0.50-snapshot-2019-06-08-x86_64.zip

M-x version RET
  
GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32) of 2019-06-09

  Tentative explanation: if you tested on a Linux workstation, then it
could be a Windows-only problem. Or maybe my step 6b is ambiguous or
hard to follow. Let me retry:

  Maybe describing 6b more naively may help, let me try:

  6b) press mouse-2 outside [ciao], drag mouse inside [ciao], release mouse-2. 
      Instead of clicking the button, it pastes text inside the button.

Cheers!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18249; Package emacs. (Mon, 05 Aug 2019 09:18:02 GMT) Full text and rfc822 format available.

Message #16 received at 18249 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Andrea Rossetti <andrea.rossetti <at> gmail.com>
Cc: 18249 <at> debbugs.gnu.org
Subject: Re: bug#18249: 24.3; expected a button click, text pasted into
 button label instead
Date: Mon, 05 Aug 2019 11:17:06 +0200
Andrea Rossetti <andrea.rossetti <at> gmail.com> writes:

> GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32) of 2019-06-09
>
>   Tentative explanation: if you tested on a Linux workstation, then it
> could be a Windows-only problem.

Ah, I guess that sounds likely.

> Or maybe my step 6b is ambiguous or
> hard to follow. Let me retry:
>
>   Maybe describing 6b more naively may help, let me try:
>
>   6b) press mouse-2 outside [ciao], drag mouse inside [ciao], release mouse-2. 
>       Instead of clicking the button, it pastes text inside the button.

Yup; I'm not able to reproduce this in GNU/Linux, so somebody with
Windows should try to chase down why this happens there.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Removed tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 14 Oct 2019 08:21:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18249; Package emacs. (Tue, 22 Sep 2020 21:24:02 GMT) Full text and rfc822 format available.

Message #21 received at 18249 <at> debbugs.gnu.org (full text, mbox):

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 18249 <at> debbugs.gnu.org, Andrea Rossetti <andrea.rossetti <at> gmail.com>
Subject: Re: bug#18249: 24.3; expected a button click, text pasted into button
 label instead
Date: Tue, 22 Sep 2020 18:22:42 -0300
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Andrea Rossetti <andrea.rossetti <at> gmail.com> writes:
>
>> GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32) of 2019-06-09
>>
>>   Tentative explanation: if you tested on a Linux workstation, then it
>> could be a Windows-only problem.
>
> Ah, I guess that sounds likely.

[...]

>> Or maybe my step 6b is ambiguous or
>> hard to follow. Let me retry:
>>
>>   Maybe describing 6b more naively may help, let me try:
>>
>>   6b) press mouse-2 outside [ciao], drag mouse inside [ciao], release
mouse-2.
>>       Instead of clicking the button, it pastes text inside the button.
>
> Yup; I'm not able to reproduce this in GNU/Linux, so somebody with
> Windows should try to chase down why this happens there.

I am able to reproduce this at will in GNU/Linux, though.

Details:
x86_64-pc-linux-gnu
Ubuntu 18.04.5 LTS
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18249; Package emacs. (Sat, 23 Oct 2021 05:42:01 GMT) Full text and rfc822 format available.

Message #24 received at 18249 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Mauro Aranda <maurooaranda <at> gmail.com>
Cc: 18249 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>,
 Andrea Rossetti <andrea.rossetti <at> gmail.com>
Subject: Re: bug#18249: 24.3; expected a button click, text pasted into button
 label instead
Date: Fri, 22 Oct 2021 22:40:53 -0700
severity 18249 minor
found 18249 28.0.50
thanks

Mauro Aranda <maurooaranda <at> gmail.com> writes:

> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> Andrea Rossetti <andrea.rossetti <at> gmail.com> writes:
>>
>>> GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32) of 2019-06-09
>>>
>>>   Tentative explanation: if you tested on a Linux workstation, then it
>>> could be a Windows-only problem.
>>
>> Ah, I guess that sounds likely.
>
> [...]
>
>>> Or maybe my step 6b is ambiguous or
>>> hard to follow. Let me retry:
>>>
>>>   Maybe describing 6b more naively may help, let me try:
>>>
>>>   6b) press mouse-2 outside [ciao], drag mouse inside [ciao], release mouse-2.
>>>       Instead of clicking the button, it pastes text inside the button.
>>
>> Yup; I'm not able to reproduce this in GNU/Linux, so somebody with
>> Windows should try to chase down why this happens there.
>
> I am able to reproduce this at will in GNU/Linux, though.

I can reproduce this with current master on Debian stable/bookworm.




Severity set to 'minor' from 'normal' Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Sat, 23 Oct 2021 05:42:02 GMT) Full text and rfc822 format available.

bug Marked as found in versions 28.0.50. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Sat, 23 Oct 2021 05:42:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18249; Package emacs. (Mon, 03 Mar 2025 12:12:02 GMT) Full text and rfc822 format available.

Message #31 received at 18249 <at> debbugs.gnu.org (full text, mbox):

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: 18249 <at> debbugs.gnu.org, Stefan Kangas <stefankangas <at> gmail.com>
Cc: andrea.rossetti <at> gmail.com, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#18249: 24.3; expected a button click, text pasted into
 button, label instead
Date: Mon, 3 Mar 2025 09:11:39 -0300
Stefan Kangas <stefan <at> marxist.se> writes:

> severity 18249 minor
> found 18249 28.0.50
> thanks
>
> Mauro Aranda <maurooaranda <at> gmail.com> writes:
>
>> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>>
>>> Andrea Rossetti <andrea.rossetti <at> gmail.com> writes:
>>>
>>>> GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32) of 2019-06-09
>>>>
>>>>   Tentative explanation: if you tested on a Linux workstation, then it
>>>> could be a Windows-only problem.
>>>
>>> Ah, I guess that sounds likely.
>>
>> [...]
>>
>>>> Or maybe my step 6b is ambiguous or
>>>> hard to follow. Let me retry:
>>>>
>>>>   Maybe describing 6b more naively may help, let me try:
>>>>
>>>>   6b) press mouse-2 outside [ciao], drag mouse inside [ciao], 
release mouse-2.
>>>>       Instead of clicking the button, it pastes text inside the 
button.
>>>
>>> Yup; I'm not able to reproduce this in GNU/Linux, so somebody with
>>> Windows should try to chase down why this happens there.
>>
>> I am able to reproduce this at will in GNU/Linux, though.
>
> I can reproduce this with current master on Debian stable/bookworm.

And now I'm not able to reproduce it anymore:

The yank happens at the position where the mouse-2 click starts, not
where it ends, keeping the button label intact.

I think this is OK.





This bug report was last modified 101 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.