unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18249: 24.3; expected a button click, text pasted into button label instead
@ 2014-08-11 21:59 Andrea Rossetti
  2019-08-03 19:02 ` Lars Ingebrigtsen
  2020-09-22 21:22 ` Mauro Aranda
  0 siblings, 2 replies; 6+ messages in thread
From: Andrea Rossetti @ 2014-08-11 21:59 UTC (permalink / raw)
  To: 18249

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






^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-10-23  5:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-11 21:59 bug#18249: 24.3; expected a button click, text pasted into button label instead Andrea Rossetti
2019-08-03 19:02 ` Lars Ingebrigtsen
2019-08-04 13:06   ` Andrea Rossetti
2019-08-05  9:17     ` Lars Ingebrigtsen
2020-09-22 21:22 ` Mauro Aranda
2021-10-23  5:40   ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).