Questions tagged [occur]

M-x occur provides a buffer containing a list of the matches of a string in the current buffer.

Filter by
Sorted by
Tagged with
35
votes
5answers
4k views

Is there a way to use query-replace from grep/ack/ag output modes?

I'm aware of find-grep-dired, marking the corresponding files and then pressing Q to run dired-do-query-replace-regexp on the marked files. Unfortunately that requires restarting the grep and no ...
1
vote
1answer
487 views

why can't edit in buffer after save in file?

In file I disable Read-only mode (by C-x C-q): But if I want to edit buffer I get message: Text is read- only
7
votes
1answer
156 views

Can Occur center the found text in the buffer?

When selecting an item from the occur buffer, the highlighted line is at the very bottom of the visible screen. This is less useful than having it 25-50% of the way down the screen(so it's easy to ...
1
vote
1answer
76 views

Using a backslash with occur

How can I use occur (M-s o) to search for a string that contains a backslash, e.g. \def?
0
votes
0answers
39 views

org-mode call occur not function

Since I need to search some pattern frequently, I wish to write some code there then execute it in org-mode. for example: #+begin_src elisp :results output (defun myoccur (arg) (occur (s-replace " "...