Questions tagged [search]

Questions about search mechanics inside of Emacs.

Filter by
Sorted by
Tagged with
0
votes
0answers
19 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 ...
0
votes
1answer
10 views

Expiring search highlights in Evil

I'm using the evil-search module ((evil-select-search-module 'evil-search-module 'evil-search)). When I perform a search, the results remain highlighted until I call evil-ex-nohighlight. I'd prefer ...
0
votes
1answer
41 views

How to set a variable that matches different type of strings?

I have these strings: First Type: arXiv:1234.56789 arXiv:1234.56789v1 Second type: hep-th/123456789 hep-th.AB/12345689 hep-th/123456789v1 hep-th.AB/12345689 Belong to the second type even strings ...
1
vote
2answers
66 views

How to match first character in line after asteriks and space using regex?

For example i have lines: * test1 ** another tests * some other line I would like to match t in first line, a in second, s in third.
1
vote
1answer
69 views

How to regexp-search for a word surrounded by spaces

I'm looking at this One use of regexp-quote is to combine an exact string match with context described as a regular expression. For example, this searches for the string that is the value of ...
2
votes
1answer
35 views

Query replace regexp with a distant match?

I have a single transcript file for a set of course lectures I am watching. After doing some formatting on the file. I have it broken up into sets of lessons where the main heading is the lesson title ...
2
votes
1answer
35 views

Make forward-list search for specific symbol only

Is there a way to make forward-list and backward-listsearch for specific symbols (such as 「」『』) only? I have code that make use of these functions to iterate through 「」『』 pairs in plain text. But ...
-1
votes
1answer
43 views

Counting number of matches in number of lines for regex search

