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#4981: C-l during query-replace Date: Mon, 30 Nov 2009 01:44:30 +0200 Organization: JURTA Message-ID: <87fx7w7v6p.fsf@mail.jurta.org> References: <200911200016.nAK0Gxf5005670@godzilla.ics.uci.edu> <873a49ad0f.fsf@mail.jurta.org> Reply-To: Juri Linkov , 4981@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1259539664 2749 80.91.229.12 (30 Nov 2009 00:07:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 30 Nov 2009 00:07:44 +0000 (UTC) Cc: 4981@emacsbugs.donarmstrong.com To: Dan Nicolaescu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 30 01:07:37 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NEtnl-0000bt-Cd for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Nov 2009 01:07:37 +0100 Original-Received: from localhost ([127.0.0.1]:60182 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NEtnk-00024l-Rb for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Nov 2009 19:07:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NEtng-000248-6J for bug-gnu-emacs@gnu.org; Sun, 29 Nov 2009 19:07:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NEtna-00022y-Hv for bug-gnu-emacs@gnu.org; Sun, 29 Nov 2009 19:07:31 -0500 Original-Received: from [199.232.76.173] (port=33073 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NEtna-00022p-Be for bug-gnu-emacs@gnu.org; Sun, 29 Nov 2009 19:07:26 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:37333) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NEtnZ-00013Q-MV for bug-gnu-emacs@gnu.org; Sun, 29 Nov 2009 19:07:26 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAU07N7G030743; Sun, 29 Nov 2009 16:07:23 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nATNt4MW028898; Sun, 29 Nov 2009 15:55:04 -0800 Resent-Date: Sun, 29 Nov 2009 15:55:04 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Juri Linkov Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sun, 29 Nov 2009 23:55:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4981 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4981-submit@emacsbugs.donarmstrong.com id=B4981.125953840928419 (code B ref 4981); Sun, 29 Nov 2009 23:55:04 +0000 Original-Received: (at 4981) by emacsbugs.donarmstrong.com; 29 Nov 2009 23:46:49 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mx1.starman.ee (smtp-out3.starman.ee [85.253.0.5]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nATNkl4f028416 for <4981@emacsbugs.donarmstrong.com>; Sun, 29 Nov 2009 15:46:48 -0800 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.32.20.cable.starman.ee [82.131.32.20]) by mx1.starman.ee (Postfix) with ESMTP id 3FC833F40BF; Mon, 30 Nov 2009 01:46:41 +0200 (EET) In-Reply-To: <873a49ad0f.fsf@mail.jurta.org> (Juri Linkov's message of "Fri, 20 Nov 2009 11:29:20 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sun, 29 Nov 2009 19:07:31 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:33046 Archived-At: > I guess there are many other places that need replacing with the new > command (e.g. `gnus-recenter'). I fixed `gnus-recenter' in gnus-sum.el. > But with the patch I proposed in > http://thread.gmane.org/gmane.emacs.devel/110349/focus=115915 > the name `recenter-top-bottom' makes no sense anymore. > Maybe we should rename it to something more suitable > before replacing `recenter' calls with the new name everywhere? Installed. Currently I have no opinion about renaming `recenter-top-bottom' to something more reasonable. >> C-l during query-replace should run `recenter-top-bottom', not >> `recenter' for consistency with what C-l normally does nowadays. I can't find a clean solution because in the case of query-replace, `this-command' is always `query-replace'. This patch kinda works (though it doesn't reset the cycling order), but I don't like this. Index: lisp/window.el =================================================================== RCS file: /sources/emacs/emacs/lisp/window.el,v retrieving revision 1.190 diff -u -r1.190 window.el --- lisp/window.el 29 Nov 2009 23:34:09 -0000 1.190 +++ lisp/window.el 29 Nov 2009 23:42:30 -0000 @@ -1654,7 +1654,8 @@ (arg (recenter arg)) ; Always respect ARG. (t (setq recenter-last-op - (if (eq this-command last-command) + (if (or (eq this-command last-command) + (eq this-command 'query-replace)) (car (or (cdr (member recenter-last-op recenter-positions)) recenter-positions)) (car recenter-positions))) Index: lisp/replace.el =================================================================== RCS file: /sources/emacs/emacs/lisp/replace.el,v retrieving revision 1.287 diff -u -r1.287 replace.el --- lisp/replace.el 12 Nov 2009 06:55:43 -0000 1.287 +++ lisp/replace.el 29 Nov 2009 23:43:28 -0000 @@ -1785,7 +1788,9 @@ ((eq def 'skip) (setq done t)) ((eq def 'recenter) - (recenter nil)) + (recenter-top-bottom)) ((eq def 'edit) (let ((opos (point-marker))) (setq real-match-data (replace-match-data -- Juri Linkov http://www.jurta.org/emacs/