unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* query-replace conflicts with mouse operation
@ 2003-02-01 23:39 Ulf Klaperski
  0 siblings, 0 replies; only message in thread
From: Ulf Klaperski @ 2003-02-01 23:39 UTC (permalink / raw)



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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-02-01 23:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-01 23:39 query-replace conflicts with mouse operation Ulf Klaperski

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).