Jeff King <peff@xxxxxxxx> writes: > On Mon, Nov 21, 2022 at 12:26:59PM +0000, Yoichi Nakayama via GitGitGadget wrote: > >> From: Yoichi Nakayama <yoichi.nakayama@xxxxxxxxx> >> >> It can be used with M-x grep on Emacs. > > Thanks, I like what this feature is doing overall, but I have some small > nits about the implementation. > >> +You can use the optional argument '--stdout' to print the listing to >> +standard output instead of feeding it to the editor. You can use the >> +argument with M-x grep on Emacs: >> + >> +-------------------------------------------------- >> +# In Emacs, M-x grep and invoke "git jump --stdout <mode>" >> +Run grep (like this): git jump --stdout diff >> +-------------------------------------------------- > > This example confused me because it says "run grep", but then runs a > diff jump. But maybe this is because it means to run the emacs grep > command? I don't use emacs, so it may make more sense to somebody who > does. Yes. "M-x" gives Emacs users a command line prompt to type (and tab complete) an Emacs command, and in the above explanation, the user is running the "grep" command of Emacs, which in turn prompts for a shell command that produces series of <filename>:<lineno>:<cruft> to jump around [*]. "M-x grep<RET>git jump --stdout diff<RET>" is what I would have written on the second line instead of "Run grep (like this)...". [Footnote] * People often run "grep -n -r -e <pattern>" but you can run things like "git grep -n -e <pattern> -- <pathspec>" and "find -name \*.h | xargs grep -n -e <pattern>".