Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Questions about search mechanics inside of Emacs.
9
votes
Accepted
Gracefully Exiting a While Loop
re-search-forward has an option for not causing an error:
(re-search-forward REGEXP &optional BOUND NOERROR COUNT)
You should call (re-search-forward "..." nil t) and your while will receive a nil value … Edit:
As Jordon notes in the comments, there is a more general way of ignoring errors, which is the ignore-errors macro:
(while (ignore-errors (re-search-forward "...")) body ) …
4
votes
Accepted
How to search for files from a root directory and get the results as a dired buffer?
This command will ask for the directory to search within, and for find-style options.
For example, to find files whose name include "salsa", use -iname "*salsa*" as an option. …
4
votes
how remove all but the first n chars
You can do a replace-regexp like this:
replace ^\(.\{15\}\).*$
with \1
This will match lines with at least 15 characters, and replace with the 1st 15 (which are saved as a match group).
Did you m …