2022 Developer Survey is open! Take survey.

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
1 vote
1 answer
13 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. ...
user avatar
1 vote
1 answer
48 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 ...
user avatar
  • 1,102
0 votes
0 answers
7 views

allign string to the right of the screen in isearch echo area

Since emacs 27.1 isearch can show how many matches there are in the buffer. I enabled it like this: (setq isearch-lazy-highlight t isearch-lazy-count t lazy-count-prefix-format ""...
user avatar
  • 290
0 votes
1 answer
47 views

consult command for isearch?

I was using ivy+swiper for a while, and it has swiper-from-isearch which gives a nice occur-like UI for finding isearch matches. I switched to vertico + consult recently. I see that consult has ...
user avatar
  • 406
1 vote
1 answer
20 views

searching for explicit spaces, without reinterpretation

Often I'll search (an ordinary i-search) for a sequence of two spaces, or three, or four. But on one machine I'm using, emacs by default appears to be in some mode where searches for spaces are ...
user avatar
1 vote
1 answer
29 views

How to remove characters causing encoding error

When I visit any file under a certain file tree, emacs spits out this error: These default coding systems were tried to encode text in the buffer ‘ *temp file*’: (utf-8 (7862 . 4194279) (14646 . ...
user avatar
  • 104
1 vote
1 answer
39 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 ...
user avatar
  • 1,058
0 votes
0 answers
40 views

Make undo during I-search revert last call to ding

Entering a failing search string during I-search triggers a call to ding(). If this happens during a macro recording that ding when the macro is being played will abort the macro which in turns ...
user avatar
  • 415
2 votes
1 answer
80 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, ...
user avatar
1 vote
1 answer
54 views

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

I am trying to apply following solution(How to jump to backward found word when switched into reverse incremental search?) into Emacs >27.1, (which works in emacs 26.3): (define-advice isearch-...
user avatar
  • 1,102
0 votes
1 answer
24 views

Isearch-forward org-timestamp in german time format

In org mode I use a german time format for timestamps (setq org-time-stamp-custom-formats '("<%a. %d.%m.%Y>" . "<%a. %d.%m.%Y %H:%M>")) For example <Fr. 25.06.2021&...
user avatar
  • 957
1 vote
0 answers
18 views

Mac OS and possibly other GUIs: Why is default "s-g" behaving differently from "C-s" in isearch-mode

I don't really want s-g to exit the Isearch minor mode but it does. The reason this is happening to me is unclear, because investigation of the binding of s-g reveals it is supposed to be a standard ...
user avatar
  • 63
0 votes
1 answer
51 views

isearch buffer greyed out/blurred after update to macOS 11.3

I'm running Mac Port version of emacs 27.2 on macOS big sur. I recently updated to macos 11.3, and I'm having some strange behavior when I do a C-s search. In around 75% of instances, the entire ...
user avatar
2 votes
1 answer
34 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 ...
user avatar
0 votes
0 answers
25 views

How to discard line-number highlight during i-search?

During the i-search if I use dracula theme it highlights the line-number if the searched word is the first in the line. Example view: If I uncomment (load-theme 'dracula t) the example view would be ...
user avatar
  • 1,102
1 vote
1 answer
79 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-...
user avatar
  • 419
2 votes
1 answer
32 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 ...
user avatar
  • 867
0 votes
0 answers
146 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-...
user avatar
  • 41
1 vote
1 answer
102 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?
user avatar
  • 217
1 vote
1 answer
71 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 ...
user avatar
0 votes
1 answer
482 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. ...
user avatar
  • 1,102
1 vote
1 answer
46 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?
user avatar
  • 1,102
1 vote
0 answers
135 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 ...
user avatar
1 vote
1 answer
76 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 ...
user avatar
  • 1,102
1 vote
1 answer
108 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 ...
user avatar
  • 237
3 votes
1 answer
87 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)? ...
user avatar
  • 215
1 vote
1 answer
168 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 ...
user avatar
0 votes
1 answer
122 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 ...
user avatar
  • 1,102
0 votes
1 answer
60 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 ...
user avatar
  • 1,102
1 vote
1 answer
649 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 :...
user avatar
  • 1,102
0 votes
1 answer
48 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!
user avatar
0 votes
0 answers
30 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 ...
user avatar
  • 1,058
3 votes
1 answer
298 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 ...
user avatar
4 votes
2 answers
1k 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 ...
user avatar
  • 635
3 votes
1 answer
144 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 ...
user avatar
  • 357
1 vote
0 answers
43 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 ...
user avatar
1 vote
1 answer
228 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 ...
user avatar
  • 4,211
1 vote
1 answer
255 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 ...
user avatar
  • 419
1 vote
1 answer
51 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 ...
user avatar
5 votes
1 answer
108 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 ...
user avatar
6 votes
3 answers
853 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 ...
user avatar
1 vote
1 answer
186 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 ...
user avatar
  • 3,835
1 vote
1 answer
73 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?
user avatar
  • 419
0 votes
1 answer
72 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 ...
user avatar
  • 3,395
0 votes
2 answers
246 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
user avatar
  • 3,395
1 vote
1 answer
186 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 ...
user avatar
  • 303
1 vote
1 answer
79 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 ...
user avatar
  • 635
1 vote
2 answers
55 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-...
user avatar
  • 29.8k
3 votes
2 answers
96 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 ...
user avatar
  • 620
0 votes
1 answer
46 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? ...
user avatar
  • 3,395