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
1 answer
107 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 ...
Gabriele's user avatar
  • 1,520
3 votes
1 answer
146 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 ...
stacko's user avatar
  • 1,597
3 votes
0 answers
72 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 ...
SabreWolfy's user avatar
  • 1,418
2 votes
1 answer
328 views

Quick access to the previous search terms after calling isearch-forward without switching to the minibuffer

I frequently re-search the terms previously searched by isearch-forward in my current session. Assume that I have searched term1, term2, ... during my previous I-searches. When I do a new isearch-...
Name's user avatar
  • 7,829
2 votes
3 answers
191 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 ...
Bite Bytes's user avatar
2 votes
1 answer
138 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 ...
american-ninja-warrior's user avatar
2 votes
2 answers
289 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, ...
Zuza's user avatar
  • 215
2 votes
1 answer
90 views

How can I configure incremental search to put my cursor at the start of whitespace rather than the end?

I just installed a new version of Emacs (24.3.1 through Fedora). For some reason, when I use C-s to search for a single space character, it jumps my cursor to the end of contiguous spaces rather than ...
Tikhon Jelvis's user avatar
2 votes
1 answer
93 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 ...
a_subscriber's user avatar
  • 4,062
2 votes
1 answer
308 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 ...
k76u4vkweek547v7's user avatar
2 votes
1 answer
135 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 ...
Alex's user avatar
  • 1,038
2 votes
1 answer
113 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 ...
zeltak's user avatar
  • 1,725
2 votes
1 answer
103 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 ...
ivan's user avatar
  • 1,948
2 votes
1 answer
134 views

Customize isearch to start from buffer start

