From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ulf Klaperski Newsgroups: gmane.emacs.bugs Subject: query-replace conflicts with mouse operation Date: Sun, 02 Feb 2003 00:39:49 +0100 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1044144566 23833 80.91.224.249 (2 Feb 2003 00:09:26 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 2 Feb 2003 00:09:26 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18f7hM-0006CH-00 for ; Sun, 02 Feb 2003 01:09:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18f7iZ-00025w-00 for gnu-bug-gnu-emacs@m.gmane.org; Sat, 01 Feb 2003 19:10:39 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18f7i8-0001rI-00 for bug-gnu-emacs@gnu.org; Sat, 01 Feb 2003 19:10:12 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18f7ho-00011z-00 for bug-gnu-emacs@gnu.org; Sat, 01 Feb 2003 19:09:56 -0500 Original-Received: from mail.kdt.de ([195.8.224.4]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18f7hl-0000qa-00 for bug-gnu-emacs@gnu.org; Sat, 01 Feb 2003 19:09:49 -0500 Original-Received: from mordor.private.org (C3B3C339.dial.ision.net [195.179.195.57]) by mail.kdt.de (8.11.1/8.11.0) with ESMTP id h1209g026912 for ; Sun, 2 Feb 2003 01:09:43 +0100 Original-Received: from ulf by mordor.private.org with local (Exim 3.35 #1 (Debian)) id 18f7Ej-0001hK-00 for ; Sun, 02 Feb 2003 00:39:49 +0100 Original-To: bug-gnu-emacs@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4373 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4373 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 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: C-g C-g C-x C-x C-x C-x C-g C-g C-x C-f 2 % 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