help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to grep for a string spanning multiple lines?


From: Marcin Borkowski
Subject: How to grep for a string spanning multiple lines?
Date: Sat, 26 Nov 2022 07:42:59 +0100
User-agent: mu4e 1.1.0; emacs 29.0.50

Hi all,

assume I have a file (probably an Org mode one) with some stuff
I archived from the 'net.  (I'm going to start to sue
youtube-sub-extractor.el.)  Here is my problem: assume I remember that
someone in some video said something, and I want to find that part.
However, it turns out that it is split between two (or more) lines.

Traditional `grep' is not helpful in this situation.  Neither is
isearch, nor swiper.  One idea would be to convert the subtitles to one
long line (which is an option), but are there any other ways to search
for a string spanning more than one line (and not knowing which words
are separated by a space and which ones by a newline)?

Both Emacs-y and shell-y tools would be appreciated.

TIA,

-- 
Marcin Borkowski
http://mbork.pl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]