unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ulf Klaperski <Ro_Kenn@gmx.de>
Subject: query-replace conflicts with mouse operation
Date: Sun, 02 Feb 2003 00:39:49 +0100	[thread overview]
Message-ID: <E18f7Ej-0001hK-00@mordor.private.org> (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

                 reply	other threads:[~2003-02-01 23:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E18f7Ej-0001hK-00@mordor.private.org \
    --to=ro_kenn@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).