Ctrl-s, isearch-forward is not appealing to me and so, i wrote a wrapper around it to search from the beginning of the buffer always. (defun sk-isearch-forward (original) (interactive "sEnter ...
Saravana's user avatar
  • 2,061
2 votes
1 answer
49 views

How to check from elisp if isearch is in progress?

I have a background process which when finishes switches to a specific buffer. I don't want this process to interrupt my current isearch if I'm doing one, so I'd like to test if an isearch is in ...
Tom's user avatar
  • 1,240
2 votes
2 answers
51 views

Can I bind a key as buffer local but not in the active keymap?

So I'm writing some custom functions to help me editing some guitar chords using LaTeX's songs package. I find convenient to rebind isearch-exit, so that when I press RET, the cursor is left at the ...
Alessandro Bertulli's user avatar
2 votes
1 answer
49 views

How can I make isearch match phrases across line breaks?

Suppose I have a text document (e.g. org-mode, Markdown, etc.) in which I would like to search for the phrase "hello world". Unfortunately, if paragraphs in this document are filled (e.g. ...
Ryan C. Thompson's user avatar
2 votes
1 answer
94 views

How to use "arrow-up" button to scroll in searched words history immediately after using isearch-forward

Is there any way to use "arrow-up" button to scroll in latest searched words immediately after using isearch-forward? For now, in order to use the "arrow-up" key for this purpose, ...
Omer Zimerman's user avatar
2 votes
1 answer
128 views

Is there a way to add display annotation to the buffer text so that it's searchable?

Suppose I have a text data file with various data values which the computer can parse easily, but it's not easy to read for a human. In order to make the file easier to read I'd add display only ...
Tom's user avatar
  • 1,240
2 votes
1 answer
49 views

key binding isearch-forward with Greek keyboard

I use Emacs with various languages and have had trouble invoking isearch-forward from a keystroke when my keyboard layout (OS-level) is set to Greek. If I try the usual C-s, it says there is no ...
user1951615's user avatar
2 votes
1 answer
46 views

Yanking into a regexp isearch escapes the metacharacters

I noticed today that when I yank a string containing regexp metacharacters into an active regexp isearch, the metacharacters all get escaped. For example, if I've killed the text foo* and yank that ...
Sean's user avatar
  • 939
2 votes
1 answer
352 views

How to bind C-h to delete-backward-char when doing isearch?

I use C-h as an alias for delete-backward-char everywhere. But when I do isearch it exits the search instead of deleting the character before the cursor. I tried binding C-h in isearch maps, but ...
Rogach's user avatar
  • 267
2 votes
1 answer
235 views

How to get emacs to keep cursor in the middle of buffer during search?

(I am using Aquamacs 3.5 which is based on GNU Emacs 25.3.50.1, in case this matters.) While searching (isearch-forward) in a buffer it often happens that I need to see some lines before/after the ...
José Figueroa-O'Farrill's user avatar
2 votes
1 answer
155 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-...
Gabriele's user avatar
  • 1,520
2 votes
1 answer
151 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 ...
user1134991's user avatar
2 votes
0 answers
116 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 ...
Dan's user avatar
  • 32.9k
2 votes
0 answers
165 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 ...
Norman Ramsey's user avatar
2 votes
0 answers
784 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 ...
Timm's user avatar
  • 1,589
1 vote
2 answers
221 views

Is there any way to configure isearch-forward-regexp invert backslashes usage?

It may be handy to make it shortly, for example use (GET|POST): *\{ instead of \(GET\|POST\): *{
Netsu's user avatar
  • 555
1 vote
1 answer
1k views

How do I change the highlight color for selected texts on isearch?

When I search a text on isearch due highlighed color it is not readable. Following line does not have any affect on the main selected word on the isearch: (set-face-attribute 'lazy-highlight nil :...
alper's user avatar
  • 1,350
1 vote
1 answer
462 views

improving isearch

I wonder if I can disable the 'failing overwrapped' warning in the minibuffer and directly wrap around instead if I do a search? Does anyone know how to facilitate this? Also there is a slight delay ...
CD86's user avatar
  • 563
1 vote
1 answer
269 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 ...
dylanjm's user avatar
  • 323
1 vote
1 answer
420 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: ...
StupidKris's user avatar
1 vote
3 answers
414 views

Stop emacs treating touchpad scrolling like C-g in minibuffer

I have a ThinkPad with a trackpad, and emacs exits from C-s and also from interactive replace using M-%, whenever I brush my hand over the trackpad while touch-typing - which happens far too often. ...
Robin Green's user avatar
1 vote
1 answer
46 views

regexp-isearch with fixed prefix

I'd like to search a buffer for headlines only. A headline is anything starting with the "*" character. Ideally, I'd invoke an interactive function which would take user input at the ...
ychaouche's user avatar
  • 207
1 vote
1 answer
90 views

Incremental search line highlight

When running incremental search by pressing C-s repeatedly (isearch-repeat-forward) is there a way to highlight, in addition to the matching string, the line where that string is found? I would like ...
unvarnished's user avatar
1 vote
1 answer
191 views

How can I replace all in symbol manner?

I am using following solution (How do I add a keybinding to use during an interactive isearch, `C-s ...`) to move over symbols in the buffer, which iterates over the matching symbols: (define-key ...
alper's user avatar
  • 1,350
1 vote
1 answer
97 views

How can I get the search string from incremental regexp search to use with replace regexp

If I want to do a replace-regexp I usually start with a isearch-forward-regexp so I can get immediate visual feedback on the search string. From there I'd like to grab the search string for using in ...
Michael Terry's user avatar
1 vote
1 answer
589 views

Is it possible to prevent screen flashing on combination of `isearch` and `recenter`?

I have followed answer for Emacs: Combine iseach-forward and recenter-top-bottom, replacing (recenter-top-bottom) to (recenter). My goal is to re-center after each isearch-forward or isearch-backward. ...
alper's user avatar
  • 1,350
1 vote
1 answer
321 views

configure packages without`provide` with `use-package`

How to configure packages, which have no (provide <PACKAGENAME>) call in their source code? Immediate problem: configure isearch with use-package. (Editing isearch.el is not an option because ...
jue's user avatar
  • 4,566
1 vote
1 answer
322 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 ...
Lorem Ipsum's user avatar
  • 4,477
1 vote
1 answer
134 views

Mark isearch result

I'd like to mark the current isearch result so that it 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 ...
Sati's user avatar
  • 775
1 vote
2 answers
78 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-...
Tobias's user avatar
  • 33.1k
1 vote
2 answers
214 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 ...
modulitos's user avatar
  • 2,482
1 vote
2 answers
199 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 ...
Pfedj's user avatar
  • 338
1 vote
1 answer
139 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 ...
a_subscriber's user avatar
  • 4,062
1 vote
1 answer
58 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: ...
Tianxiang Xiong's user avatar
1 vote
1 answer
86 views

How to defer a remap until the affected keymap has been created?

I wanted to change the behavior of isearch in the minibuffer, making Return both accept a search result (isearch-exit) and submit it (minibuffer-complete-and-exit). This is the behavior I've grown to ...
ivan's user avatar
  • 1,948
1 vote
1 answer
247 views

How to set the color for whitespace in isearch failures

I have my isearch failure face set like so: (custom-set-faces ... '(isearch-fail ((t (:background "#660c00")))) ... ) It works for the most part, highlighting text which doesn't match in that ...
GDP2's user avatar
  • 1,340
1 vote
1 answer
195 views

Yanking after `isearch-forward/backward`

When doing a yank after an isearch-forward/backward, the most natural thing that one wishes to happen is to isearch the string provided by that yank. How to realize this?
Name's user avatar
  • 7,829