GNU bug report logs -
#6872
24.0.50; Mouse-2 pastes the wrong text.
Previous Next
Reported by: Jan Djärv <jan.h.d <at> swipnet.se>
Date: Tue, 17 Aug 2010 06:14:02 UTC
Severity: normal
Merged with 11772
Found in versions 24.0.50, 24.0.97, 24.1
Done: Chong Yidong <cyd <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6872 in the body.
You can then email your comments to 6872 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6872
; Package
emacs
.
(Tue, 17 Aug 2010 06:14:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jan Djärv <jan.h.d <at> swipnet.se>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 17 Aug 2010 06:14:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.
Your bug report will be posted to the bug-gnu-emacs <at> gnu.org mailing list,
and to the gnu.emacs.bug news group.
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug. If you can, give
a recipe starting from `emacs -Q':
In the first frame, go to *scratch* if not alread there.
C-x 5 2. In the new frame C-x b tmp
Select the text "This buffer is for notes".
Move mouse to the other frame and press mouse-2. The text is inserted
as it should.
Double click on "buffer" (in the line that was just inserted) to select
it.
Go back to the frame with *scratch* and press mouse-2. The selected
word "buffer" is not inserted, but the old selection "This buffer is for
notes".
To make the word "buffer" be pasted in to *scratch* you must
1. Select "buffer"
2. Move the cursor in *scratch* with mouse-1 to a new place.
3. Then press mouse-2.
Number 2 is a strange requirement for mouse-2 to behave normally.
Jan D.
If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
`bt full' and `xbacktrace'.
For information about debugging Emacs, please read the file
/opt/emacs-cvs/share/emacs/24.0.50/etc/DEBUG.
In GNU Emacs 24.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1)
of 2010-08-16 on gaffa
Windowing system distributor `The X.Org Foundation', version 11.0.10706000
configured using `configure '--prefix=/opt/emacs-cvs' '--verbose'
'--enable-asserts' 'CFLAGS=-g''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: C
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: sv_SE.utf8
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect:
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
line-number-mode: t
transient-mark-mode: t
Recent input:
<help-echo> <help-echo> <down-mouse-1> <mouse-1> <help-echo>
<help-echo> <down-mouse-1> <mouse-1> <help-echo> <help-echo>
<help-echo> <down-mouse-1> <mouse-1> C-x 1 M-x r e
p o r <tab> <return>
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Load-path shadows:
None found.
Features:
(shadow sort gnus-util mail-extr message sendmail regexp-opt rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-utils
gmm-utils mailheader emacsbug tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe
lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar
mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
abbrev loaddefs button minibuffer faces cus-face files text-properties
overlay md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6872
; Package
emacs
.
(Sun, 22 Aug 2010 23:26:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 6872 <at> debbugs.gnu.org (full text, mbox):
Jan Djärv <jan.h.d <at> swipnet.se> writes:
> In the first frame, go to *scratch* if not alread there.
> C-x 5 2. In the new frame C-x b tmp
> Select the text "This buffer is for notes".
> Move mouse to the other frame and press mouse-2. The text is inserted
> as it should.
> Double click on "buffer" (in the line that was just inserted) to select
> it.
> Go back to the frame with *scratch* and press mouse-2. The selected
> word "buffer" is not inserted, but the old selection "This buffer is for
> notes".
Could you help test this patch?
*** lisp/mouse.el 2010-08-21 04:46:23 +0000
--- lisp/mouse.el 2010-08-22 23:25:55 +0000
***************
*** 1271,1277 ****
(when select-active-regions
;; Without this, confusing things happen upon e.g. inserting into
;; the middle of an active region.
! (deactivate-mark))
(or mouse-yank-at-point (mouse-set-point click))
(let ((primary
(cond
--- 1271,1278 ----
(when select-active-regions
;; Without this, confusing things happen upon e.g. inserting into
;; the middle of an active region.
! (let ((select-active-regions nil))
! (deactivate-mark)))
(or mouse-yank-at-point (mouse-set-point click))
(let ((primary
(cond
=== modified file 'src/keyboard.c'
*** src/keyboard.c 2010-08-22 15:14:37 +0000
--- src/keyboard.c 2010-08-22 23:22:34 +0000
***************
*** 368,374 ****
Used by the `select-active-regions' feature. */
Lisp_Object Vsaved_region_selection;
! Lisp_Object Qx_set_selection, QPRIMARY;
Lisp_Object Qself_insert_command;
Lisp_Object Qforward_char;
--- 368,374 ----
Used by the `select-active-regions' feature. */
Lisp_Object Vsaved_region_selection;
! Lisp_Object Qx_set_selection, QPRIMARY, Qhandle_switch_frame;
Lisp_Object Qself_insert_command;
Lisp_Object Qforward_char;
***************
*** 1799,1808 ****
{
/* Even if not deactivating the mark, set PRIMARY if
`select-active-regions' is non-nil. */
! if (EQ (Vselect_active_regions, Qonly)
! ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly)
! : (!NILP (Vselect_active_regions)
! && !NILP (Vtransient_mark_mode)))
{
int beg = XINT (Fmarker_position (current_buffer->mark));
int end = XINT (make_number (PT));
--- 1799,1809 ----
{
/* Even if not deactivating the mark, set PRIMARY if
`select-active-regions' is non-nil. */
! if ((EQ (Vselect_active_regions, Qonly)
! ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly)
! : (!NILP (Vselect_active_regions)
! && !NILP (Vtransient_mark_mode)))
! && !EQ (Vthis_command, Qhandle_switch_frame))
{
int beg = XINT (Fmarker_position (current_buffer->mark));
int end = XINT (make_number (PT));
***************
*** 11725,11730 ****
--- 11726,11733 ----
staticpro (&Qx_set_selection);
QPRIMARY = intern_c_string ("PRIMARY");
staticpro (&QPRIMARY);
+ Qhandle_switch_frame = intern_c_string ("handle-switch-frame");
+ staticpro (&Qhandle_switch_frame);
Qinput_method_exit_on_first_char = intern_c_string ("input-method-exit-on-first-char");
staticpro (&Qinput_method_exit_on_first_char);
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#6872
; Package
emacs
.
(Mon, 23 Aug 2010 07:05:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 6872 <at> debbugs.gnu.org (full text, mbox):
The patch fixes the bug.
Jan D.
Chong Yidong skrev 2010-08-23 01.27:
> Jan Djärv<jan.h.d <at> swipnet.se> writes:
>
>> In the first frame, go to *scratch* if not alread there.
>> C-x 5 2. In the new frame C-x b tmp
>> Select the text "This buffer is for notes".
>> Move mouse to the other frame and press mouse-2. The text is inserted
>> as it should.
>> Double click on "buffer" (in the line that was just inserted) to select
>> it.
>> Go back to the frame with *scratch* and press mouse-2. The selected
>> word "buffer" is not inserted, but the old selection "This buffer is for
>> notes".
>
> Could you help test this patch?
>
> *** lisp/mouse.el 2010-08-21 04:46:23 +0000
> --- lisp/mouse.el 2010-08-22 23:25:55 +0000
> ***************
> *** 1271,1277 ****
> (when select-active-regions
> ;; Without this, confusing things happen upon e.g. inserting into
> ;; the middle of an active region.
> ! (deactivate-mark))
> (or mouse-yank-at-point (mouse-set-point click))
> (let ((primary
> (cond
> --- 1271,1278 ----
> (when select-active-regions
> ;; Without this, confusing things happen upon e.g. inserting into
> ;; the middle of an active region.
> ! (let ((select-active-regions nil))
> ! (deactivate-mark)))
> (or mouse-yank-at-point (mouse-set-point click))
> (let ((primary
> (cond
>
> === modified file 'src/keyboard.c'
> *** src/keyboard.c 2010-08-22 15:14:37 +0000
> --- src/keyboard.c 2010-08-22 23:22:34 +0000
> ***************
> *** 368,374 ****
> Used by the `select-active-regions' feature. */
> Lisp_Object Vsaved_region_selection;
>
> ! Lisp_Object Qx_set_selection, QPRIMARY;
>
> Lisp_Object Qself_insert_command;
> Lisp_Object Qforward_char;
> --- 368,374 ----
> Used by the `select-active-regions' feature. */
> Lisp_Object Vsaved_region_selection;
>
> ! Lisp_Object Qx_set_selection, QPRIMARY, Qhandle_switch_frame;
>
> Lisp_Object Qself_insert_command;
> Lisp_Object Qforward_char;
> ***************
> *** 1799,1808 ****
> {
> /* Even if not deactivating the mark, set PRIMARY if
> `select-active-regions' is non-nil. */
> ! if (EQ (Vselect_active_regions, Qonly)
> ! ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly)
> ! : (!NILP (Vselect_active_regions)
> ! && !NILP (Vtransient_mark_mode)))
> {
> int beg = XINT (Fmarker_position (current_buffer->mark));
> int end = XINT (make_number (PT));
> --- 1799,1809 ----
> {
> /* Even if not deactivating the mark, set PRIMARY if
> `select-active-regions' is non-nil. */
> ! if ((EQ (Vselect_active_regions, Qonly)
> ! ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly)
> ! : (!NILP (Vselect_active_regions)
> ! && !NILP (Vtransient_mark_mode)))
> ! && !EQ (Vthis_command, Qhandle_switch_frame))
> {
> int beg = XINT (Fmarker_position (current_buffer->mark));
> int end = XINT (make_number (PT));
> ***************
> *** 11725,11730 ****
> --- 11726,11733 ----
> staticpro (&Qx_set_selection);
> QPRIMARY = intern_c_string ("PRIMARY");
> staticpro (&QPRIMARY);
> + Qhandle_switch_frame = intern_c_string ("handle-switch-frame");
> + staticpro (&Qhandle_switch_frame);
>
> Qinput_method_exit_on_first_char = intern_c_string ("input-method-exit-on-first-char");
> staticpro (&Qinput_method_exit_on_first_char);
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#6872
; Package
emacs
.
(Thu, 06 Oct 2011 22:13:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 6872 <at> debbugs.gnu.org (full text, mbox):
Was this fixed?
The issue described in the original report seems to be gone, but it
seems like now the workaround (which is also reasonable behaviour) does
not work:
emacs -Q -f make-frame
C-x b tmp
In scratch, left click and drag to select "This buffer is for notes"
Use middle button to paste into tmp.
Double click on "buffer" in tmp to select it.
Left-click somewhere in *scratch*. [1]
Middle click in scratch now pastes "This buffer is for notes" rather
than the expected "buffer".
It works without step [1].
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#6872
; Package
emacs
.
(Thu, 06 Oct 2011 23:30:03 GMT)
Full text and
rfc822 format available.
Message #17 received at 6872 <at> debbugs.gnu.org (full text, mbox):
On 06/10/11 23:12, Glenn Morris wrote:
>
> Was this fixed?
>
Please also see discussion under #8996, it's probably quite relevant. As
I mention there, fix committed under #6872 were only partial, covering
only a frame switch case. I've been just patching locally with my patch
under #8996 for a while, though it's less than amazingly elegant.
Afraid I haven't given the matter further thought since #8996, either,
various local problems still distracting me from emacs.
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8996#23
Forcibly Merged 6872 11588.
Request was from
Chong Yidong <cyd <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 08 Jul 2012 13:39:02 GMT)
Full text and
rfc822 format available.
Disconnected #6872 from all other report(s).
Request was from
Chong Yidong <cyd <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 08 Jul 2012 13:43:02 GMT)
Full text and
rfc822 format available.
Forcibly Merged 6872 11772.
Request was from
Chong Yidong <cyd <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Sun, 08 Jul 2012 13:43:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 06 Aug 2012 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 12 years and 317 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.