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

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

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


From: Jambunathan K
Subject: bug#13369: 24.1; compile message parsing slow because of omake hack
Date: Wed, 09 Jan 2013 20:47:08 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)


Mattias Engdegård <mattiase@bredband.net> 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.






reply via email to

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