Skip to main content

Questions tagged [search]

Questions about search mechanics inside of Emacs.

Filter by
Sorted by
Tagged with
1 vote
1 answer
351 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 ...
1 vote
2 answers
481 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 ...
23 votes
6 answers
5k views

Getting number of occurrences, during incremental search (C-s / isearch-forward)

Inspired by modern browsers, I'd love to be able to see how many occurrences there are of some string, when I search for it – like the "10 of 37" at the top-right corner of the screenshot below. ...
1 vote
1 answer
229 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 ...
0 votes
1 answer
28 views

helm-projectile-find-file-in-known-projects, but with grep

Using helm-projectile-find-file-in-known-projects is great if you know the filename. It searches all known projects for a filename. , but what if you want to search for a string one of the files ...
0 votes
1 answer
35 views

Binary search in elisp, do away with the return variable

As part of my efforts to spruce up my elisp fundas, I am trying to implement the basic algorithms in elisp. I have done for binary search program as follows, (defun bnry-srch (vctr itm strt end) &...
0 votes
2 answers
38 views

Emacs org-mode: how to create link to a certain search agenda?

In 'Emacs org-mode' i can create links to headings and other things where I want to jump quickly. How can I create a link in 'Emacs org-mode' which opens a certain search agenda? At the moment I have ...
0 votes
1 answer
68 views

Full-text search in notmuch (like multi-occur)?

Has anyone tried to search through emails' contents in notmuch in a "multi-occur like fashion", that is in a buffer that lists occurrences of a searched keyword and let's you visit their ...
4 votes
1 answer
424 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 ...
6 votes
4 answers
2k views

Ringing Bell in Macro with Search

It throws the error After 0 kbd macro iterations: isearch-search: Keyboard macro terminated by a command ringing the bell and I have no idea why, nor can I find anything about it by searching. Any ...
0 votes
1 answer
234 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
2 answers
95 views

Elisp function to search for end of sentence (full stop + space)

I am devising a part of a function that searches for the next full stop (dot) and space as representing the end of a written sentence and inserts a new line. So far I have come up with this: (while (...
0 votes
1 answer
54 views

How to search regex in a url-retrieve buffer?

I'm trying to implement a login system with emacs lisp, the login system has a hidden input field that's initially empty and is filled by a piece of javascript code when submitting. I'm currently ...
0 votes
0 answers
48 views

Fully case insensitive org property search

I would like to be able to perform fully case insensitive searches of properties and their values in my org files, and have the results presented in a sparse tree. For example, if I have sections ...
0 votes
0 answers
44 views

Regexp searches that repeatedly cover expressions

I'm just going through an old Latex-text I've written and wanted to use regexp-replace to make any pair of brackets containing at least one other pair of brackets into a \left(.*\right)-expression. ...
1 vote
0 answers
159 views

Programmatically use org-tags-view to search in current subtree

I am looking for a way to programmatically search for headings in the current subtree. More specifically, I have a vocabulary file, in which I store words I need to learn. Each word is a subtree in ...
1 vote
2 answers
75 views

How can I make occur display only first line of match?

The context for this is that I was trying to write a function to help me write LaTeX, specifically I'd like to list all the future references, i.e. when you use a \ref{<something>} before \label{...
0 votes
0 answers
339 views

error in process sentinel: Wrong type argument: integer-or-marker-p, nil

I get this error when I search dired with M-x find-name-dired: error in process sentinel: Wrong type argument: integer-or-marker-p, nil The search finds the files then ends with this error. I'm not ...
3 votes
2 answers
852 views

How to search for headings all the way to the root heading (and preferably file name)

I am new to emacs, and org-mode pulled me away from vim. I am getting a hang of it. One thing I am missing a lot is a hierarchical search in emacs. I wrote a python script for that in vim, and I am ...
55 votes
9 answers
13k views

How do I find text across many open buffers?

Lets say I have 10 buffers open, and I want to find all occurrences of blah in all 10 buffers. How would I do this?
1 vote
0 answers
47 views

How can I search for CamelCase words in a buffer using Elisp?

How can I find CamelCase words in the buffer using Elisp? Have started with the following but the pattern does not cover all situations of CamelCase. (defun detect-camel-case-words (string) "...
1 vote
1 answer
85 views

How can I search / replace in visible org mode lines only?

I have an org file where the majority of the text in the buffer at any one time is folded. I would like to be able to perform a search and replace on only the unfolded lines. For example, I have a ...
1 vote
2 answers
816 views

Is there regex match at point?

I want to match a certain string (not even a regex!) at point. re-search-forward skips characters after the point. With char-after it is possible to build a framework for matching a string at point. ...
2 votes
1 answer
704 views

What am I supposed to do about the error “Invalid search bound (wrong side of point)” in my code calling re-search-forward?

I have several interactive functions that pretty straightforwardly do re-search-forward and replace-match in a loop. Once in a while, if I have a region selected and do the replacement in it, re-...
1 vote
2 answers
110 views

Elisp programming: Jump to heading with a specific `Custom_ID` property value

Within the same org buffer, how to jump to heading with a specific Custom_ID property value? Edit: I need an Elisp function that takes a string argument and jumps to the heading with a Custom_Id ...
1 vote
2 answers
65 views

How can I discover new commands using M-x (or similar command) semantically?

Currently, I'm in Doom and I'm pressing M-x which does a nice fuzzy search for commands. The problem with this is it has no synonym detection. So if I'm trying to collapse something and type M-x ...
2 votes
1 answer
117 views

Org-roam case-insensitive search

Org-roam's org-roam-node-find and org-roam-node-insert functions both match node titles case-sensitively. To find a node called "JavaScript" I can't just type lowercase j TAB, I have to type ...
5 votes
3 answers
4k views

Find and replace a text among the files of a project

How can I do a "find and replace a string" in the files of a project? Is there a standard, built-in way?
0 votes
1 answer
205 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-...
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 ...
0 votes
1 answer
43 views

How can I use 'transients' in 'magit' to enable case-insensitive search? [closed]

I got it working a year ago, then my machine died. I've been unable to figure out the interface to transient. When I view the levels (green and red, with numbers in them), I hit '-i' but see an error '...
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?
1 vote
3 answers
140 views

Using Emacs to find and copy relevant database records

I have reduced a large text file to a 1.9GB size that Microsoft Access can handle, but only as a linked file. To permit full Access operations - to import the relevant data into Access - I need to ...
1 vote
1 answer
46 views

Search and replace to merge or eliminate text lines

A WinRAR command (rar vt -pmypassword -v myarc.part01.rar >source.txt) produces detailed information on files contained in .rar files or segments (e.g., filename.part01.rar). Here's an example for ...
2 votes
1 answer
123 views

Search whole ebook in nov

nov.el does not provide an easy function to search the whole of the ebook content. Every search performed on buffer only applies to the "document" or chapter of the book on display at that ...
1 vote
0 answers
64 views

Disable search-as-you-type in Doom Emacs

Is there a way to disable "search as you type" functionality in Doom Emacs? Either with the Vim equivalent of / or through I-search C-s. With large documents, that functionality causes Emacs ...
1 vote
2 answers
381 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?
1 vote
0 answers
33 views

helm-do-ag not working as expected to search with command-option

I want a function to search in filenames and retrieve those filenames containing the string I search for. For some reason, this piece of code is not working for this purpose: (defun helm-do-ag-...
0 votes
0 answers
46 views

Info mode isearch across nodes

https://www.gnu.org/software/emacs/manual/html_node/info/Search-Text.html Instead of using s in Emacs Info and in the stand-alone Info, you can use an incremental search started with C-s or C-r. It ...
0 votes
1 answer
37 views

Weird behavior of `search-forward-regexp` influenced by buffer mode change

Action 1: evaluate the lisp expression: (search-forward-regexp "\\s'") in a buffer in lisp-interaction-mode containing the text: The pandemic market was cooling, but homes in north Seattle ...
0 votes
1 answer
189 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 "...
-2 votes
6 answers
147 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 ...
0 votes
1 answer
51 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 ...
3 votes
2 answers
3k views

Search/replace and replace within a block of selected text of buffer in spacemacs

As stated in the title, I want to search and edit (including replace) certain strings in a selected part of a buffer, not the entire buffer!!!, how can I do it? Are there any built-in keystrokes?
1 vote
1 answer
252 views

Issues With org-ql and Searching Based On Property Inheritence

I would like to be able to search for all TODO's with a property of FEATURE_NUM, and that property is inherited in my TODO's. Here's what I have in my init.el to make that property inheritable: (...
1 vote
1 answer
33 views

Setting Helm custom source from the result of a search

I want to be able to use the results of a regexp search as an helm source. The goal here is to find all the labels of a latex document, this in part because I find this useful but also to learn Helm ...
0 votes
0 answers
54 views

helm-grep-do-git-grep: possible to show results in minibuffer?

When I use helm-grep-do-git-grep results are shown in the current window or a different one, but it takes the whole window. It there an option to show results in the minibuffer, below the current ...
0 votes
1 answer
137 views

Imap search in gnus incorrectly returing empty group

I currently have three email accounts I use and access with gnus. After a recent upgrade to emacs 28.1 I lost the ability to search the mail for one of these addresses. They are all initiated ...
0 votes
0 answers
39 views

counsel-git-grep: why does it ignore .gitignore paths?

Currently there is an issue (or else I can't figure it out) with counsel-git-grep-function: why does this function not ignore the files in .gitignore when searching? It would be a useful function if ...
2 votes
1 answer
36 views

How can I ignore non-existing files in a fixed custom tags-search?

I want to search through a fixed set of files and I use the tags-search command for it: (defvar my-files-form '(list "/path/to/one/file" "/path/to/another/file")) (...

1
2 3 4 5
7