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.

Filter by
Sorted by
Tagged with
3
votes
3answers
94 views

Get Emacs to jump to the start of a word after isearch

If I use isearch to search for the word "accommodating" in my document, I have to type acc before the cursor jumps to the word. When I press enter the cursor is on the the second "c" as in ...
1
vote
1answer
17 views

Search within column or rectangle

Is there a simple way to search within the current column or within a rectangle? I am navigating a CSV file and would like to find the value "10" in a particular column. Searching the entire file is ...
0
votes
1answer
40 views

bind german mutated vowel keys to functions

I have a German keyboard and would like to bind Isearch to C-ö. How can I do this?
0
votes
1answer
35 views

Why after search-toggle-case-fold text is select?

windows 10, emacs 26.1 I want to set I-search case sensitive mode. Before: M-x isearch-toggle-case-fold after: Now it's search in case sensitive mode. Nice. But why it select text? P.S. If I ...
-1
votes
1answer
32 views

I-search - case sensitive

windows 10, emacs 26.1 When I use I-search, then Emacs ignore case sensitive. but I need case sensitive I-search
1
vote
1answer
36 views

Regex: Don't Match Text Between Curly Braces (LaTeX Commands)

I've been using pandoc and emacs to convert beamer presentations to markdown format. In the beamer presentations we highlighted certain code in example code blocks red. Pandoc has left me to get rid ...
1
vote
1answer
27 views

Mark isearch results

I'd like to mark regex isearch results so that they can be copied or cut (killed) via M-w and C-w. Is there a ready-made function for this? The solution below provided by @danielpoe over here copies ...
1
vote
2answers
39 views

Why is face-attribute interfering with isearch?

Question: Why does face-attribute interfer with isearch filter predicates? The following code is part of my answer to the question about searching for bold text. If I set the variable isearch-face-...
3
votes
2answers
60 views

How can I search for bolded text?

My reasons for doing so are exactly like https://unix.stackexchange.com/questions/271550/how-can-i-search-for-bolded-or-underlined-text , but the accepted solution there is to use vim. I don't fancy ...
0
votes
1answer
25 views

Why text yanked into the Isearch search string is always in lower case?

Emacs 26.1 I select the next text: NO_PERMISSION_GRANTED_ACCESS_FINE_LOCATION_and_ACCESS_COARSE_LOCATION C-s , then paste text onto the search string. Here result: Why text is not in UPPER CASE? ...
0
votes
2answers
41 views

How to chain isearch-forward-symbol-at-point and query-replace-regexp into a single keybinding?

I'm looking to create a keybinding that will perform the following shortcut: call isearch-forward-symbol-at-point call query-replace-regexp It's basically a shortcut for the following key combo: M-s ...
1
vote
2answers
61 views

Jump to word in another window

I went from this issue Highlighting text in open (displayed) buffers/windows — searching for text from one buffer in another. I would like to write the function for these commands to jump to word in ...
2
votes
0answers
24 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
73 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
43 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
72 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
84 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
56 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
100 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 ...
6
votes
1answer
77 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
36 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
50 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
49 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
81 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
40 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
133 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
74 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
69 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
110 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
66 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
183 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
1answer
53 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
98 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
59 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
112 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
76 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
129 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
152 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
54 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
95 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
61 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
36 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
197 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
286 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
319 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
192 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: ...