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
2
votes
1answer
21 views

How to make Isearch highlight more matches when I scroll?

upon having used Isearch or C-u C-s to highlight a word, when I use then C-v or M-v for scrolling the highlights remain due to setting (setq-default isearch-allow-scroll t lazy-highlight-...
1
vote
1answer
9 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 ...
0
votes
0answers
20 views

Programmatically call evil-search-forward and then paste

How do I create an elisp function to call evil-search-forward and then paste to search for the last text yanked/copied? I've tried calling commands such as evil-paste-after or yank (see below) but ...
0
votes
0answers
56 views

How to delete the search term in Emacs?

I have a question regarding the search term and how it's saved in Emacs, actually I want to know how to clear it. You know how you can clear the search results highlighting with (evil-search-clear-...
1
vote
1answer
44 views

Searching in a subtree in orgmode without narrowing

Is there a way to search in org mode in emacs in a certain subtree without narrowing or "narrowing" and "widening" the way to go?
1
vote
1answer
41 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 ...
0
votes
1answer
178 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. ...
0
votes
1answer
37 views

How to enable linum-mode only during I-search?

linum-line it not enabled when emacs is started. I just want to enable linum-mode (see the line numbers) during I-search and disable it when I-search: is ended. Is it possible?
1
vote
0answers
52 views

Swiper go to next matching line instead of next match?

When I use swiper to search and I press the down arrow key, it always goes to the next match even if that match is on the same line. Is there an easy way to go to the next line that has a match ...
1
vote
1answer
37 views

How to jump to backward found word when switched into reverse incremental search?

When I do I-search: or I-search-backward , it starts right away from the first word it find. Original behavior: word1 |[cursor]word1 ; cursor moves here ...
1
vote
1answer
45 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 ...
2
votes
1answer
62 views

How to perform incremental search inside math environments in tex/latex documents

Is there a way to perform incremental search that filters out all non-math environments (i.e., only searches within $...$, $$...$$, and if possible other relevant \begin{..}..\end{..} environments)? ...
1
vote
1answer
102 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 ...
0
votes
1answer
67 views

Using `C-n` and `C-p` to iterate as cycle in `find-file` instead of up/down arrow keys

Following answer related to “Open Recent” in Emacs indicates that After you press C-x C-f, press up and down to navigate the history of opened files. I have added following lines but they do not ...
0
votes
1answer
32 views

Is it possible to do word completion on `isearch` shell?

I want to apply word completion on isearch shell. When I press tab ^I shows up on the shell instead of completing the word and show up a window for suggestions. => Is it possible to complete a word ...
0
votes
1answer
243 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 :...
0
votes
1answer
37 views

Spaces don't work as expected in isearch

I recently installed a new major mode for something I'm working on, and suddenly spaces in expressions I'm searching for don't work as expected. Help!
0
votes
0answers
22 views

Is it a bug that isearch goes into text replaced with a display property?

The manual says: Some kinds of display specifications specify something to display instead of the text that has the property. These are called replacing display specifications. Emacs does not ...
2
votes
1answer
156 views

Make pdf-tools highlight persist after searching

Is it possible to make the highlight of searched terms persist after pressing RET? I had liked very much the behavior of zathura in this aspect. My question is : Can pdf-tools be tweaked to have the ...
4
votes
2answers
871 views

Non-greedy regex not working

I can't seem to get the non-greedy regex to work. Sample String: ABCD,E《F》、《GH》、《XYIJ》、《KL》、《MN》。 Regex Code: 《.+?IJ》 Search Result: Because .+? is a non-greedy input, I was expecting the ...
2
votes
1answer
84 views

Implementing my own incremental search

What would be the best way to implement an Emacs Lisp command that pops up the minibuffer, lets the user edit a search string there, and runs code to update the search results after each keystroke (or ...
1
vote
0answers
28 views

isearch in kmacro-step-edit-macro

I'm trying to edit a keyboard macro using kmacro-step-edit-macro. The macro starts by isearching for a word. C-s ;; isearch-forward binary_function ;; self-insert-command * 15 RET ...
1
vote
1answer
138 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 ...
1
vote
1answer
129 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 ...
1
vote
1answer
42 views

Searching text between markers as in Nota Bene

The Word Processor Nota Bene has a feature which I would like if possible to emulate within Emacs. One can insert into a document non-printing markers which are then used to delineate areas of text or ...
5
votes
1answer
77 views

Searching Greek and Hebrew texts in Emacs with isearch while ignoring accents and diacritics

I have a number of text and org documents that contain Greek and Hebrew text. I want to be able to search these in Emacs using isearch but I also want Emacs to ignore all accents and diacritics. I ...
4
votes
3answers
487 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
98 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
63 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
63 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 ...
0
votes
2answers
116 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
134 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
64 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 ...
1
vote
2answers
50 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
72 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
33 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? ...
1
vote
2answers
104 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
92 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
56 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
151 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
85 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
50 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
89 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
107 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
92 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
286 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
144 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
58 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
88 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
58 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 ...