🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.emacs
Article #8333

searching that wrap over lines

#8333
From: bard
Date: Wed, 18 Jan 1989 20:54
22 lines
1532 bytes
> In article <2922@uvacs.cs.Virginia.EDU>, pausch@uvacs (Randy Pausch) writes:
> >Does anyone have a GNUemacs lisp function handy that allows incremental
> >string searches to wrap over lines?  (I guess this would involve 
> >converting the string search to a regular expression search, so that
> >the newlines would match, as well as spaces).
> 
> Ummm, GNU emacs comes with a perfectly good one, isearch-forward.  If
> you type a return at it while it is prompting for a search string, it
> mathces that jsut like any other character.  What?  You say you have
> search-exit-char bound to return?  Then just quote a newline with
> ^Q^J.

I thought that he meant something like an interactive word search, looking
for a phrase that is broken (at some unknown word boundary) over a line --
not looking for a string containing newlines at known places.  You can do it
with re-search-forward, typing "[ \t\n]+" after each word boundary, but of
course that's a pain.  Or, you can do it with word search -- but that's not
interactive.  It ought to be a routine hack on isearch or isearch-regexp to
write.

-- Bard the (lambda (x) (gargoyle))
Technical Details
Message-ID: <8901182054.AA02252@toucan.LCS.MIT.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!lll-winken!ames!mailrus!bbn!gateway!THEORY.LCS.MIT.EDU!bard
References: <34750@bbn.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!lll-winken!ames!mailrus!bbn!gateway!THEORY.LCS.MIT.EDU!bard
From: bard@THEORY.LCS.MIT.EDU
Newsgroups: comp.emacs
Subject: searching that wrap over lines
Message-ID: <8901182054.AA02252@toucan.LCS.MIT.EDU>
Date: 18 Jan 89 20:54:44 GMT
References: <34750@bbn.COM>
Sender: news@bbn.COM
Organization: BBN news/mail gateway
Lines: 22