🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.vm.bug
Article #8878

Re: vm 5.32 and emacs 19.7

#8878
From: Michael Smith
Date: Mon, 31 May 1993 17:39
39 lines
2354 bytes
jwz@lucid.com (Jamie Zawinski) writes:
> I'll bet the reason for this is the new regex.c that FSF19 is using; VM uses
> some regexps that will perform pessimally in FSF19.  Lucid Emacs still uses
> the same regex.c that was in v18 because the new one's time requirements have
> gone ballistic.  We're talking going from 0 seconds to 27 seconds when
> matching a pattern against a buffer that only contains 70 characters!
>
> The reason for this is that Posix compliance has forced a change in the
> semantics of regexp matching: a regexp is supposed to match the largest
> possible substring, whereas in v18, it matched the longest possible substring
> of the *first* match it found.

Um. Er. How on earth will this work?

What happens when my buffer looks like this:

    "111111 a 222222222 ac 333333333333333333333333333 c 444"

and I replace regular expression "a.[^c]*c" with "x".  Under the new
scheme, will replace-regexp search for the longest match to replace first,
resulting in

    "111111 a 222222222 x 444"

or will replace-regexp just replace the first one as it does now to give

    "111111 x 333333333333333333333333333 c 444".

This raises an interesting question of what emacs does to replace all
occurances in a buffer...

Interested,
Michael.


--
----------------------------/|-|--|-|--|------Michael-Smith-------------------
smith@pell.anu.edu.au      /_| |\ | |  |      Mathematics Research Section
--------------------------/--|-|-\|-|_/|------Australian-National-University--
Technical Details
Message-ID: <SMITH.93May31173934@wilton.anu.edu.au>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!noc.near.net!uunet!munnari.oz.au!newshost.anu.edu.au!newshost!smith
References: <1993May24.093104.11492@informatik.uni-wuerzburg.de> <1993May28.110221.13810@informatik.uni-wuerzburg.de> <9305281847.AA13797@thalidomide.lucid.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f6829,351ec474a166a424
X-Google-Attributes: gidf6829,public
X-Google-ArrivalTime: 1993-05-31 00:40:28 PST
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!noc.near.net!uunet!munnari.oz.au!newshost.anu.edu.au!newshost!smith
From: smith@pell.anu.edu.au (Michael Smith)
Newsgroups: gnu.emacs.vm.bug
Subject: Re: vm 5.32 and emacs 19.7
Date: 31 May 93 17:39:34
Organization: Australian National University
Lines: 39
Message-ID: <SMITH.93May31173934@wilton.anu.edu.au>
References: <1993May24.093104.11492@informatik.uni-wuerzburg.de>
 <1993May28.110221.13810@informatik.uni-wuerzburg.de>
 <9305281847.AA13797@thalidomide.lucid.com>
NNTP-Posting-Host: 150.203.22.65
In-reply-to: jwz@lucid.com's message of Fri, 28 May 1993 11:47:04 PDT