From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tak Kunihiro Newsgroups: gmane.emacs.help Subject: Re: regular expression Date: Thu, 03 Jul 2014 08:14:30 +0900 (JST) Message-ID: <20140703.081430.241072653.tkk@misasa.okayama-u.ac.jp> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1404342915 30361 80.91.229.3 (2 Jul 2014 23:15:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 2 Jul 2014 23:15:15 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 03 01:15:09 2014 Return-path: Envelope-to: geh-help-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 1X2Tk3-0002JJ-Fu for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Jul 2014 01:15:07 +0200 Original-Received: from localhost ([::1]:56919 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2Tk0-00033u-Rw for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Jul 2014 19:15:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2Tjj-00032Y-Nw for help-gnu-emacs@gnu.org; Wed, 02 Jul 2014 19:14:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2Tjb-00087K-VG for help-gnu-emacs@gnu.org; Wed, 02 Jul 2014 19:14:47 -0400 Original-Received: from msmail2.misasa.okayama-u.ac.jp ([150.46.245.7]:44689 helo=msmail.misasa.okayama-u.ac.jp) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2Tjb-00086w-Kr for help-gnu-emacs@gnu.org; Wed, 02 Jul 2014 19:14:39 -0400 Original-Received: from localhost (dspin2.misasa.okayama-u.ac.jp [150.46.48.104]) by msmail.misasa.okayama-u.ac.jp (Postfix) with ESMTP id C5E5EAF8084 for ; Thu, 3 Jul 2014 08:14:36 +0900 (JST) X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 150.46.245.7 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:98521 Archived-At: > > I think a work flow from (re-builder) to (query-replace-regexp) should > > be by default in Emacs. > > Maybe the right way to do it is to integrate re-builder into isearch > (when searching with a regexp), to benefit from the existing work flow > from isearch to query-replace. A window dedicated for re-builder can be regarded as mini buffer. With following setup, it is almost similar to isearch with regexp. (define-key reb-mode-map (kbd "C-s") 'reb-next-match) (define-key reb-mode-map (kbd "C-r") 'reb-prev-match) (define-key reb-mode-map (kbd "C-g") 'reb-quit) (define-key reb-mode-map (kbd "") 'my-query-replace-regexp) Minor concern is re-builder looks from beginning of current buffer instead from where the point is. I think to bind re-builder to "C-M-s" is a good idea, although coding is beyond my capability.