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#20687: 25.0.50; `perform-replace' should invoke a key that you have bound in `query-replace-map' Date: Mon, 01 Jun 2015 23:53:05 +0300 Organization: LINKOV.NET Message-ID: <87pp5fb172.fsf@mail.linkov.net> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1433192069 29919 80.91.229.3 (1 Jun 2015 20:54:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Jun 2015 20:54:29 +0000 (UTC) Cc: 20687@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 01 22:54:14 2015 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 1YzWiq-0003nK-Kw for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Jun 2015 22:54:12 +0200 Original-Received: from localhost ([::1]:54347 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzWip-0004Gw-Oh for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Jun 2015 16:54:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzWim-0004Gn-7G for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 16:54:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzWih-0006Ts-56 for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 16:54:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzWih-0006To-1J for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 16:54:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YzWig-0001VB-JQ for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2015 16:54: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: Mon, 01 Jun 2015 20:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20687-submit@debbugs.gnu.org id=B20687.14331920135729 (code B ref 20687); Mon, 01 Jun 2015 20:54:02 +0000 Original-Received: (at 20687) by debbugs.gnu.org; 1 Jun 2015 20:53:33 +0000 Original-Received: from localhost ([127.0.0.1]:36430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzWiC-0001UK-C0 for submit@debbugs.gnu.org; Mon, 01 Jun 2015 16:53:32 -0400 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:43711 helo=homiemail-a15.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YzWiA-0001UC-Hn for 20687@debbugs.gnu.org; Mon, 01 Jun 2015 16:53:31 -0400 Original-Received: from homiemail-a15.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTP id C639C76C08C; Mon, 1 Jun 2015 13:53:29 -0700 (PDT) Original-Received: from localhost.linkov.net (m213-100-241-26.cust.tele2.ee [213.100.241.26]) (Authenticated sender: jurta@jurta.org) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTPA id CCCCC76C08A; Mon, 1 Jun 2015 13:53:28 -0700 (PDT) In-Reply-To: (Drew Adams's message of "Thu, 28 May 2015 14:12:16 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.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:103457 Archived-At: > You can bind any key you like in `query-replace-map'. But > `perform-replace', in effect, hard-codes the keys that it recognizes. > > This is not necessary. You shbould be able to bind a new key in that > map to some command, and have `perform-replace' invoke that command. > > All that's required for this is to add another `cond' clause, just > before the final `t' (otherwise) clause, to do this: > > (cond > ... > (def (call-interactively def)) ; User-defined key - invoke it. > (t > ;; Note: we do not need to treat `exit-prefix' > ;; specially here, since we reread > ;; any unrecognized character. > ...)) > > It seems silly for the code to be written like it is. We already look > up the key you press in the q-r keymap. If we find a DEF that is not > one of those predefined by Emacs then we ignore it? That makes no sense > (to me). Could you please send an example of your custom keybindings in `query-replace-map' that currently don't work.