Questions tagged [search]

Questions about search mechanics inside of Emacs.

Filter by
Sorted by
Tagged with
0
votes
0answers
17 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
18 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
70 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
16 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
74 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
28 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
60 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
68 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
17 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
17 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? ...
1
vote
1answer
50 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
29 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
54 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
45 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
54 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
42 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
15 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
73 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
13 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
51 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
23 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
66 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 ...
0
votes
1answer
42 views

Search and replace isn't working in my function

I created the following function to remove macrons from vowels (this is a reduced version that only searches for the vowel "ā"): (defun nv/eliminatemacron () "" (interactive) (save-excursion ...
1
vote
1answer
117 views

search and replace double space

I've only recently started using emacs, for professional reasons. I'm trying to replace all double spaces in a text file by single ones using regex. In C-M-s the expression \s-\{2\} matches two spaces ...
1
vote
3answers
66 views

How can I search a list of files for content that matches a regexp?

I am trying to write an interactive command that will search a set of files for a regexp. The files are selected programmatically, for example, as a list of files that match some date criteria, or ...
3
votes
2answers
84 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 .....
0
votes
1answer
40 views

Opening an Emacs file to a specific word in the file

In Vim it is trivial to open a file from the command line to a specific word in the document. For e.g. to open the file "Contacts.txt" to "Bob" one would type: vim Contacts.txt +/Bob In Emacs it ...
0
votes
1answer
40 views

Search for occurrence of character within a string without using the common lisp library?

I need to extract certain information from buffer names, and I'm doing so by extracting substrings based on the position of unique characters within a buffer name string. So, I currently am doing ...
7
votes
2answers
252 views

How to search for a sequence of bytes in hexl-mode?

Is it possible to search for a byte sequence in hexl-mode and possibly highlight it? E.g. in the file below I want to search the byte sequence f9beb4d9. isearch does not work because it searches the ...
2
votes
1answer
38 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 ?
6
votes
1answer
77 views

edit search string and begin search from current location

I use C-s to start an incremental search. Sometimes I want to change the search string and either restart the search entirely from the beginning of the document or (other times) just change the search ...
0
votes
2answers
30 views

Searching for lines matching a criterion: where am i going wrong?

I am trying to record all the lines with the word bad in a Emacs-buffer with a simple elisp function (defun bad-line-numbers () (beginning-of-buffer) (setq sec-lines ()) (while (re-search-...
0
votes
0answers
18 views

Apply evil-mode Macro to helm-ag Results

I love using helm-ag-edit within projectile to make bulk edits to many files in my project in one fell swoop. However, sometimes I want to apply keyboard macros (using evil-mode) to these files. The ...
0
votes
0answers
20 views

Case sensitive regular expression search [duplicate]

I want to use the re-search-forward function in my Elisp code for searching text. However, it seems to ignore letter case! For instance, when I put the following in my *scratch* buffer: (re-search-...
2
votes
2answers
96 views

re-search-forward unexpected behavior: case insensitive

According to the documentation of this function, it should be case sensitive. But when I test it out, the result is case insensitive. My emacs version is 25.3.2.
1
vote
0answers
56 views

How to delete a long region by setting a mark and then searching for the location of the end of the region?

I have a long document. I placed two unique identifiers, in the form of short strings of printable English letter, in two positions in the document. The identifiers are far apart. My task is to delete ...
0
votes
3answers
52 views

Change Case of last searched pattern

Is there a fast way of changing the case of the last searched pattern? Inside Evil mode, I press # key to quickly search for keywords at point. And I want to change the case of all occurences of ...
3
votes
1answer
493 views

Trying to make control-f search exactly like control-s does!

I am trying to configure Emacs to not only use CUA, but also for control-f to search exactly like control-s does in the standard configuration. What I have achieved is that I can key in control-f and ...
4
votes
2answers
108 views

Does “Occur-at-point” already exist?

I wrote an elisp function for myself at the weekend: (defun rr-occur () ...
0
votes
1answer
109 views

In elisp, search and replace only on lines containing a specific string

Running spacemacs 0.200.13 on emacs 25.2.2 on Kubuntu 18.04. I need to search and replace only on lines containing a specific string. Interactively, I use occur, move to the occur buffer, and do all ...
0
votes
1answer
69 views

Unicode character folding with Swiper/Ivy

Suppose I have bár written in a file, I would like to look for bar in swiper and find the occurrences of bár alongside the expected occurrences of bar, how I can do this? This would also apply to ...
0
votes
1answer
24 views

Replace a match only till some other match is found

Aiming to convert first row of a html table from to tags. So, I wrote the following code. (defun tdtoth () (if (search-forward "</tr>" nil t) (while (search-forward "td" nil t) ...
1
vote
1answer
113 views

Search forward for the FIRST space character and stop there

I recently upgraded from Windows Emacs 19.x to Windows 26.3.1 and have a problem. in the old version 19 if I did a search forward for a space, (C-s) it skipped forward to the FIRST space character ...
1
vote
1answer
146 views

Case-sensitive search and replace in elisp in spacemacs

Running Spacemacs v.0.200.13 on emacs 25.2.2 on Kubuntu 18.04. Consider the following code: (defun xx-ll () (interactive) (save-excursion (goto-char (point-min)) (xx-replace-...
0
votes
1answer
40 views

How to bypass lines matching some regexp, when searching forward

I've written the following function to go from an error line to the next one: (defconst mylog-mode-error-regexp "\\(\\[ERROR\\]\\|rule did fail\\)" "Regexp to recognize errors in my log file.") (...
2
votes
1answer
45 views

How to use helm-occur to search the whole word?

For example, I got the following lines: 1. abc 2. abc def 3. abc_def 4. _abc 5. abc_ and I want to search only the word abc, so only the 1 and 2 lines matches, I googled a while, it says \babc\b ...
-1
votes
1answer
136 views

How to find all characters, newlines included?

I have this LaTeX code: %%% 10 \bibitem{bib2} W.~Kockelmann, G.~Burca, J.F.~Kelleher, S.~Kabra, S.-Y.~Zhang, N.J.~Rhodes et~al., \emph{Status of the neutron imaging and diffraction instrument IMAT},...
2
votes
3answers
109 views

Is it possible to limit the scope of function apropos-value?

I've recently started using function apropos-value and have found its output burdensome-ly long, mainly due to a limited number of huge variables that I knew in advance would contain the value I was ...