[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

region not set before mouse-up

From: David Reitter
Subject: region not set before mouse-up
Date: Thu, 26 May 2005 23:10:31 +0100

When a region is selected but the mouse-1 is not yet 'up', the region content cannot be copied or modified. For example, when clipboard- kill-ring-save is called in that state, the region highlighting is removed, but the content of the region is not copied to the clipboard. Typical events:

<down-mouse-1> <mouse-movement> <mouse-movement> H-c <help-echo> <help-echo>

(H-c is bound to clipboard-kill-ring-save in my setup.)
In the control case, when everything works ok (mouse-1 goes up before H-c), one gets an extra <drag-mouse-1> event, which calls mouse-set- region.

One may wonder: who would do such a funny thing like keeping one finger on the mouse button and then pressing some keys to do something with the region, unless they are desperately looking for obscure bugs in Emacs.

But as a matter of fact, my system offers the option to modify the trackpad behavior so I can drag things with a click at the beginning, and a click at the end. This setting is useful with common laptop trackpads (especially if you remap the only mouse button they offer!), and such a feature is used by people with certain motor impairments, i.e. disabled users. Pretty often, I would select something, but don't apply the second click. Then, a visual selection exists (presumably marking a region), but obviously Emacs has trouble doing the things it usually does with regions...

From a UI perspective, the user sees a highlighted region (and doesn't know about the mouse state) and wonders why it doesn't behave like any other highlighted region. That is inconsistent.

(Sorry: repeat-posting, this time with useful subject line)

In GNU Emacs (powerpc-apple-darwin8.1.0)
 of 2005-05-23 on madonna - Aquamacs Distribution 0.9.2 beta-4
Distributor `Apple Computers' version (10 4 1) .
configured using `configure '--without-x' '--prefix=/usr/local''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  show-paren-mode: t
  delete-selection-mode: t
  pc-selection-mode: t
  cua-mode: t
  recentf-mode: t
  encoded-kbd-mode: t
  osx-key-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  tooltip-mode: t
  auto-compression-mode: t
  menu-bar-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  next-error-follow-minor-mode:  Fol

Recent input:
s <tab> i e <tab> <return> <down-mouse-1> <mouse-1> H-w <switch- frame> <down-mouse-1> <mouse-movement> <mouse-movement> <down> <drag- mouse-1> <down> <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> <mouse-movement> <mouse-movement> <drag-mouse-1> <left> <left> <down-mouse-1> <mouse-movement> <mouse- movement> <drag-mouse-1> <right> <right> <down-mouse-1> <mouse-1> <double-down-mouse-1> <double-mouse-1> <down-mouse-1> <mouse- movement> <mouse-movement> <drag-mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-movement> <mouse-movement> SPC <drag-mouse-1> <down-mouse-1> <mouse-1> <switch-frame> <switch-frame> C-h k H-c <down-mouse-1> <mouse-movement> <mouse-movement> <drag-mouse-1> <down- mouse-1> <mouse-1> <double-down-mouse-1> <mouse-movement> <mouse- movement> <double-drag-mouse-1> H-c H-w <switch-frame> <switch-frame> <down-mouse-1> <mouse-movement> <mouse-1> <down- mouse-1> <mouse-1> <down-mouse-1> <mouse-movement> <mouse-movement> <drag-mouse-1> H-c <down-mouse-1> <mouse-1> <down-mouse-1> <mouse- movement> <mouse- movement> <drag-mouse-1> <down-mouse-1> <mouse- movement> <mouse- movement> <drag-mouse-1> H-c <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-movement> <mouse-movement> H-c <help- echo> <help-echo> <menu- bar> <help-menu> <report-emacs-bug>

Recent messages:
Loading subst-jis...done
Loading sgml-mode...done
Making completion list...
Making completion list...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]