Subject: Re: bug#13369: 24.1; compile message parsing slow because of omake hack

From: Jambunathan K <[email-masked]>
Date: Wed, 09 Jan 2013 20:47:08 +0530

Mattias Engdegård <[email-masked]> writes:

Thanks, that was quick.  May be you want to indicate whether you want to
assign the copyright to that code FSF so that it could be improved upon
by others and distributed with Emacs or GNU ELPA.

>> Why not just share, instead of saying that you will be happy to do so.
>
> Sorry, I just assumed that someone already wrote such a thing 

[OT, The following comment concerns re-builder]

In re-builder, there is a way to convert between various regexp styles.
It is bound to C-c TAB by default.  It is not clear to me, whether
re-builder supports rx-to-regexp conversions.

When I try converting the following regexp (C-h v org-heading-regexp) in
read format to rx format

        "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$"

I am seeing that the re-builder translates that to 

    ,----
    | '()
    `----

with the following message 

    ,----
    | rx-form: Unknown rx form `nil'
    `----

I am not sure whether that counts as bug.  It is possible that
re-builder doesn't support such translation or that I am using the
interface wrongly.

While, 

        (xr "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$"))

gives me

    (seq bol
         (group
          (one-or-more "*"))
         (opt
          (one-or-more " ")
          (group
           (minimal-match
            (zero-or-more nonl))))
         (zero-or-more
          (any "	" " "))
         eol)

> and that it would be more polished than my amateurish attempt. Here it
> is.

I will let others review the changes.  

Some libraries like org.el use complex regexps.  For someone who wants
to dig deep in to what the regexps amount to, without resorting to
pen-and-paper, one can imagine a utility which overlays or tooltips a
regexp like string with it's rx counterpart.  It could be quite useful.