Questions tagged [search]

Questions about search mechanics inside of Emacs.

Filter by
Sorted by
Tagged with
1
vote
1answer
28 views

Point to bound variables in scope

So, Dr. Racket has a very interesting feature where you can see all occurrences of a bound variable if you hover it: Is there a way to do something similar in Emacs? I'm currently editing C++ code. ...
1
vote
1answer
18 views

How to multi-word search

When I use swiper to search inside a buffer I can use multiple search words separated by a blank space. This works. But I also want that behaviour when search for a file (C-x f), a variable or ...
1
vote
1answer
27 views

Need search function to navigate to last line in continuous occurrence range

I am looking for a way to improve searching by repeating pattern. Let's say some program prints lots of log messages with the same pattern: copying path '/nix/store/lqfjx7x6imy5a9xab1ff5nhg90v089rq-...
0
votes
0answers
15 views

Emacs Evil Mode permanently highlight all instances of text searched using the `/` key

In Emacs Evil Mode, when I search using the / key, it has the following behavior: It highlights all instances of the match as I am typing after pressing the / key. When I press return, it only ...
0
votes
0answers
13 views

How to create commands to search specific kinds of files using `helm-projectile`?

I want to be able to search python, typescript, and markdown files separely with helm-projectile. Is there a way to create distinct keybindings to search the contents of files with each extension. ...
0
votes
0answers
42 views

How to show arrows for backward (<) and forward (>) search

I had installed emacs and org mode in Fedora Linux and when I clicked the Search (magnifying glass icon) in the toolbar, automatically underneath the toolbar, an arrow button to search backwards (<)...
0
votes
0answers
22 views

Way to filter/search authors in magit-cherry

Most of the times I have to backport my commits to the upstream for that I need to only check the cherries which were authored by me, is there a way I can narrow them by the C-sing the author name? I ...
0
votes
1answer
52 views

Search and Replace for a block on many lines in a dozen files

I have a a bunch of HTML files and in each of them I want to replace a fixed block of approx 30 lines with a one liner. Is there an Emacs command or package which makes this easier? Using e.g. dired-...
0
votes
1answer
32 views

Search and replace in multiples files at once by having them all open as a buffer?

I've done this before in emacs but I can't remember how or which plugins were involved. Basically you marked a bunch of files according to a file extension, and then you got asked for a search string, ...
0
votes
0answers
22 views

xml: copy line if tag found below that line and change content between tags from associated list or hash table

