Article View: gnu.emacs.bug
Article #99140occur semantics
From: macrakis
Date: Tue, 06 Nov 1990 05:18
Date: Tue, 06 Nov 1990 05:18
21 lines
1493 bytes
1493 bytes
GNU Emacs 18.53.11 on NeXT 1.0.1 The documentation for occur says: Show all lines following point containing a match for REGEXP. This is in fact not what it does. What it does is to display the last line of each match for the regexp in the buffer. This is wrong in (at least) two ways: it can show too much (when there is no individual line containing a match) or too little (where there are many lines which individually contain matches, but which also match as a single block). Case A: (occur "a[^x]b") on "a\nb" --> 2:b instead of null. Case B: (occur "^[^x]+$" nil) on "a\nb" --> 2:b instead of 1:a 2:b. Of course, in both cases you can work around the problem by explicitly excluding \n from the character range, but that's not the point: the code and the documentation do not agree. -s
Technical Details
Message-ID:
<9011051604.AA19092@.dupuis.gr.osf.org.>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!apple!usc!cs.utexas.edu!tut.cis.ohio-state.edu!gr.osf.org!macrakisShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,74b0c77a7d8c7697,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1990-11-05 21:18:57 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!apple!usc!cs.utexas.edu!tut.cis.ohio-state.edu!gr.osf.org!macrakis From: macrakis@gr.osf.org Newsgroups: gnu.emacs.bug Subject: occur semantics Message-ID: <9011051604.AA19092@.dupuis.gr.osf.org.> Date: 6 Nov 90 05:18:57 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 21 Approved: bug-gnu-emacs@prep.ai.mit.edu Posted: Tue Nov 6 06:18:57 1990 X-Unparsable-Date: Mon, 5 Nov 90 17:07:01 GMT+0100