help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regex edit mode


From: Igor Sosa Mayor
Subject: Re: regex edit mode
Date: Tue, 30 Sep 2014 19:55:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Sam Halliday <address@hidden> 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     :: address@hidden ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::




reply via email to

[Prev in Thread] Current Thread [Next in Thread]