Subject: bug#91: using mouse to paste into comint buffer

From: Tom Tromey <[email-masked]>
Date: Fri, 28 Mar 2008 16:47:18 -0600

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 [email-masked] 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 I try to select some text in a gnome-terminal and then paste it
into a gud buffer, the actually-pasted text will often end up being
the command on the previous line, rather than whatever I selected.

This only seems to happen when the prompt line is the very last line
of the window.  If I recenter first, I can paste my selection -- but
this is pretty inconvenient and I often forget to do it.

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'.
If you would like to further debug the crash, please read the file
/usr/share/emacs/22.1/etc/DEBUG for instructions.

In GNU Emacs 22.1.1 (i386-redhat-linux-gnu, GTK+ Version 2.12.1)
 of 2007-11-06 on xenbuilder4.fedora.phx.redhat.com
Windowing system distributor `The X.Org Foundation', version 11.0.10300000
configured using `configure  '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-pop' '--with-sound' '--with-gtk' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i386-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -DSYSTEM_PURESIZE_EXTRA=16777216 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables''

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: en_US.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: C/l

Minor modes in effect:
  auto-fill-function: tjt-c++-do-auto-fill
  compilation-in-progress: (grep compilation compilation compilation compilation compilation grep gid compilation grep ...)
  shell-dirtrack-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  erc-spelling-mode: t
  erc-truncate-mode: t
  flyspell-mode: t
  erc-status-mode: t
  erc-services-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-readonly-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
C-M-p C-M-p C-M-p C-M-p C-M-p C-M-p C-M-p C-v C-v C-x 
C-f d u <tab> C-g C-x f C-g C-x C-f t r e <tab> <tab> 
- d u <tab> <tab> h <return> C-v C-l C-v C-v C-l M-v 
C-c C-g M-v C-c t M-< C-v C-v C-v C-v C-v M-v M-v M-v 
C-u C-u C-p C-u C-n C-p C-p M-x g i d <return> <return> 
C-x 1 C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v 
C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v C-v 
C-v C-v C-v C-v M-v M-v M-v M-v C-c C-g M-v M-v M-v 
M-v M-v C-c b C-c b C-c b C-c b M-< C-s c o r e _ f 
i l e C-s C-s C-s C-s C-s C-a M-< C-s c o r e _ b f 
d C-e C-M-b C-M-SPC M-w C-z o p t SPC C-y <return> 
<switch-frame> <switch-frame> <help-echo> <down-mouse-2> 
<mouse-2> C-a C-k <down-mouse-2> <mouse-2> C-l C-a 
C-k <down-mouse-2> <mouse-2> C-a t p <M-backspace> 
p t SPC <return> <help-echo> <help-echo> <help-echo> 
<switch-frame> <switch-frame> <help-echo> <switch-frame> 
M-. M-p M-p <return> M-> <prior> <prior> <prior> <prior> 
<prior> <prior> <prior> <prior> <prior> <prior> <prior> 
<prior> <prior> <prior> <prior> <prior> <prior> <prior> 
<prior> <prior> <prior> <prior> <prior> <prior> <prior> 
<prior> <prior> <next> <switch-frame> <help-echo> <switch-frame> 
<prior> <next> <next> <next> <next> <next> <next> <next> 
<next> <next> <next> <next> <switch-frame> <help-echo> 
<help-echo> <down-mouse-2> <mouse-2> C-a C-k C-l <help-echo> 
<down-mouse-2> <mouse-2> C-a p r SPC C-b C-b C-d t 
<return> <switch-frame> <switch-frame> <switch-frame> 
<switch-frame> <help-echo> <help-echo> <down-mouse-2> 
<mouse-2> C-l <M-backspace> <M-backspace> e c h o <return> 
C-h k <down-mouse-2> <mouse-2> C-h k <down-mouse-2> 
<mouse-2> <down-mouse-2> <mouse-2> <M-backspace> <M-backspace> 
C-a C-g C-z o M-x r e p o r t - e m a c s - b u <tab> 
<return>

Recent messages:
Mark saved where search started
Mark set
Mark saved where search started
Mark set [6 times]
call-interactively: Beginning of buffer [2 times]
Mark set
Type C-x 4 C-o RET to restore the other window.  
Mark set
Quit
Loading emacsbug...done

Tom