Stefan Monnier <[EMAIL PROTECTED]> writes:
>
> In theory, yes, but IIRC the resulting regexp may be of a size exponential
> w.r.t the size of the literals ;-(

Yes, at worst.  A tree of common prefixes, if you know what I mean
(like regexp-opt I suppose).

> I believe in practice it's not going to be exponential, but it may still be
> fairly big&ugly.

Yes, about 1200 chars :(.

Richard Stallman <[EMAIL PROTECTED]> writes:
>
> How would you write paragraph-start to do that?

Proof of concept below, eval it then visit a html file.  On the sample
foo.html below notice the "<code>" lines were previously each an
individual paragraph but now are one.  The <p> bits are still
individual paragraphs, as are the <foobar> bits (a deliberate unknown
tag name).

> I think it is very hard, perhaps impossible.

Not impossible, but easier if the regex engine could get some perl
style non-match lookahead (a regexp special which matches only if the
following text isn't a given expression).

Otherwise it'd be much easier of course to specify what is a separator
rather than what's not.  Just for myself I've managed with only <p>
and <li>.  I suppose it depends what and how much you write.  Maybe a
judicious (and perhaps customizable) selection among the standard tags
would be enough.  (Enough for the original motivation of <code> etc
not being a new paragraph and hence not hindering filling.)

Attachment: html-para.el
Description: application/emacs-lisp

hello world this all flows together

One paragraph.

Two paragraph.

A paragraph. Another paragraph.
  • This is some text.
pre form
world something
_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to