Is there a mode or some way to use grep inside emacs then jump to the referenced?
I'm looking for a useful way to use grep
from inside emacs
. I generally run a grep
command to find references in the source tree and then use emacs
to open the file and then jump to the line indicated with the -n
flag to grep
. However, I'm guessing with emacs
I could do better. It would be nice if the resulting view maintained the colorization provided by normal grep
in the terminal. Granted this wouldn't be universal, but at least the intent.
Is there a mode or some way to use grep
inside emacs
then jump to the referenced?
emacs grep
add a comment |
I'm looking for a useful way to use grep
from inside emacs
. I generally run a grep
command to find references in the source tree and then use emacs
to open the file and then jump to the line indicated with the -n
flag to grep
. However, I'm guessing with emacs
I could do better. It would be nice if the resulting view maintained the colorization provided by normal grep
in the terminal. Granted this wouldn't be universal, but at least the intent.
Is there a mode or some way to use grep
inside emacs
then jump to the referenced?
emacs grep
2
What have you tried? E.g. the first entry in the "Tools" menu says "Search files (Grep)" which sounds like it might arguably be vaguely related.
– Stefan
Nov 20 '18 at 20:21
2
C-h r i grep
. It's not hard to ask Emacs - one of the things that makes Emacs useful.i
in the manuals is your friend.
– Drew
Nov 20 '18 at 20:25
add a comment |
I'm looking for a useful way to use grep
from inside emacs
. I generally run a grep
command to find references in the source tree and then use emacs
to open the file and then jump to the line indicated with the -n
flag to grep
. However, I'm guessing with emacs
I could do better. It would be nice if the resulting view maintained the colorization provided by normal grep
in the terminal. Granted this wouldn't be universal, but at least the intent.
Is there a mode or some way to use grep
inside emacs
then jump to the referenced?
emacs grep
I'm looking for a useful way to use grep
from inside emacs
. I generally run a grep
command to find references in the source tree and then use emacs
to open the file and then jump to the line indicated with the -n
flag to grep
. However, I'm guessing with emacs
I could do better. It would be nice if the resulting view maintained the colorization provided by normal grep
in the terminal. Granted this wouldn't be universal, but at least the intent.
Is there a mode or some way to use grep
inside emacs
then jump to the referenced?
emacs grep
emacs grep
edited Nov 20 '18 at 20:27
sds
38.8k1493168
38.8k1493168
asked Nov 20 '18 at 18:41
lucidquietlucidquiet
2,44752961
2,44752961
2
What have you tried? E.g. the first entry in the "Tools" menu says "Search files (Grep)" which sounds like it might arguably be vaguely related.
– Stefan
Nov 20 '18 at 20:21
2
C-h r i grep
. It's not hard to ask Emacs - one of the things that makes Emacs useful.i
in the manuals is your friend.
– Drew
Nov 20 '18 at 20:25
add a comment |
2
What have you tried? E.g. the first entry in the "Tools" menu says "Search files (Grep)" which sounds like it might arguably be vaguely related.
– Stefan
Nov 20 '18 at 20:21
2
C-h r i grep
. It's not hard to ask Emacs - one of the things that makes Emacs useful.i
in the manuals is your friend.
– Drew
Nov 20 '18 at 20:25
2
2
What have you tried? E.g. the first entry in the "Tools" menu says "Search files (Grep)" which sounds like it might arguably be vaguely related.
– Stefan
Nov 20 '18 at 20:21
What have you tried? E.g. the first entry in the "Tools" menu says "Search files (Grep)" which sounds like it might arguably be vaguely related.
– Stefan
Nov 20 '18 at 20:21
2
2
C-h r i grep
. It's not hard to ask Emacs - one of the things that makes Emacs useful. i
in the manuals is your friend.– Drew
Nov 20 '18 at 20:25
C-h r i grep
. It's not hard to ask Emacs - one of the things that makes Emacs useful. i
in the manuals is your friend.– Drew
Nov 20 '18 at 20:25
add a comment |
1 Answer
1
active
oldest
votes
Believe it or not, M-x grep and M-x rgrep (r
for recursive) are already there - and can be accessed from menu Tools
--> Search files (Grep)
.
See 27.4 Searching with Grep under Emacs.
You might also find M-x dired-do-find-regexp-and-replace and M-x project-query-regexp useful.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53399491%2fis-there-a-mode-or-some-way-to-use-grep-inside-emacs-then-jump-to-the-referenced%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Believe it or not, M-x grep and M-x rgrep (r
for recursive) are already there - and can be accessed from menu Tools
--> Search files (Grep)
.
See 27.4 Searching with Grep under Emacs.
You might also find M-x dired-do-find-regexp-and-replace and M-x project-query-regexp useful.
add a comment |
Believe it or not, M-x grep and M-x rgrep (r
for recursive) are already there - and can be accessed from menu Tools
--> Search files (Grep)
.
See 27.4 Searching with Grep under Emacs.
You might also find M-x dired-do-find-regexp-and-replace and M-x project-query-regexp useful.
add a comment |
Believe it or not, M-x grep and M-x rgrep (r
for recursive) are already there - and can be accessed from menu Tools
--> Search files (Grep)
.
See 27.4 Searching with Grep under Emacs.
You might also find M-x dired-do-find-regexp-and-replace and M-x project-query-regexp useful.
Believe it or not, M-x grep and M-x rgrep (r
for recursive) are already there - and can be accessed from menu Tools
--> Search files (Grep)
.
See 27.4 Searching with Grep under Emacs.
You might also find M-x dired-do-find-regexp-and-replace and M-x project-query-regexp useful.
edited Nov 21 '18 at 17:02
answered Nov 20 '18 at 18:52
sdssds
38.8k1493168
38.8k1493168
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53399491%2fis-there-a-mode-or-some-way-to-use-grep-inside-emacs-then-jump-to-the-referenced%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
What have you tried? E.g. the first entry in the "Tools" menu says "Search files (Grep)" which sounds like it might arguably be vaguely related.
– Stefan
Nov 20 '18 at 20:21
2
C-h r i grep
. It's not hard to ask Emacs - one of the things that makes Emacs useful.i
in the manuals is your friend.– Drew
Nov 20 '18 at 20:25