I am rather new to emacs and need some keywords which I can than use to search the manual/forum/google. Whenever a special tag name can be found in an xml file I would like to copy that line (tags and ...
2
votes
0answers
28 views

How to get the last project search results?

When searching in project with +default/search-project after opening a result. How do I get back to the previous search results? And ideally to the same position in the results list? The usecase: ...
1
vote
1answer
56 views

How to perform a multi-file regex-search with a regexp that encompass several lines?

Scenario: I want to detect all defcustom sexp that have a :set or :initialize keyword in all Emacs Lisp files inside a directory tree. Searching for newline can be problematic depending of the regexp ...
1
vote
1answer
54 views

How to search for words separated by arbitrary whitespace?

The question is general, but here's a specific case: In LaTeX source files, it doesn't matter if two words are separated by one space character, multiple space characters, or even a linebreak - in the ...
0
votes
1answer
14 views

How to adjust the search in file behavior in spacemacs?

Currently, when I using vim searching "/searchforsth" with "n" to search for words. After navigating through the words on this page, the next word that is not on the current page ...
0
votes
1answer
37 views

Searching in Dired for content in files while filtering files

From Dired, I'd like to be able to search for content pretty much like I do on my MAC Finder, while showing the files that match the criteria/regular expression (and no other files). I don't want the ...
0
votes
1answer
88 views

How to filter search results by path pattern?

I'm using Projectile with ripgrep. I can search project lines by some pattern, as an example: test 42 will match strings like this so, test is not 42 at all I would like to be able to add additional ...
1
vote
1answer
53 views

Yank / copy / get into a buffer matching regex search results

I am trying to "extract" my search results into a new buffer, but only the matches - not the whole lines. For example I am trying to get a list of HTML color codes used in a file. I can ...
0
votes
1answer
48 views

Search ELPA/MELPA Package repositories

I know searching for packages in the ELPA/MELPA repositories might be available within emacs itself, but I'm just wondering, can I do the search on the Internet as well? Just like I know I can search ...
1
vote
0answers
21 views

How to search amongst DONE items (either archived or not)

I am new to Emacs and wonder how it is possible to search a DONE item. I archive my DONE items from agenda files once every couple months. So some DONE items are in the agenda files themselves and ...
1
vote
1answer
36 views

Search for a capital letter in a string and move the cursor to it

I am trying to learn how to implement regular expressions in emacs. I have a string that looks like this: Fname0 Mname0 Surname0Fname1 Surname1Fname2 I would like to search for any capital letter ...
0
votes
1answer
30 views

"VC method not implemented for backend" for project-find call

I am trying out project based search via project-find-regexp, but I get the error: vc-call-backend: VC method not implemented for backend: find-ignore-file, CVS How can I fix this? I assume this is a ...
0
votes
0answers
22 views

Preserving evil mode search/replace command history

In evil mode, I use a lot of search/replace with %s/pattern/replacement. I have (evil-select-search-module 'evil-search-module 'evil-search) in my ~/.emacs file. However, some of the past search/...
0
votes
1answer
54 views

Custom search for text under cursor

I would like to write a custom elisp function that searches for a few variants of unicode text under a cursor and highlights their occurrences in the currently open file. For e.g. if my text is ...
1
vote
1answer
51 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-...
0
votes
0answers
33 views

Search on org-mode tags directory-wide?

I have a large set of my own tags that I've added to org-tag-alist that I use liberally to tag headings throughout my org files. I would like to search throughout my org directory (recursively) on a ...
0
votes
3answers
56 views

Search for text, print a message about it, and then return cursor to original position

I want to write an Elisp command that searches for a specific string in the backward direction, pauses the cursor there for a second, echoes a message about that occurrence, and then returns the ...
1
vote
1answer
153 views

How to search word under cursor using counsel-git-grep

I am using counsel-git-grep to grep for a string in the current Git repository. When I do M-x counsel-git-grep it opens following in the mini-buffer. 2 git grep: 3 chars more Let say if the ...
0
votes
0answers
39 views

Symbol Highlight Transient State select all words

I am using Spacemacs. I want to move between variables easily and while using #spacemacs/enter-ahs-backward function. I want to select the even word near of some special characters like $!:<> ...
1
vote
1answer
117 views

function to search and replace multiple words - necessary to goto-line 1 every time?

This is a very rudimentary question, but I have a document in which I need to replace many different words fairly frequently, so I created a function that goes like this: (defun chikan () (...
0
votes
0answers
42 views

How to use helm to search a buffer?

I would like to use the helm machinery to search "live" a buffer's lines. Is this possible? If not how would I go about figuring out how to implement this?
1
vote
1answer
34 views

Is there any way to search in the current narrowed subtree in org mode?

I can use C-x n s (org-narrow-to-subtree) to narrow the content to the current subtree, which is great. After doing that, I want to search a keyword in the current narrowed subtree(instead of the ...
1
vote
0answers
54 views

How to replace a block of text with a "query-like" approach all at once?

I want to search and replace a block of text with a "query-like" approach all at once. For example, if I have \emph{``Foo $\bar$ baz''} to be replaced by \emph{Foo $\bar$ baz} using a &...
1
vote
0answers
77 views

Remember previous text searches history with positions after further text search

TL;DR: Is it possible to go back and forth between different helm-ag searches, and keep the last visited position in each of them? Using Spacemacs’ spacemacs/helm-project-smart-do-search (SPC / ...
1
vote
1answer
72 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
48 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
2answers
195 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 ...
1
vote
1answer
39 views

tools for camelcase and other means of word separation

Often I am involved with transforming text with one system of word separation (e.g., camelcase) into another system (e.g., hyphen separation, space separation, underscore separation. For example, if I ...
0
votes
1answer
75 views

Search for file content with swiper-all or similar interface

I've been using swiper-all to search for content in buffers. This works really great as I easily can navigate between the files and select the ones I want to work with. Is there some way I can use a ...
1
vote
1answer
145 views

org-mode: specifying a hyperlink target as regex and jumping directly to match?

The documentation of a Fortran code, being done in org-mode, is intended to be done in such a way that changing the Fortran source code to be documented should be kept at a minimum. There is the ...
0
votes
1answer
76 views

How can I get swiper to remember the last search I ran?

Sometimes I do a search with swiper and navigate to a location in the code that seems like what I was searching for, only to find it wasn't. This is more common with a symbol name that is a little too ...
0
votes
1answer
19 views

Only edit visible lines in sparse tree view

Consider the following org-mode document * Foo ** bar1 :g1: ** bar2 :g2: ** bar3 :g1: ** bar4 ...
0
votes
0answers
72 views

Search file within neotree in an unexpanded directory

Is it possible to search a file in neotree which is deep inside some directory? The normal search only searches in the visible parts i.e., within directories that have been expanded. I am looking for ...
1
vote
1answer
30 views

icicles search and replace; need help to do a successfull replace

I try to use Icicles to search and replace. I understand to search with it (some details, that I need), but I'm unable to do a replace. The link below shows a recipe, that I try to follow, but it ...
0
votes
0answers
45 views

Restarting search in a quick way

In Firefox I can hit Ctrl-f to start a search and Ctrl-g to search the next occurence of the string searched. If I would like to search for a different term, I simply hit Ctrl-f again and type in the ...
0
votes
1answer
278 views

How to search with a regexp before point?

I would like to know a function that searches a pattern located before point. re-search-backward is mentioned in the Elisp manual but I do not understand its purpose. Indeed, I do not understand the ...
3
votes
1answer
181 views

How to search and replace in *open buffers*

I want to interactively search and replace in all (or, preferably, a regexp subset of) my buffers (not files). Scenario Being a pack-rat sort of guy, I never delete my buffers until I'm sure I don't ...
3
votes
1answer
51 views

How to access Query-replace history in replace format (for eg: "ABC → XYZ")

I have enabled query replace save history as below. When I am in query-replace mode, I see previous search-replace patterns of the current session in the form "ABC -> XYZ". But the search-replace ...
0
votes
2answers
62 views

rgrep doesn't search in specified directory

According to the documentation : (rgrep REGEXP &optional FILES DIR CONFIRM) Recursively grep for REGEXP in FILES in directory tree rooted at DIR. [...] But when I call it in some ...
1
vote
1answer
128 views

search-forward-regexp with back reference

I have the following text \begin{comment} TEXT \end{comment} \begin{verbatim} TEXT \end{verbatim} and the regular expression "\\begin{\([^}]*\)} to match the \begin statements and capture the ...
2
votes
0answers
60 views

Find and display duplicated regions of (org-mode) text across multiple files

What I'm trying to do I'm trying to condense a set of research notes consisting of over 250,000 words across 50+ files. I've converted these from previous file formats (mostly mind maps and OPML ...

1
2 3 4 5 6