Comments (4)
Ha! That's nuts 🥜.
That's a few too many steps for me. What I think I'd like, and what I may try to do with the new list :files
argument is to have a way of quickly specifying some root search paths (maybe a file in my project's root directory, or maybe just some hardcoded set of search paths) and then to be able to quickly search all those, maybe with a sequence as short as M-x ag-something RET search-string RET
.
Definitely doing it in general involves either a lot of configuration or a lot of steps. I sometimes find myself going out to my terminal and just doing cd ...
, then ag --clojure search-string
. This is quite general and pretty fast, but two obvious downsides (1) the results aren't in an emacs buffer for going between them w/ next-error
and (2) no good way to do excludes if there are lots of siblings in the parent folder.
Regardless, I appreciate your efforts here and hope we all have fun searching for a long time to come.
from ag.el.
The PR #157 added a functionality similar to what you are looking for. With elisp you can do something like
(ag/search "x" "/home/vitor" :files '("test/a" "test/b"))
-*- mode: ag; default-directory: "~/" -*-
Ag started at Wed Jul 31 20:30:27
ag --literal --group --line-number --column --color --color-match 30\;43 --color-path 1\;32 --smart-case --stats -- x test/a test/b
File: test/a
1:1:x
File: test/b
1:1:x
2 matches
2 files contained matches
2 files searched
2 bytes searched
0.000325 seconds
Ag finished at Wed Jul 31 20:30:27
I hope this helps!
from ag.el.
Woah, that's neat! Thanks. I will play with this.
from ag.el.
Nice :) . There is also the unmerged pr #158, it tries to add a nice integration with dired. If/once it gets merged you can do something like this gif: https://gist.githubusercontent.com/vitorqb/291b7129effd0f85885fb30cfdcf6ebf/raw/1e18f2fb88c28a7258732319e7b2893f3d17c0a5/img.gif
from ag.el.
Related Issues (20)
- Feature request: `ag-project-files-regexp`
- ag-dired* does not copy a file if it contains space HOT 1
- ag-match-face can not propertize matched string HOT 1
- Feature request: ag-regexp-files HOT 1
- A little tip about how to change the `ag` arguments will be appreciated.
- Feature Request: ag + ag-files
- no filenames when process-connection-type is nil
- What is silversearcher-ag-el? HOT 1
- Incorrect cursor placement in minibuffer when prefixed
- Release 0.48 HOT 1
- Regression: master doesn't highlight results HOT 3
- (--nogroup) Prefix `File: ` breaks jumping to file
- Word wrapped lines too long
- incompatibility with xterm-color.el
- Also work with rg?
- Documentation bug
- When calling `ag` I get the errror "cond: Wrong type argument: listp, ag/run-finished-hook
- Issue with backslash-escaping regexp contet
- verilog-mode breaks ag-mode jump-to-occurrence. aka sharing compilation-mode-hook is perilous
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ag.el.