I have functions that run re-search-forward and gather its output into a buffer. (defun my-search (pattern) "Uses `re-search-forward` to return matching lines." (let ((src) (rslt)) (...
0
votes
1answer
28 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: (...
2
votes
0answers
19 views

Helm Grep within a first results set / multi line search

I would like to use helm to search for two terms which may well be on different lines. Is there a way to grep for the first term then further grep within the resulting fileset the second term? eg ...
0
votes
0answers
66 views

How to search certain subdirectories of directories that are ignored by Git

I'm working in a Scala project that has target/ directories entered as ignored in the .gitignore. However, there is also Scala code being generated during the build which is being nested under a ...
0
votes
1answer
85 views

need help with very complex find and replace

I have a very complex (at least to my mind) text replacement task. ideally this would be a function or macro I could run over every org header in a buffer. I want to 1. move over any TODO state to a ...
0
votes
1answer
63 views

Can you generate a tags table for CMD scripting?

I am working on an elaborate script for Windows using CMD.EXE scripting. It walks a tree of files and folders and uses our specialized file transfer program to send the tree to a remote location. ...
1
vote
1answer
92 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?
0
votes
0answers
13 views

Rules for searching with punctuation and quotes in mu4e

I use mu4e for email and am having trouble with punctuation, which is not in the manual. I have a thread titled forum software?. A search for forum software returns that thread and one other message, ...
0
votes
0answers
41 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 ...
0
votes
1answer
76 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 ...
0
votes
1answer
24 views

How to include lines in a regular expression search which might not be present?

I'm using a regular expression search which is working as expected. This searches for unified diff file entries and works as expected. (re-search-forward (concat ;; Prefix '+++ '. "^" "...
0
votes
1answer
33 views

Org-mode: Using sparse tree to search through timestamps (non-scheduled, non-deadlines)

I am aware that I able to use sparse tree to search "[b]efore-date" with C-c/b or search "[a]fter-date" with C-c/a. However, I recognise that seems to only be with dates that are schedules or ...
1
vote
1answer
32 views

Workaround for “Invalid search bound (wrong side of point)” in CC Mode

Emacs 24.x and 25.x have a bug in CC Mode which can result in some operations failing with the error Invalid search bound (wrong side of point) For example, I can reproduce it with the following ...
0
votes
3answers
95 views

Complex searching and replacing [duplicate]

Suppose I have following pattern: throw "some message"; which I'd like to replace with: throw new Error("some message"); So, "some message" part should not be changed (or copied as is), and ...
2
votes
3answers
148 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 ...
1
vote
3answers
51 views

How to delete numerals of a certain size from text

I'm pretty new to emacs, so I'm still learning all the functions. I'm trying to remove certain metadata from each line of several large .txt files (Bible translations) and was wondering if if there ...
1
vote
1answer
37 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 ...
1
vote
2answers
129 views

Selecting next occurrence of word incrementally

I want to make changes inside a paragraph of a large text file. If I have the cursor at the word "foo", what key combination would get the cursor at the next occurrences of this word? The cursor ...
0
votes
0answers
41 views

Skim: search backward generates shell buffer in Emacs

I have configured forward and backward search between Emacs and Skim (MacOS) for my LaTeX work. While the search works fine, every time I do an backward search from Skim, an additional shell buffer ...
0
votes
1answer
79 views

mu4e or mu cannot find a search term with a period

I use mu4e and sometimes I cannot find a message with a search term including a period. For example, if I search for Google.org, I see: No matching messages found but if I search for "impact ...
1
vote
1answer
35 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 ...
1
vote
0answers
9 views

How do you fix a large list of unknown files in Ebrowse?

I'm trying to use the emacs Ebrowse tool. The issue I'm having is a great majority of the C++ files, from my BROWSE file, are showing up as (unknown) file type, resulting in me being unable to open ...
3
votes
2answers
81 views

Retracing steps with emacs (When programming /exploring)

Often when fixing a bug or implementing a new feature in a code repository, I start off with an investigatory step. For example, I would have a lead, a word such as "Article" and I would start by ...
0
votes
0answers
20 views

In a terminal (not in Emacs), how can I use emacs helm/swipe to choose old shell command from bash_history?

In a terminal, we can use C-r to search a command from bash_history, but it is far less powerful than the Emacs package like helm-swoop or ivy-swipe. How can I use a shortcut in terminal (e.g., C-r) ...
2
votes
1answer
91 views

mu4e query search for emails larger than certain size

I've looked in all the examples given in queries of mu4e email but couldn't find an option that returns all emails larger than a certain size (for example 10MB). I think this is relevant if one is ...
1
vote
1answer
60 views

Org mode regex search view

Upon reading Search View It state that You can incrementally adjust a boolean search with the following keys [ Add a positive search word ] Add a negative search word { Add a positive regular ...
3
votes
2answers
66 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 ...
2
votes
3answers
80 views

How can I search between the lines with multiline search?

I use C-u 4 M-x helm-swoop for interactive search also show several surrounding lines (this is analogous to grep -C 4). When I find the word I narrow my search interactively, for example, C-u 4 M-x ...
1
vote
1answer
22 views

Does grepping via helm support searching for multiple words in any order like other helm completions?

When searching multiple terms with Helm separated with spaces then Helm returns the results which mach the terms in any order. This is good. Sometimes I try grep via helm. E.g. I use helm-recentf to ...
0
votes
1answer
33 views

Tag search in org mode delivers empty list although searched Tag exists

I have an .org file and some headlines have the tag Contact attached to them yet searching for tags (C-c a m) and entering Contact delivers nothing (see attached screenshot). What do I do wrong? ...
2
votes
1answer
74 views

Search and replace two consecutive newlines

Running spacemacs 0.200. I am sorry if it is too basic. But I am just not able to get this. How do I convert two consecutive newlines with some text, say, 'there were two newlines here'? I could ...
0
votes
0answers
47 views

How to use ack options in Spacemacs?

From the command line, I searched using ack with the ignore-case option: ack -i bragg That worked. How to use ack options in Spacemacs? The -i option did not work with function spacemacs/search-ack:...
0
votes
1answer
66 views

Search in readable eww buffer [duplicate]

I would like to open url in eww in readable-mode and find str. Below is my code that doesn't work: (defun my-eww-searh-readable (str) "Once-off call to `my-eww-searh-readable' after EWW is done ...
1
vote
1answer
46 views

Search strings, do a list with first occurences and use elements of that list

I have a LaTeX source, call it main.tex. Suppose it contains one or more of the classical groups, like "GL", "SL", "SO", "U", "SU", "Sp", "USp" or the spin group "Spin". I want to write a script ...
0
votes
0answers
11 views

Search region instead of search inside region [duplicate]

When a region is active, emacs searches (Ctrl+Sor Ctrl+R) within that region. I would like to change that so that it searches in the whole buffer with the region as pattern. Any toughs ?
0
votes
2answers
121 views

Using Occur to to recursively search in a directory [duplicate]

I use 'occur' to search for regexp in current buffer and edit the results in occur buffer . Now my requirement is to search all the files in a directory(including sub-directories ) and edit the ...
1
vote
1answer
55 views

Search across tags / titles in org mode

I keep some files in RST and rst-mode has C-c C-t C-t runs the command rst-toc which open all section titles in separate buffer. I can search ignoring actual document content which tends to have ...
0
votes
0answers
17 views

Exiting visual-regexp search with a cursor motion command doesn't execute that command

I recently set up the visual-regexp-steroids package to try it out. The one major sticking point so far has been that when I terminate the search by typing a cursor motion command (typically M-< ...
5
votes
2answers
97 views

Incremental Search after opening file

Being fairly new to GNU Emacs and intend to use it as a replacement to vi/vim where possible, I came across an obstacle, I seem not be able to overcome. In vim (similar to less) you can provide a ...
0
votes
0answers
16 views

Changing the input method during evil search

When, in evil normal state, I have pressed / to perform a search and the echo area shows /, can I change the input method; if so, how?
0
votes
1answer
129 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. ...
1
vote
0answers
25 views

How find org entries that are missing a certain property?

I have this long sub-tree, I want to find the entries that I haven't set a certain property on yet. * Big list ** foo :PROPERTIES: :QUUX: 1 :END: ** bar :PROPERTIES: :END: ** baz ...
0
votes
0answers
67 views

Search in recent files

I use helm-recentf to receive the list of recent files. I would like to have an opportunity to search over the list of recently viewed files. Can I do it with grep or helm-swoop? Is there any other ...

1
2 3 4 5