Path: utzoo!yunexus!telly!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!UUNET.UU.NET!sbsvax!jp From: sbsvax!jp@UUNET.UU.NET ("Joachim Philippi") Newsgroups: gnu.emacs.bug Subject: (none) Message-ID: <8911101029.AA16250@sbsvax.uucp> Date: 10 Nov 89 10:29:00 GMT Article-I.D.: sbsvax.8911101029.AA16250 Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 37 ; -- cut here -- ; Bug in Emacs string-match ; Emacs version 18.51 on Sun 3/60, Sun OS 3.5 ; Repeat by: ; ; 1. load this text into Emacs ; 2. strip header and footer of this text ; 3. evaluate this text with `M-x eval-current-buffer' ; 4. type `M-x search-abc' ; Result: `found' is displayed in the minibuffer ; 5. goto end of buffer: `M->' ; 6. insert 1000 characters: `C-u 1000 x' ; 4. type `M-x search-abc' ; Result: `not found' is displayed in the minibuffer ; I guess, in trying to find the longest match an internal buffer of Emacs ; overflows and so we get a wrong result. (defconst match-all-chars "\\(.\\|[\n]\\)*" " regexp matching each character in a string ") (defun search-abc () (interactive) (beginning-of-buffer) (if (string-match (concat "a" match-all-chars "c") (buffer-string)) (message "found") (message "not found"))) ; email : philippi@sbsvax.informatik.uni-saarland.dbp.de ; or : ...!uunet!unido!sbsvax!philippi ; voice : +49 681 302 2065 ; snail : Joachim Philippi, Universitaet des Saarlandes ; FB 14 - Informatik, Gebaeude 36, Raum 227, Im Stadtwald 15 ; D-6600 Saarbruecken 11, West Germany ; -- cut here --