New post as I'm learning more about grep and grep in emacs specifically:

@kensanata @eludom @jackbaty if you want to give it a look and tell me how much more I can add... feel free ;)

#emacs #linux #grep #text #howto #blog #moa


@jtr three alternatives also with individual drawback

1. single pattern:

-e "burger.*rest\|rest.*burger"

disad. everything between burger and rest is highl.

GNU grep with PCRE (-P instead of -e)

-P "(?=.*burger)(?=.*rest)"

disad. nothing is highl.

2. process substitution instead of pipe e.g. bash

-e burger <(grep rest *.org)

disad. (like pipe) only /last/ term is highl.

3. occur on occur buffer - n search terms. All highl.

disad. n return presses to /jump/ to match

Sign in to participate in the conversation

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.