From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rasmus Newsgroups: gmane.emacs.help Subject: Re: regex edit mode Date: Tue, 30 Sep 2014 20:18:40 +0200 Message-ID: <878ul1t1j3.fsf@gmx.us> References: <00d69071-b746-4544-a4b6-01fc9e29e5a3@googlegroups.com> <87iok50z9d.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1412101169 21908 80.91.229.3 (30 Sep 2014 18:19:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Sep 2014 18:19:29 +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 20:19:23 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 1XZ21B-000741-BO for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Sep 2014 20:19:21 +0200 Original-Received: from localhost ([::1]:44846 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZ21A-00085m-Su for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Sep 2014 14:19:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZ20t-00084L-1b for help-gnu-emacs@gnu.org; Tue, 30 Sep 2014 14:19:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZ20l-0000Nj-EK for help-gnu-emacs@gnu.org; Tue, 30 Sep 2014 14:19:02 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:34910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZ20l-0000NV-8H for help-gnu-emacs@gnu.org; Tue, 30 Sep 2014 14:18:55 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XZ20j-0006t8-ON for help-gnu-emacs@gnu.org; Tue, 30 Sep 2014 20:18:53 +0200 Original-Received: from 109.201.152.16 ([109.201.152.16]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 30 Sep 2014 20:18:53 +0200 Original-Received: from rasmus by 109.201.152.16 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 30 Sep 2014 20:18:53 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 50 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 109.201.152.16 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAAAAAByaaZbAAAAAmJLR0QA/4ePzL8AAAAJcEhZ cwAAAEgAAABIAEbJaz4AAAIDSURBVEjHhZbLlSUhDEMJR2EptZuQY5oFtjHF6zMsqhdtIfkn3rKx zf6TB9sGAxGRn/yuHYtty5I0UDgigyueZRt2/Dm2kjEiApMExstsOboAKkY7Am9dgFnGsO+3ksaF kCQTUcpsL88zEMbaFAUIbHn5qo9dKdhkEZrABZiIuj8pJHHud0rikSRLhp0CR4+sVeF8C2sHklQA 9j/W1HIdm/CpEhmynrsHB9FZcwD4b8DWQUDA7s6a9fHMwLYJu7KOHbVOffLbk2GbwEQE3WivHuyE ZBdy/nJMAwBka41NUAUmHBuC02dLlcPstaXDSFzx72gMdRswCLqsfBguSJWoEK+kMVW9cxtQDPwV P0YvyNntPtwQJcDdhvaIdRNw9d3HaHoV16OnK+5eT6Aao0UH8YXqVDUkEZZZlxoOSrOqIAmkYzMj E07imXQEsgtQVpq4NIeaLFrUXlHWlM9jB92HuPtAqz85jHhgNI7hG01Rm7cdtfQUwxk/hiV4OweU fXxshqume/a2Z/AD8OnB2D0J7NBH0ukxYxlqXfHFwHi0xvCN5gE3Qwfze09hSnpnome1HephqIS5 nL9eLs02aJ2U+eTQT9HMWcs/jtKclIIGwWzc97E7ZeV/DGe+/c25AHrDR1l1Aa7LXLmeFPQA9gOS z0hF9yMh4RvQy1Xj1jbWP1Tm+Qe9IHnKji7ROAAAAABJRU5ErkJggg== User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux) Cancel-Lock: sha1:X+GKHNyw9y/bRwJJfhNCeqHwoI4= 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:100185 Archived-At: Igor Sosa Mayor writes: > 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] > `---- There's also rx, a mini lisp-language for regexp. Visual-regexp on github might be able to handle external regexp languages. —Rasmus -- Er du tosset for noge' lårt!