From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Igor Sosa Mayor Newsgroups: gmane.emacs.help Subject: Re: regex edit mode Date: Tue, 30 Sep 2014 19:55:10 +0200 Message-ID: <87iok50z9d.fsf@gmail.com> References: <00d69071-b746-4544-a4b6-01fc9e29e5a3@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1412099681 1774 80.91.229.3 (30 Sep 2014 17:54:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Sep 2014 17:54:41 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 30 19:54:35 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 1XZ1dD-0004gH-8D for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Sep 2014 19:54:35 +0200 Original-Received: from localhost ([::1]:44651 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZ1dC-0002BF-U7 for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Sep 2014 13:54:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZ1cu-0002AG-TG for help-gnu-emacs@gnu.org; Tue, 30 Sep 2014 13:54:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZ1co-0006Aa-Fv for help-gnu-emacs@gnu.org; Tue, 30 Sep 2014 13:54:16 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:33672) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZ1co-0006AJ-8t for help-gnu-emacs@gnu.org; Tue, 30 Sep 2014 13:54:10 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XZ1cl-0004Tt-4Z for help-gnu-emacs@gnu.org; Tue, 30 Sep 2014 19:54:07 +0200 Original-Received: from nat-wlan2.uni-erfurt.de ([193.175.204.97]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 30 Sep 2014 19:54:07 +0200 Original-Received: from joseleopoldo1792 by nat-wlan2.uni-erfurt.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 30 Sep 2014 19:54:07 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 43 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: nat-wlan2.uni-erfurt.de User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:mzZqqxwDFSvZgKCzopk6pYKRxl8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:100184 Archived-At: Sam Halliday writes: > Hi all, > > It is sometimes confusing, when writing a regex in elisp, to remember all the escaping rules that are in play. > > Does anybody on this list know of a minor mode that would allow the > user to edit regexes so that escaping is not necessary, but for the > escaping to occur "under the hood". > > Imagine being able to place the point over a string containing a regex > (which is using escapes) and then call an interactive function which > makes the escape characters go away and if special characters are > entered, the escapes are added automagically. When exiting the minor > mode, the raw string with escapes would appear again. > > It would be equally fantastic to be able to do this for other languages that have their own escaping rules: java/scala come to mind. > > Just a thought. It would really brighten up my day if it were possible. not exactly what you are looking for, but... do you know this function? ,----[ C-h f regexp-builder RET ] | regexp-builder is an alias for `re-builder' in `re-builder.el'. | | (regexp-builder) | | Construct a regexp interactively. | This command makes the current buffer the "target" buffer of | the regexp builder. It displays a buffer named "*RE-Builder*" | in another window, initially containing an empty regexp. | | As you edit the regexp in the "*RE-Builder*" buffer, the | matching parts of the target buffer will be highlighted. | | [back] `---- -- :: Igor Sosa Mayor :: joseleopoldo1792@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabberid: rogorido :: ::