Questions tagged [search]

Questions about search mechanics inside of Emacs.

Filter by
Sorted by
Tagged with
8 votes
3 answers
864 views

Search and replace through a multifile project in AUCTeX?

I am about to adopt Emacs to be the only editor I use in all what I am writing including LaTeX documents. I came from WYSIWYG editor which served that purpose fairly nice, namely TexStudio or TXS for ...
doctorate's user avatar
  • 1,809
8 votes
3 answers
1k views

Highlighting text in open (displayed) buffers/windows -- searching for text from one buffer in another

Right now, I have my Emacs frame vertically split, and am looking at two different buffers in the two windows. I'd like to go to a word in one buffer, hit some keys, and have the ocurrences of that ...
ShreevatsaR's user avatar
40 votes
5 answers
25k views

What is the easiest way to search all useful files inside a single project?

What is the easiest way to search for a regexp throughout the contents all files in the current project, skipping files that are not useful? Useless files are things like compiled files, imported ...
Malabarba's user avatar
  • 23.1k
6 votes
1 answer
531 views

Preset search isearch-string from command line

I am trying to set isearch-string from the command line. The purpose is to have a Perl script start Emacs with a given search string, and go directly to the first line of the string and enter search ...
Håkon Hægland's user avatar
4 votes
2 answers
354 views

Global goto regex?

I would like to run a command and go to the first matching regex pattern that matches in any open buffer. Kind of like search-forward-regex. The requirements are: not be limited to forward/...
Leo Ufimtsev's user avatar
  • 4,558
4 votes
1 answer
396 views

How to perform a search for a string inside math environments in a tex/latex document

I have a long tex document and I would like to perform a search for finding some string inside math environments. Is there a search function already provided by auctex to do this? Other solutions are ...
Name's user avatar
  • 7,809
3 votes
2 answers
144 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 .....
Gabriele Nicolardi's user avatar
3 votes
1 answer
56 views

How to search and replace, with search starting with the current selection

I would like the "search" from search and replace, to be the selected region. Is there a command doing that already ?
nicolas's user avatar
  • 177
3 votes
2 answers
149 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 ...
HappyFace's user avatar
  • 830
2 votes
2 answers
751 views

How do I search/replace with case sensitive search?

In emacs I'm using M-% to replace occurrences of b_abcd (of which there are only a few) with B_abcd (of which there are very many). Currently Emacs asks if it's OK to replace at each B_abcd, which ...
HarryH's user avatar
  • 131
29 votes
3 answers
4k views

Match two spaces with incremental search

When searching using: C-s SPC SPC Also matches single spaces. I want to match exactly two space.
Rovanion's user avatar
  • 987
13 votes
1 answer
809 views

Search for string ignoring new lines

I am used to writing files where paragraphs are split into several lines, e.g. with fill-column. When I search for a string (C-s) such as this is a long text, the search results would not return the ...
Tony's user avatar
  • 231
13 votes
7 answers
2k views

How to search the Emacs Lisp Reference Manual?

Sometimes describe- or apropos- are not enough. How can I search the Emacs Lisp Reference Manual (C-h i m elisp) from within emacs?
caisah's user avatar
  • 4,086
11 votes
4 answers
5k views

How to search in multiple files with Emacs without grep?

