bug-gnu-emacs
[Top][All Lists]
Advanced

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

query-replace conflicts with mouse operation


From: Ulf Klaperski
Subject: query-replace conflicts with mouse operation
Date: Sun, 02 Feb 2003 00:39:49 +0100

Hi,

query-replace generates undesired results if copy/paste is done while 
entering FROM-STRING. To reproduce:

- load a file which contains a string several times
- start a query-replace (M-%)
- copy one of <string> ocurrences with mouse-1 drag
- paste it as FROM-STRING with mouse-2 and press return
- enter any TO-STRING and press return

=> emacs will reply "Replaced 0 occurrences" or "The mark is not set now, so 
there is no region"!

Which does imho not make sense and is very confusing for mouse-oriented users. 

The behaviour will vary depending on if there was a region before.

I investigated the problem a bit and guess...:

- If a region is defined before starting a query-replace, the replace is
  restricted to the region (which is probably intentional). 
- The problem seems to arise, because the replace does not use the region like 
  it is defined before the query-replace call, but the region that is generated
  by the copy operation. 

I have seen this both in version 21.2 and the current cvs release.

Thanks,
Ulf


In GNU Emacs 21.3.50.4 (i686-pc-linux-gnu, X toolkit)
 of 2003-02-01 on mordor
configured using `configure '--prefix=/home/ulf/gnu' 'CFLAGS=-O3 
-fomit-frame-pointer -funroll-loops''

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: C
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Recent input:
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <up> C-g C-g C-x C-x C-x C-x C-g C-g 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> C-x C-f <next> <up> 
2 <return> <escape> % <down-mouse-1> <mouse-movement> 
<mouse-movement> <drag-mouse-1> <help-echo> <down-mouse-2> 
<mouse-2> <help-echo> <return> <up> <up> <return> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <menu-bar> <help-menu> <report-emacs-b
ug>

Recent messages:
Invalid face text property value: quote [8 times]
Wrote /tmp/mutt-mordor-6108-103
When done with a buffer, type C-x #
Mark set [2 times]
Replaced 0 occurrences
Loading newcomment...done
comment-normalize-vars: No comment syntax is defined
Mark set [2 times]
Quit [4 times]
next-history-element: End of history; no default available
query-replace-read-args: The mark is not set now, so there is no region




reply via email to

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