Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [isearch]

is the incremental search facility that highlights matching text as characters are typed. isearch-forward and isearch-backward support searching characters, strings, and regexp.

2
votes
0answers
21 views

isearch with invisible text properties, not overlays?

Q: how can I get isearch to understand invisible text properties, not just overlays? I'm writing a major mode that uses text properties rather than overlays to toggle visibility. I'd like to use ...
5
votes
2answers
67 views

Incremental Search after opening file

Being fairly new to GNU Emacs and intend to use it as a replacement to vi/vim where possible, I came across an obstacle, I seem not be able to overcome. In vim (similar to less) you can provide a ...
2
votes
1answer
31 views

Add multiple predicates to isearch-filter-predicate

I wrote a set of predicates to filter matches in my ìsearch-* and query-replace* routines. I also wrote a macro to bind the isearch-filter-predicate variable to multiple predicates: (defmacro with-...
0
votes
1answer
46 views

texmathp in isearch-filter-predicate breaks query-replace's match highlighting

I tried to use texmathp with iserch-filter-predicate to let query-replace function skipping maths in my LaTeX code. I wrote this code: (defun skip-math (beg end) "Return nil if some text BEG to ...
3
votes
1answer
67 views

Make region(s) invisible (not evaluated) to “string-match”, “occur” and similar commands

In a previous question, Make region(s) invisible (not evaluated) to query-replacy and similar commands, I learned about isearch-filter-predicate. Now, I wonder if is there a similar method to make ...
3
votes
2answers
80 views

Make region(s) invisible (not evaluated) to query-replacy and similar commands

Is there a way to make some regions of the buffer invisible (I mean not evaluated by) to query-replace and similar commands? Let me better explain with an example. Let's take a piece of LaTeX code .....
1
vote
2answers
48 views

Make isearch commands search only at the beginning of words

How to make C-s (isearch-forward) and C-r (isearch-backward) search only for words that start with the argument passed to them, instead of searching for the argument even if it's in the middle of a ...
0
votes
1answer
68 views

clear highlighted matches of an isearch

I've rebound some keys in god-mode so that S and R start a forward and backward incremental search and s and r repeat but never start incremental searches. This is the approximate division of labor ...
5
votes
1answer
63 views

edit search string and begin search from current location

I use C-s to start an incremental search. Sometimes I want to change the search string and either restart the search entirely from the beginning of the document or (other times) just change the search ...
1
vote
2answers
29 views

How show and filter search text interactively in separate buffer?

Emacs 26.1 Suppose I find any text in buffer: C-s find_text_1 Input Enter C-s find_text_2 Input Enter So if I want to again find text find_text_1 I press C-s then M-p. OK. It's work. Nice. If I ...
1
vote
1answer
46 views

In minibuffer forward through search history M-p not work

Windows 10, Emacs 26.1 Steps: Start Emacs Open *scratch* buffer. C-s text C-g C-s visit C-g Nice. Now I want to go backward and forward through search history with M-p and M-n respectively. But I ...
2
votes
1answer
47 views

How go to prev search text in minibuffer?

Emacs 26.1, Ido , smex, Open scratch buffer. C-s to find text file Here result: C-g Now I want to find another text: text Here result: Nice. It's work fine. But now I want to backward in search ...
0
votes
1answer
62 views

Hydra that executes interactive search

What I want is an easy-to-use hydra for macro execution. Typically I execute a keyboard macro a few times (e), and then might want to repeat infinitely until the end of a buffer (u). Sometimes I ...
1
vote
2answers
37 views

Inside isearch how to get mouse-2 clicked inside a frame to paste into echoarea?

When I search with C-s, I can paste a search term (copied outside of emacs frame) with either M-y or mouse-2 click focused inside echoarea. In xemacs it is enough to mouse-2 click inside the main ...
1
vote
1answer
35 views

Make region transient in elisp function

I'm trying to write a function that exits isearch leaving the current match selected "transiently", so that the mark is deactivated by any unshifted movement command. I've tried to modify this ...
4
votes
2answers
109 views

Incremental search in all visible buffers

Here's a feature I always wanted: I have two buffers opened side-by-side and I'd like to be able to start an incremental search in one of those buffers, but in a way which highlights results in both ...
2
votes
1answer
67 views

Can't switch input sources in the minibuffer during Isearch

Incremental search doesn't allow me to switch between different input sources, e.g. US English to French, when I'm typing my search string into the minibuffer. Is there a way to fix this? It happens ...
0
votes
1answer
56 views

Unicode character folding with Swiper/Ivy

Suppose I have bár written in a file, I would like to look for bar in swiper and find the occurrences of bár alongside the expected occurrences of bar, how I can do this? This would also apply to ...
1
vote
1answer
75 views

Search forward for the FIRST space character and stop there

I recently upgraded from Windows Emacs 19.x to Windows 26.3.1 and have a problem. in the old version 19 if I did a search forward for a space, (C-s) it skipped forward to the FIRST space character ...
0
votes
2answers
55 views

ISearch - Paste - text in mini buffer is not same

Windows 10, Emacs 25 Select text second word is upper case. Press C-s Paste text Why whole text is lower case in mini buffer?
2
votes
1answer
135 views

Wraparound search with `isearch-mode`

I found this function in this site: (defun search-selection (beg end) "search for selected text" (interactive "r") (let ((selection (buffer-substring-no-properties beg end))) (deactivate-...
0
votes
0answers
33 views

isearch-forward, call-interactively, and isearch-filter-predicate

Here are two use cases where I call isearch-forward with some filter predicate. (let ((isearch-filter-predicate (lambda (a b) nil))) (funcall 'isearch-forward)) (let ((isearch-filter-predicate (...
4
votes
2answers
86 views

Move cursor left/right while entering isearch

How can I move my cursor left and right while entering my isearch text? isearch-forward Enter some text Press cursor left to edit the search text Argh! Emacs returns the cursor to the main buffer. ...
2
votes
1answer
44 views

isearch but don't move the cursor until I ask to search

In a large file, I would isearch for the word byebug but as soon as I type by, my cursor is moved to a line containing the word bystander. (The file actually does not have the word byebug.) But now ...
3
votes
1answer
43 views

isearch, but not past the nth line of the buffer

I'm doing an Isearch on a large file. I'm on line 30, starting the isearch. Is it possible to tell Emacs to do the Isearch but consider line 343000 as the end of the file. The file has 1,000,000 ...
0
votes
0answers
103 views

can I have swiper and counsel as “add-ons” and not the default binding

I like the powers that counsel/ivy/swiper gives me, specially for C-s and C-x C-f, but since installing it, I've started missing the vanilla emacs C-s and C-x C-f. It would be awesome if I can "call" ...
0
votes
0answers
73 views

lose reftex-isearch-minor-mode after refresh

I want to activate reftex-isearch-minor-mode and tried the solution in this post offered by giordano, (add-hook 'TeX-mode-hook (lambda () (reftex-isearch-minor-mode))) ; for AUCTeX it works when I ...
1
vote
1answer
97 views

Exact match for isearch

I am relatively new to emacs. I am looking for a way to do the "exact match" type of interactive search. For example, search string "abcDEF" in following text should only match with line1's text: ...
2
votes
2answers
136 views

Search only within an Org Sparse Tree

I use org-mode to write a huge research diary with thousands of entries. I'm trying to organize them by tags. I make only the relevant entries appear via org-sparse-tree and that works perfectly. Now, ...
3
votes
0answers
52 views

Ignoring curly braces in search

Journal article titles in my BibTeX appear as follows: Title="{{E}nsure {C}onsistence {C}apitalization in {T}itles}", This produces consistence output, which I am happy with. However, searching for ...
2
votes
2answers
85 views

What is the best way to search forward/backward for a token?

Sometimes I want to search for a specific word but I don't want to find words which have my search string as a substring. For example, if I search for "pan" (bread, in Spanish), I don't want to find ...
2
votes
1answer
54 views

How to make DEL in isearch always delete character?

In Isearch, after hitting C-s a few times, you have to hit DEL a few times to get back to editing the search string. How can I disable this behavior? I'd like it so that DEL always deletes a ...
0
votes
1answer
35 views

Search with locale on Microsoft Windows

I'm using Emacs on MS Windows and suddenly I noticed that when I press C-s (incremental search) the prompt shows I-search [NL]: which I presume is my locale. I still can search incrementally but I can'...
0
votes
2answers
169 views

Incremental Search across Projectile project

How do I perform isearch over a whole projectile project, so that I can cycle through all occurrences of a string? This would be equivalent to multi-isearch-file for all files in the projectile ...
1
vote
2answers
252 views

Regex search: Why C-M-s does not seem to work like other keystrokes?

The purpose of this question is primarily to serve my curiosity, but it can maybe save some time for others who may press C-M-s (isearch-forward-regexp) just like they would press C-s (isearch-forward)...
3
votes
1answer
277 views

Extending word search selection in swiper

I have been using helm from some time and am now trying ivy, counsel and swiper. Regarding swiper I am wondering if there is a way of extending the word search selection. Just like hitting C-w after ...
4
votes
1answer
171 views

use isearch to search the search-ring?

In the minibuffer, M-p (previous-history-element) is useful, but I find C-r (isearch-backward) to be even better, as it lets me recall a specific history element without going through them one by one. ...
1
vote
1answer
30 views

Go to start of search string after `RET`

What's the best way to move point to the start of an isearch result instead of the end? E.g. given the following, where | is point: |foo bar baz And searching for bar, I'd like point to be at: ...
6
votes
1answer
104 views

char-fold-search match for German eszett (ß)?

In emacs 25.1, if I customize search-default-mode to "Char-Fold Search", then an isearch-forward for u matches ü and one for o matches ö. But what character should I type to match ß ?
0
votes
1answer
141 views

Remapping C-w in isearch

Currently when performing evil-search-forward , pressing C-w causes the cursor to yank and append the current word to the search (because that's what isearch does). I'd like to change that to the ...
2
votes
0answers
102 views

How can I define `search-whitespace-regexp` so it accepts a Unicode “no-break space”?

I'm writing a lot of Markdown for input to pandoc, so my files contain a lot of Unicode non-breaking spaces (U+00A0). I'd like those to search as whitespace with isearch-forward, so I tried adding ...
2
votes
1answer
84 views

How can i keep the case when I am using select and paste to C-s input field?

I see a word in buffer1. I want to look for it in buffer2. I select the word in buffer1. I select buffer2 as my current buffer, hit C-s, and press mouse-2 (the middle mouse button). Emacs converts ...
3
votes
1answer
103 views

Limiting Emacs incremental search to a function definition

Any existing package that can do incremental search inside a function definition instead of the whole buffer? Now the best I can do is to turn on semantic-mode along with semantic-stickyfunc-mode and ...
9
votes
2answers
384 views

Selecting (i.e., as the region) the current match in incremental search

When searching for a string with C-s, I want to be able to hit some key to exit search mode but still maintain the selection of the match. That way I can immediately start typing and replace the last ...
1
vote
1answer
79 views

Incremental Search on UTF-8 in Julia Mode

I was wondering if there is any way of searching (incremental search) for a UTF-8 character in julia mode, other than typing the character and copying it into the minibuffer. I think you can use ...
1
vote
0answers
25 views

Pinpointing an I-search Bug

I have a very annoying bug in my isearch behaviour; the buffer gets indented (modified) when I enter the first letter during isearch. I've checked all hooks named isearch.*hook but I can't find ...
3
votes
1answer
242 views

multiple-cursors + isearch (or phi-search) with Emacs 24+?

For several years, I've been happily using multiple-cursors with phi-search to run interactive searches with several cursors at once with Emacs 23. I would create my multiple cursors, then run phi-...
2
votes
1answer
35 views

isearch looses focus when trying to paste into the isearch buffer

strange issue. when i launch isearh and want to paste text into it, after pressing C-s the paste (S-insert) always pastes the text to the current edited buffer and not the isearch window. has anyone ...
2
votes
0answers
351 views

helm-occur: how to make it behave more like isearch?

I switched to helm-occur for searching within buffers. However, I can't help missing two of the nice features of isearch: isearch remembers the position where it was invoked in a buffer; helm-occur ...
2
votes
1answer
67 views

How can I bind a key to M-x C-r (isearch extended command)?

I am a fiend for C-r (isearch-backward), and I often will enter the minibuffer with M-x (execute-extended-command), then use C-r to search for a previous command. I'd like to bind a key that drops me ...