There is a folder with many sub-folders, files and I would like to search for a given piece of text in all of these files with Emacs on a Windows 10 machine. (I know about M-x grep, but it does not ...
user avatar
9 votes
3 answers
6k views

Recursively find all files from a folder containing a regexp in the filename, using helm

How can I find all files from a folder and its subfolders recursively, containing a regexp in the filename, using helm? For example: how to search for all files with the extension .el and containing ...
caisah's user avatar
  • 4,086
9 votes
3 answers
2k views

how do I do case sensitive searches using evil/spacemacs?

I'm trying to perform a search and replace in spacemacs but I need it to be case sensitive when by default it appears to be case insensitive. So I try to do :set noignorecase but then I have this ...
ChiseledAbs's user avatar
9 votes
2 answers
832 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 ...
Ben's user avatar
  • 607
8 votes
1 answer
2k views

Difference between `evil-search-forward` and `evil-ex-search-forward`

It's in the title: What's the difference between evil-search-forward and evil-ex-search-forward? When would I want to use one instead of the other? evil-search-forward Search forward for user-...
digitalis_'s user avatar
6 votes
1 answer
2k views

How to search by tags in org-mode

Here is a simple file: #+TAGS: math(m) music(u) * Gödel :math: * Bach :music: * Gauss :math: * Beethoven :music: * Mozart :music: Then I tried M-x org-tags-view Match: +math I expected that Gödel ...
user4035's user avatar
  • 1,059
5 votes
1 answer
1k views

How to jump up or down to first non-whitespace character in same column

I use evil-mode with Emacs and would like to accomplish this via evil-mode, but would be fine with doing it in an Emacs-centric way too. The subject line explains it well, but here is a post in which ...
Joe's user avatar
  • 551
4 votes
3 answers
2k views

Search for and correct capitalized words that are not at the beginning of a sentence

I have a latex document in which there are many incorrectly Capitalized words. Could anybody suggest a clever regex to track them? Even better if there is a function which cycles through such words ...
kindahero's user avatar
  • 538
4 votes
0 answers
65 views

How to do searches in MediaWiki mode?

How to do searches in MediaWiki mode? If I instead do searches in Web browser, and then copy the URI of the page into Emacs, it sort of defeats the purpose of using Emacs as and MediaWiki power ...
qazwsx's user avatar
  • 589
3 votes
1 answer
613 views

How can I highlight cursor or line in unselected frames?

Prelude Let me start by mentioning the scenario where the problem arises. I see that 2-3 variables are always used together in a system. I need to add yet another one that will be used along with ...
Calaf's user avatar
  • 483
3 votes
2 answers
387 views

make * in Spacemacs work like it does in vim

In Spacemacs, is there an easy way to make * (which calls the function spacemacs/enter-ahs-forward) work like it does in Vim? That is, I want * to perform forward searching like in Vim, without ...
illabout's user avatar
  • 285
2 votes
3 answers
575 views

Mark input in swiper-thing-at-point

Having some command automatically populate the input string is a great thing (particularly, I refer to the feature that swiper-thing-at-point provides). However, I would like to enhance this ...
Arthur Colombini Gusmão's user avatar
2 votes
1 answer
90 views

How can I search and replace in one go and for the full or selected text without visiting each search hit? [duplicate]

Any advanced editor has it: Search and Replace to replace a chosen word with another, with search criteria "Match case" and "Match whole word only" in addition like in notepad++. I ...
questionto42's user avatar
2 votes
2 answers
380 views

Gnome Tracker integration with emacs

I use Gnome Tracker quite a bit and am led to wonder whether there is currently any way to use Tracker from within emacs? That is to say; searching for files indexed by Tracker, within emacs (and ...
Vishal Belsare's user avatar
1 vote
1 answer
339 views

How to search for files from a root directory and get the results as a dired buffer?

I have a directory which contains directories with many music albums, and I'm doing a selection of songs according a list I found on the Internet. What I'm doing is splitting windows with the ...
shackra's user avatar
  • 2,772
1 vote
2 answers
318 views

Search in all Org mode headings within a folder

Is there in Emacs such a function to search within all headings of all Org mode files within a folder or group of folders?
Adelita's user avatar
  • 155
0 votes
1 answer
160 views

How to leave cursor at beginning of searched text in isearch?

Say I have this text: |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Where the | is the cursor, at the beginning of the line. I want to jump to the next occurrence of the sequence "...
Alessandro Bertulli's user avatar
0 votes
1 answer
76 views

How to show timestamped entries without TODO status

I understand from the manual that the command for doing a search of agenda entries which have a timestamp before today is as follows: TIMESTAMP<"<today>" If I additionally want to ...
Emmanuel Goldstein's user avatar
0 votes
0 answers
223 views

Regex search and edit text simultaneously with multiple cursors

I'd like to search for a pattern with regex and simultaneously cut or edit all instances of that pattern. Is there a ready-made function for this? Atom, for example, has one such package - by ...
Sati's user avatar
  • 775
-2 votes
6 answers
146 views

How do I break a large piece of text in to a list of 5-word phrases, and identify the oft-repeated phrases [closed]

I would like a function that finds repeating sequences of text sections. Would start with defining a number N. Let I have (setq N 5) say. I would take the first five text sections, then look for ...
Dilna's user avatar
  • 1