* bug#6872: 24.0.50; Mouse-2 pastes the wrong text.
@ 2010-08-17 6:14 Jan Djärv
2010-08-22 23:27 ` Chong Yidong
0 siblings, 1 reply; 5+ messages in thread
From: Jan Djärv @ 2010-08-17 6:14 UTC (permalink / raw
To: 6872
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@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)
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#6872: 24.0.50; Mouse-2 pastes the wrong text.
2010-08-17 6:14 bug#6872: 24.0.50; Mouse-2 pastes the wrong text Jan Djärv
@ 2010-08-22 23:27 ` Chong Yidong
2010-08-23 7:06 ` Jan Djärv
0 siblings, 1 reply; 5+ messages in thread
From: Chong Yidong @ 2010-08-22 23:27 UTC (permalink / raw
To: Jan Djärv; +Cc: 6872
Jan Djärv <jan.h.d@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);
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#6872: 24.0.50; Mouse-2 pastes the wrong text.
2010-08-22 23:27 ` Chong Yidong
@ 2010-08-23 7:06 ` Jan Djärv
2011-10-06 22:12 ` Glenn Morris
0 siblings, 1 reply; 5+ messages in thread
From: Jan Djärv @ 2010-08-23 7:06 UTC (permalink / raw
To: Chong Yidong; +Cc: 6872
The patch fixes the bug.
Jan D.
Chong Yidong skrev 2010-08-23 01.27:
> Jan Djärv<jan.h.d@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);
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#6872: 24.0.50; Mouse-2 pastes the wrong text.
2010-08-23 7:06 ` Jan Djärv
@ 2011-10-06 22:12 ` Glenn Morris
2011-10-06 23:28 ` David De La Harpe Golden
0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2011-10-06 22:12 UTC (permalink / raw
To: Jan Djärv; +Cc: 6872
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].
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#6872: 24.0.50; Mouse-2 pastes the wrong text.
2011-10-06 22:12 ` Glenn Morris
@ 2011-10-06 23:28 ` David De La Harpe Golden
0 siblings, 0 replies; 5+ messages in thread
From: David De La Harpe Golden @ 2011-10-06 23:28 UTC (permalink / raw
To: Glenn Morris; +Cc: 6872
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-10-06 23:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-17 6:14 bug#6872: 24.0.50; Mouse-2 pastes the wrong text Jan Djärv
2010-08-22 23:27 ` Chong Yidong
2010-08-23 7:06 ` Jan Djärv
2011-10-06 22:12 ` Glenn Morris
2011-10-06 23:28 ` David De La Harpe Golden
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.