Tried to look into in to capture two terms, and I still don't get it. The manual seems to list all the commands in emacs but there aren't a lot of examples as to how to use them. It says to use grep as you'd use it in the shell, but I can't pipe grep the same way (unless I use shell inside emacs, which is not the point).

So, any good rgrep examples out there?

@kensanata I'm tagging you since this will also be good in the wiki? @eludom you started it :-)

@jtr

Have you considered simple

M-x ! grep Hitchhiker *.org | grep galaxy

@eludom did, but I want to try q more "emacsy" way. There are many ways to do it inside emacs, it's interesting to see what people do also

@jtr There's also this (from my config)

defalias 'gf 'grep-find)

(setq grep-find-command
'("find -L . -type f -mtime -21 -name \\*.org -exec egrep -i --color -nH --null -e \\{\\} +" . 80))

@eludom hmm interesting. I need to look at the code it has some new things in it (an alias to an emacs command? It exists? Ohh!).

This can be helpful too.

@jtr yeah. Then you just type

M-x gf

or bind it to a key.

You can learn much from xah Lee xahlee.info/emacs/emacs/emacs_

Sign in to participate in the conversation
Mastodon for Tech Folks

mastodon.technology is shutting down by the end of 2022. Please migrate your data immediately. This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!