Questions tagged [rgrep]
27 questions
10
votes
1 answer
How to search an Arabic word in text without its diacritics/accents?
In Arabic as with some other languages there is what is called diacritics to enhance pronunciation. There is no convention on how many diacritics should be written for a single word. Some use the minimum (which I prefer) just enough to disambiguate…

doctorate
- 1,789
- 16
- 39
7
votes
1 answer
Is it possible to rgrep *.el.gz files?
I often find myself debugging some stuff in the installed Emacs
sources, which are in *.el.gz form. And the ability to rgrep
would be quite handy. Is this readily possible?

abo-abo
- 13,943
- 1
- 29
- 43
6
votes
1 answer
rgrep default files pattern
How can I modify the default FILES pattern in rgrep for C++ mode?
For C mode the default is *.[ch]. For C++, it is *.cc *.cxx *.cpp *.C *.CC *.c++.
I would like to change it to *.cc *.[ch]xx *.[ch]pp *.[CHh] *.CC *.HH *.[ch]++.

SCC
- 61
- 1
5
votes
2 answers
Default base directory in rgrep
Whenever I'm using M-x rgrep to search inside my project arborescence, the interactive prompts suggest the following default arguments for the function:
Search for (default: ) (OK, always what I want)
Search for in files…

anol
- 195
- 4
3
votes
1 answer
How use rgrep for only org AND java files?
Linux Mint 20
Emacs 27.2
I want to find text end in the org files in my folder (recursively).
So I use rgrep
M-x rgrep
*.org
Here steps:
step 1:
step 2:
step 3 (result):
Nice. As result I found text end only in the org files.
But... now I want…

a_subscriber
- 3,854
- 1
- 17
- 47
3
votes
1 answer
is there a way to get two separate next-error lists so I can bind them to two different keys
I often have grep (technically rgrep) in a buffer/window and another buffer/window with a "compilation" of my active project in it. I would like to bind two different keys (e.g. f2 and f3) to next-error and next-grep-hit and have them be…

intel_chris
- 329
- 2
- 12
2
votes
2 answers
Emacs-native solution to searching files
When I use Emacs on a Linux OS, I search through files with rgrep. On Windows machine this takes some additional setup. Is there an Emacs-powered solution for searching through multiple files that does not depend on external utilities?

Matthew Piziak
- 5,958
- 3
- 29
- 77
2
votes
2 answers
Grep multiple lines in a directory
I have a regular expression that can match several lines of text, and I want to use it to search every file in a directory. The problem is that standard regrep command works line by line, so this multiline regular expression won't work.
Is there any…

Juan Herrero Diaz
- 193
- 1
- 3
2
votes
1 answer
How do I kill all buffers that were opened from browsing rgrep results?
I had a set of buffers open that I want to keep.
Then I started a search with M-x rgrep (SPC f g on Spacemacs).
While browsing results with n and p, each file containing a result is opened in a new buffer.
After I'm done with the search and…

agentofuser
- 501
- 3
- 11
2
votes
1 answer
Cancel rgrep during execution
I'm recursively grepping a large project using M-x rgrep.
After a few seconds pass I see the text I was searching for. At this point how can I cancel the search whilst preserving the buffer contents?

Sherlock
- 145
- 4
2
votes
2 answers
Switch to *grep* buffer after running rgrep
I have assigned C-c C-g to rgrep, this works fine, however I am still in the buffer I was in and not in the grep buffer which loads the results.
After hitting C-c C-g and running rgrep, I want to be in the grep buffer how do I do this?
I tried…

Prathik Rajendran M
- 193
- 6
2
votes
2 answers
How to customize files pattern while using rgrep?
elpy-mode internally uses this command to search for a regexp in *.py files.
(setq elpy-rgrep-file-pattern "*.py")
(rgrep regexp
elpy-rgrep-file-pattern
default-directory))
However elpy-rgrep-file-pattern is customisable. I want to…

Chillar Anand
- 4,042
- 1
- 23
- 52
2
votes
1 answer
rgrep in version 21.4?
Sadly I am stuck using Emacs version 21.4 in a work environment. Despite this I would very much like to be able to use rgrep.
Either the version of Emacs 21.4 I have has been stripped down, or rgrep doesn't ship with rgrep. I have transferred the…

Daniel
- 196
- 7
2
votes
1 answer
In egrep, how to click a matched line and let it show the matched line in another buffer without moving the cursor
In notepad++, I could search a folder, and then click the match line to display the matched line of the corresponding buffer. How to do this in emacs?
What I can do now is to press "ENTER" on the matched line. But that moves the cursor to the other…

Daniel Wu
- 1,711
- 2
- 17
- 26
1
vote
1 answer
how to use helm-do-grep to search within subdirectories?
I am running the command helm-do-grep and I notice that the search is not recursive, i.e. it searches only in the directory I specify and not in subdirectories. How do I direct helm-grep to automatically search recursively?

incandescentman
- 4,111
- 16
- 53