From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#14979: 24.3; Feature Request: query-replace-backward Date: Fri, 02 Aug 2013 00:13:06 +0300 Organization: JURTA Message-ID: <87ob9hyvhx.fsf@mail.jurta.org> References: <87mwp612ou.fsf@ThinkPad-W520.localdomain> <87y58pg7pq.fsf@gmail.com> <87txjdg7kc.fsf@gmail.com> <87wqo922so.fsf@mail.jurta.org> <87a9l5yt8g.fsf@mail.jurta.org> <871u6fzu6h.fsf@ThinkPad-W520.localdomain> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1375392744 32504 80.91.229.3 (1 Aug 2013 21:32:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 1 Aug 2013 21:32:24 +0000 (UTC) Cc: Jambunathan K , 14979@debbugs.gnu.org To: ben.a@gmx.us Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 01 23:32:25 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 1V50Tw-0000L7-JR for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Aug 2013 23:32:24 +0200 Original-Received: from localhost ([::1]:34883 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V50Tw-0002c3-0l for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Aug 2013 17:32:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V50Tn-0002ax-VO for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2013 17:32:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V50Tj-0007Dd-1j for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2013 17:32:15 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V50G2-00027Y-Fl for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2013 17:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V50G2-0005JA-2E for bug-gnu-emacs@gnu.org; Thu, 01 Aug 2013 17:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Aug 2013 21:18:01 +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.137539187720373 (code B ref 14979); Thu, 01 Aug 2013 21:18:01 +0000 Original-Received: (at 14979) by debbugs.gnu.org; 1 Aug 2013 21:17:57 +0000 Original-Received: from localhost ([127.0.0.1]:35101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V50Fw-0005IU-DJ for submit@debbugs.gnu.org; Thu, 01 Aug 2013 17:17:56 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:57636 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V50Ft-0005I7-Ps for 14979@debbugs.gnu.org; Thu, 01 Aug 2013 17:17:54 -0400 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 89A03258B9E915; Thu, 1 Aug 2013 14:17:45 -0700 (PDT) In-Reply-To: <871u6fzu6h.fsf@ThinkPad-W520.localdomain> (ben a.'s message of "Tue, 30 Jul 2013 16:09:26 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) 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:76878 Archived-At: > Thanks for your interest in my bug report. The use case I had in mind > was changing a couple of instances of a word backwards from the point. > Typing M-- C-M-% is fewer keystrokes than pressing C-r a few times then > C-M-%. It is also fewer keystrokes than setting the mark, then moving > through the document to find a proper starting point and finally pressing > C-M-%. > > The best solution would be if the functions query-replace and > query-replace-regexp are changed so that they step backwards when > receiving a negative argument. One unclear point: you said that you want to replace words backwards. Currently a numeric argument or C-u means to replace words forwards (delimited by word boundary characters). If a negative argument will mean normal non-word replacement backwards, then what a prefix should mean word replacement backwards? To summarize the question: no prefix M-% - normal non-word replacement forwards C-u M-% - word replacement forwards M-- M-% (negative argument) - normal non-word replacement backwards ??? - word replacement backwards The same question for regexp replacements: no prefix C-M-% - regexp replacement forwards C-u C-M-% - word replacement forwards M-- C-M-% (negative argument) - regexp replacement backwards ??? - word replacement backwards > I have come across the website freedomsponsors.org and thought it would > be an interesting experiment to put a prize on fixing this bug. Thank you. It would be nice if your example will encourage more people to donate money to more difficult tasks in Emacs development. As I can see freedomsponsors.org is a very promising site since it supports donations to the development of free software. This is in stark contrast with freelance sites where customers pay money for developing highly custom Emacs packages that are useless for most users.