Questions tagged [search]
Questions about search mechanics inside of Emacs.
319 questions
0
votes
1
answer
141
views
How to search for string with specific initial and final delimiter but not containing a particular substring?
In a very long text, I'd like to search for strings with the following properties:
Starts with (let's say) #.
Ends with (let's say) @.
Does not contain # or @.
Does not contain the substring (let's ...
0
votes
0
answers
23
views
Different color for current highlighted match in evil-ex-search-forward
I'm using doom emacs, which has in-built configuration to search for text in buffers with key binding / (evil-ex-search-forward). Once I search, I can hit RET and use either n or S-n to cycle through ...
3
votes
2
answers
148
views
How to disable backspace acting as reverse search?
To reproduce, press C-s, fill in a search string which occurs more than once in the rest of the file, then press C-s again. At this point I would expect backspace to delete the last character of the ...
0
votes
1
answer
69
views
Why does `\s` not work in helm-swoop regex search while `[[:space:]]` does?
I'm using helm-swoop to search within the current buffer using regular expressions. My goal is to find lines containing a whitespace character followed immediately by the digit 4.
Consider a buffer ...
1
vote
1
answer
162
views
TAB character in regular expression Isearch
I can't find TAB characters with the regular expression \t.
When I press C-M-s followed by \t, Emacs only finds characters t.
I'm working with version 28.2 on macOS Monterey.
2
votes
1
answer
158
views
Make non-regexp searches always case insensitive and regexp searches always case sensitive
I'd like my fixed-string searches to be always case insensitive, my regexp searches to be always case sensitive, and I don't want search-upper-case to change the case of my search strings. This should ...
2
votes
0
answers
71
views
How can I find identical regions in a buffer?
If I have a file like this
foo
bar
bat
hukarz
foo
bar
bat
, then I would like to be made aware that there is one region that is identical to another region
foo
bar
bat
The reason is that I have have ...
0
votes
1
answer
68
views
Regexp: Regexp that matches ")" but NOT "()"
I am writing a function that needs to move the character back to the first ")" character. However, in the middle there might be a "()" characters, I do NOT want the cursor to go ...
-1
votes
1
answer
48
views
Searching for the nearest space or bracket - can it be more general?
I grep Common Lisp code base and extract usage of the symbol I am interested in analysing. Then I copy it to scratchpad to clean up the grep. I know of sorting lines and removing duplicates, but ...
0
votes
1
answer
222
views
date range search with org-mode
Problem: lets say I want to search for all meetings I attended last March.
I can search for date ranges in my archive file using a sparse-tree search (M-x org-sparse-tree D) but I can't figure out how ...
0
votes
2
answers
232
views
Using a grep like function in lisp
I have a file, and I want to search if a given file has a string.
I want to call that function from an elisp function.
AFAIK, all the grep family of functions open a new buffer.
I only need to know if ...
0
votes
1
answer
89
views
Binary search in elisp, do away with the return variable
As part of my efforts to spruce up my elisp fundas, I am trying to implement the basic algorithms in elisp. I have done for binary search program as follows,
(defun bnry-srch (vctr itm strt end)
&...
1
vote
3
answers
389
views
Emacs org-mode: how to create link to a certain search agenda?
In 'Emacs org-mode' i can create links to headings and other things where I want to jump quickly.
How can I create a link in 'Emacs org-mode' which opens a certain search agenda?
At the moment I have ...
0
votes
1
answer
96
views
How to search regex in a url-retrieve buffer?
I'm trying to implement a login system with emacs lisp, the login system has a hidden input field that's initially empty and is filled by a piece of javascript code when submitting.
I'm currently ...
0
votes
0
answers
55
views
Regexp searches that repeatedly cover expressions
I'm just going through an old Latex-text I've written and wanted to use regexp-replace to make any pair of brackets containing at least one other pair of brackets into a \left(.*\right)-expression. ...