From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jambunathan K Newsgroups: gmane.emacs.bugs Subject: bug#14979: 24.3; Feature Request: query-replace-backward Date: Mon, 29 Jul 2013 12:42:49 +0530 Message-ID: <87y58pg7pq.fsf@gmail.com> References: <87mwp612ou.fsf@ThinkPad-W520.localdomain> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1375081942 23511 80.91.229.3 (29 Jul 2013 07:12:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Jul 2013 07:12:22 +0000 (UTC) Cc: 14979@debbugs.gnu.org To: Ben A. Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 29 09:12:19 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V3hcx-0002Vp-BM for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Jul 2013 09:12:19 +0200 Original-Received: from localhost ([::1]:35861 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3hcw-0007DS-TF for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Jul 2013 03:12:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3hco-00075U-0c for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2013 03:12:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3hch-0006Ds-Ep for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2013 03:12:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:32886) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3hch-0006Dj-8A for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2013 03:12:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V3hcg-0001Jz-6N for bug-gnu-emacs@gnu.org; Mon, 29 Jul 2013 03:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jambunathan K Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Jul 2013 07:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14979 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14979-submit@debbugs.gnu.org id=B14979.13750818724891 (code B ref 14979); Mon, 29 Jul 2013 07:12:02 +0000 Original-Received: (at 14979) by debbugs.gnu.org; 29 Jul 2013 07:11:12 +0000 Original-Received: from localhost ([127.0.0.1]:55435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3hbq-0001Go-Rm for submit@debbugs.gnu.org; Mon, 29 Jul 2013 03:11:11 -0400 Original-Received: from mail-pd0-f178.google.com ([209.85.192.178]:40050) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V3hbn-0001FY-DJ for 14979@debbugs.gnu.org; Mon, 29 Jul 2013 03:11:08 -0400 Original-Received: by mail-pd0-f178.google.com with SMTP id w10so2255582pde.37 for <14979@debbugs.gnu.org>; Mon, 29 Jul 2013 00:11:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=EbquGOB+seSY10wQTiBYIqH5R5VXM19Uz/L17YW7Puw=; b=XaHCmYmRAOvP8itQyLIKnMmuIIkyUV7KMzl3x2tVainDR3q1u4mk1P9uzt8ckG/TKy yw3Z70z9YXivK5AF4Ky5iRTlJYER4drnvpyNKP6wYTlIvh21rZHeg/AoAsOK4PBmEQVo n0zeBgzz4TCpH4ooMTnJIPxmdd6lHBFYZFpL9eV886ckgUjeR6QsnbHtkoIef53WzXBQ PBfwpcIw1xOMeno16JsVHXHID+J7MitMaLMHrO1zzi5weeEWsxeOHQOFCyOfNYAkByn7 27/r0bUfTf4NZz0xWd2kW9htPMjniGxMhNIUScW1aj+YyqXoyR6h6fPe5eaXvQzaOVrI uXCA== X-Received: by 10.66.121.131 with SMTP id lk3mr68152031pab.43.1375081861011; Mon, 29 Jul 2013 00:11:01 -0700 (PDT) Original-Received: from debian-6.05 ([115.244.235.240]) by mx.google.com with ESMTPSA id x8sm75162571pbb.39.2013.07.29.00.10.58 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Mon, 29 Jul 2013 00:11:00 -0700 (PDT) In-Reply-To: <87mwp612ou.fsf@ThinkPad-W520.localdomain> (Ben A.'s message of "Sun, 28 Jul 2013 23:10:25 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:76748 Archived-At: Ben A. writes: > Hi, > > A feature request: I often make use of query-replace and > query-replace-regexp. It would be useful to have a > query-replace-backward and a query-replace-regexp-backward. The > backward variant would be executed when the forward variant is given a > negative argument. One way of achieving this with the existing scheme of things is: 1. M-< 2. C-x n n 3. C-M-% 4. M-> 6. C-x n w Narrow from beginning of buffer (or a defun or wherever) to point, do replacement and widen. (I think) forward searches are more efficient than backward searches through the buffer. May I know what is your specific usage scenario? Are you editing a text file or a program source? Why is that you want only backward replacements and STRICTLY AVOID forward replacements. > > Much Appreciation, > Ben