Linked Questions

25 votes
7 answers
9k views

How do I refactor across a project in emacs (change method name everywhere)?

I want to rewrite parts of an opensource project. This includes renaming methods. How can I do that efficiently in emacs across the whole project? I would rather not use hacks such as search and ...
The Unfun Cat's user avatar
20 votes
7 answers
7k views

How to convert lines to an org-mode checklist?

Suppose I have the following list. I'd like to convert it to a checklist. Lec 1 | 1:20:36 Lec 2 | 1:10:32 Lec 3 | 1:08:33 Lec 4 | 1:20:33 Lec 5 | 1:16:50 Lec ...
Nick's user avatar
  • 4,473
40 votes
5 answers
25k views

What is the easiest way to search all useful files inside a single project?

What is the easiest way to search for a regexp throughout the contents all files in the current project, skipping files that are not useful? Useless files are things like compiled files, imported ...
Malabarba's user avatar
  • 23.2k
22 votes
5 answers
12k views

How to recursively search / grep file contents in a directory / subdirectories in Emacs?

I'm using Emacs for quite some time and I still somehow fail to understand what is the best way to (recursively) grep for a string within a (project) directory and get the results presented either as ...
Boris Stitnicky's user avatar
14 votes
5 answers
4k views

How do I search and replace over a set of files?

I'd like to define a set of files within which I can search and replace text. To clarify: I would like to be able to search, e.g., in all files xk*.tex in a given directory (and excluding backup ...
Claudio's user avatar
  • 141
11 votes
4 answers
2k views

How can I run a keyboard macro in selected buffers from Ibuffer or selected files from dired?

If I have to do some variable name refactoring, I use ag and multiple-cursors. But when I have to do some code block removal/addition/moving, I use keyboard macros. But I need to switch to each ...
Kaushal Modi's user avatar
  • 25.7k
4 votes
3 answers
911 views

find-grep-dired equivalents for ack and ag

Is there an equivalent find-grep-dired using ack or ag? With the ability to specify the directory where the search starts? The Dired output itself is not so important (in fact I prefer the ack-mode ...
emil's user avatar
  • 61
2 votes
2 answers
161 views

How to configure org-mode properly after upgrading from 7.9.3

On the orgmode site it says that if you upgrade from org-mode v.7.9.4f to v.8+: You must search your configuration for the existence of varaibles starting with org-export- and change their names (e....
Brian Z's user avatar
  • 2,913
0 votes
2 answers
676 views

Using Occur to to recursively search in a directory [duplicate]

I use 'occur' to search for regexp in current buffer and edit the results in occur buffer . Now my requirement is to search all the files in a directory(including sub-directories ) and edit the ...
Green's user avatar
  • 1
4 votes
1 answer
3k views

How can I edit the Helm results buffer and have the changes reflected in the original buffers?

I've seen this demonstrated before in various screencasts and can't find it searching through the docs. I do use helm-swoop-edit quite often in a single buffer but when I need to change all ...
stsquad's user avatar
  • 4,661
1 vote
1 answer
58 views

How to comment or uncomment the same lines of code in multiple files at once?

Suppose you have multiple files which has common lines of code or common matches of a regexp pattern. Is there an "emacs way" to comment/uncomment such specific common lines at once in all ...
Julia's user avatar
  • 141