Skip to main content

Questions tagged [search]

Questions about search mechanics inside of Emacs.

Filter by
Sorted by
Tagged with
0 votes
2 answers
54 views

Using a grep like function in lisp

I have a file, and I want to search if a given file has a string. I want to call that function from an elisp function. AFAIK, all the grep family of functions open a new buffer. I only need to know if ...
Peter Petigru's user avatar
0 votes
1 answer
37 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) &...
Saravana's user avatar
  • 2,081
0 votes
2 answers
49 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 ...
MostlyHarmless's user avatar
0 votes
1 answer
58 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 ...
ygy's user avatar
  • 103
0 votes
0 answers
51 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 ...
user2567544's user avatar
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. ...
Alexander Praehauser's user avatar
1 vote
0 answers
164 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 ...
Zelphir Kaltstahl's user avatar
1 vote
2 answers
82 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{...
Alessandro Bertulli's user avatar
0 votes
0 answers
362 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 ...
zeynel's user avatar
  • 371
1 vote
0 answers
50 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) "...
Dilna's user avatar
  • 1
2 votes
1 answer
746 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-...
aaa's user avatar
  • 486
1 vote
2 answers
67 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 ...
Zaz's user avatar
  • 133
1 vote
2 answers
111 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 ...
cuore RT's user avatar
0 votes
1 answer
70 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 ...
Daniel Krajnik's user avatar
1 vote
1 answer
92 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 ...
user2567544's user avatar
2 votes
1 answer
124 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 ...
Ben Sturmfels's user avatar
1 vote
1 answer
47 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 ...
Ray Woodcock's user avatar
1 vote
3 answers
142 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 ...
Ray Woodcock's user avatar
2 votes
1 answer
125 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 ...
Sati's user avatar
  • 815
1 vote
0 answers
65 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 ...
Sati's user avatar
  • 815
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-...
Adelita's user avatar
  • 255
1 vote
2 answers
405 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
  • 255
0 votes
0 answers
47 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 ...
xeruf's user avatar
  • 354
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 ...
Ruy's user avatar
  • 839
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 ...
Jason Hunter's user avatar
0 votes
1 answer
207 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
-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 ...
Dilna's user avatar
  • 1
1 vote
1 answer
37 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 ...
TMat's user avatar
  • 95
0 votes
0 answers
55 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 ...
Adelita's user avatar
  • 255
0 votes
0 answers
40 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 ...
Adelita's user avatar
  • 255
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")) (...
halloleo's user avatar
  • 1,355
0 votes
1 answer
349 views

Text search in directory with live preview

How can I text-search the current directory (or any directory) with a live preview? That would be something like ranger or peep-mode but for text-search results. I use counsel-rg mostly, but I have to ...
Don Quixote's user avatar
0 votes
1 answer
44 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 '...
jmckitrick's user avatar
1 vote
1 answer
60 views

Create a function to run a search with mini-buffer partially completed

I would like to write a function that starts a search (evil-search-forward specifically), with some arbitrary text already in the minibuffer. Following directions in this link I came up with the ...
randouser's user avatar
  • 141
0 votes
1 answer
164 views

org-mode: Search for properties does not work

I have a file "restaurants.org" containing: #+title: Restaurants #+author: xyz #+COLUMNS: %Where %Name * Ristorante Y :PROPERTIES: :Where: Canal Street 10 :Name: Ristorante Y I wanted to ...
Hababa's user avatar
  • 3
2 votes
0 answers
53 views

Find notes with accented characters when searching for the base character (like isearch with character folding)

Emacs isearch has a "character folding" functionality which can be toggled with M-s ' during isearch. When this is activated, the search can find something like "maçã" (apple in ...
darcamo's user avatar
  • 321
0 votes
1 answer
143 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 ...
brittAnderson's user avatar
0 votes
1 answer
52 views

limit-of-search to apply search-forward to just current paragraph

The search-forward function takes four arguments: (search-forward "target-string" limit-of-search what-to-do-if-search-fails repeat-count) ...
Emmanuel Goldstein's user avatar
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 (...
Emmanuel Goldstein's user avatar
-1 votes
1 answer
191 views

"non-existent agenda file ~/file.org. [R]emove from list or [A]bort?" when using file-expand-wildcards

As per this example below, I try to customize queries that require searching in different folders that are not agenda files. According to this part of the manual, it should be possible. However, ...
Emmanuel Goldstein's user avatar
1 vote
1 answer
144 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 ...
Steve Summit's user avatar
0 votes
1 answer
250 views

How to re-search-forward OR

How can I match the values for the keys (org mode attributes) #+label OR #+name? Example: Using get-labels () I got fig:foo. Nice. How can I get fig:bar as well? #+label: fig:foo #+name: fig:bar ...
jjk's user avatar
  • 746
1 vote
1 answer
259 views

How to implement google/other search engine search of visually selected text in evil mode (counsel-search of selected text)

How can I define a command that searches the web for the evil visually selected text using google or some other search engine? counsel-search already does this if you insert a string, but how can I ...
Rareform's user avatar
  • 231
0 votes
1 answer
81 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
1 answer
57 views

Retrieve/list all entries with active timestamps before today

Is there a way to list all agenda entries which have active timestamps state (no DEADLINE or SCHEDULED)? I ask because these get lost in the agenda unlike Deadlines and Scheduled tasks, which keep ...
Emmanuel Goldstein's user avatar
0 votes
1 answer
255 views

How to preserve helm project search results to iterate through them

I am using spacemacs with vim bindings and doing a search project-wide for something like while \( with SPC s p. I get the results in a helm buffer and can enter transient state to navigate them, but ...
mcp's user avatar
  • 556
2 votes
1 answer
92 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
1 vote
1 answer
56 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. ...
Romário's user avatar
  • 163
1 vote
1 answer
233 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 ...
buhtz's user avatar
  • 739
1 vote
1 answer
29 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-...
Daniil Iaitskov's user avatar

1
2 3 4 5
7