Article View: gnu.emacs.bug
Article #87799(setq selective-display t) causes regex errors
From: garyo
Date: Wed, 24 Aug 1994 22:50
Date: Wed, 24 Aug 1994 22:50
301 lines
5646 bytes
5646 bytes
In GNU Emacs 19.25.94.2 (sparc-sun-solaris2.3, X toolkit) of Wed Aug 24 1994 on prometheus [Sorry; I'll rephrase my previous bug report so it has nothing to do with hilit19; that was just an artifact of how I discovered the bug. It can be shown just as easily with any regexp search function, even incremental regexp search (which is a totally awesome feature, BTW).] If you visit the file appended at the end of this bug report, and you enter hide-ifdef-mode and hide-ifdefs (or just set selective-display to t and change all the newlines to ^Ms), and then do a simple anchored-on-both-sides regexp search like "^.*$", you will get an error from the regexp matcher: [Stack overflow in regexp matcher] as soon as you try to match something in the hidden part. This is presumably because the regexp matcher is interacting badly with selective-display when it's t (in ^M-mode); It seems the regexp matcher thinks it's matching one long line. Another manifestation of the same bug is to try to find an anchored-at-the-start regexp (e.g. "^this") in the hidden area. It won't be found, because none of the ^Ms match the ^ in the regex. Don't have a fix for this one, sorry. Possibly the regex code has to know about selective-display (to use ^M as a newline)??? Sounds gross, but I don't know what the alternatives are. -- Gary Oberbrunner (garyo@avs.com) /* here's a test file. It's just 261 or so lines of text with an * #ifdef/#endif pair around them. */ #ifdef FOO this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; this is a c statement; #endif /* This is the end of the test file */
Technical Details
Message-ID:
<9408242249.AA03683@prometheus>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!avs.com!garyoShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,fe11b6f4805c1104,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-08-24 18:51:31 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!uunet!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!avs.com!garyo From: garyo@avs.com Newsgroups: gnu.emacs.bug Subject: (setq selective-display t) causes regex errors Date: 24 Aug 1994 18:50:29 -0400 Organization: GNUs Not Usenet Lines: 301 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <9408242249.AA03683@prometheus>