This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-30
Channels
- # announcements (1)
- # beginners (94)
- # calva (12)
- # cider (5)
- # cljdoc (4)
- # cljs-dev (4)
- # clojure (170)
- # clojure-austin (2)
- # clojure-dev (45)
- # clojure-germany (53)
- # clojure-italy (20)
- # clojure-nl (6)
- # clojure-spec (25)
- # clojure-uk (242)
- # clojurescript (161)
- # cursive (16)
- # data-science (3)
- # datomic (20)
- # defnpodcast (6)
- # emacs (40)
- # events (1)
- # fulcro (80)
- # funcool (46)
- # jobs (1)
- # leiningen (23)
- # liberator (2)
- # lumo (43)
- # mount (3)
- # off-topic (21)
- # onyx (1)
- # pedestal (15)
- # re-frame (23)
- # reitit (4)
- # schema (1)
- # sfcljs (1)
- # shadow-cljs (167)
- # spacemacs (1)
- # tools-deps (21)
- # yada (2)
I was hoping to find some way in Emacs to do a multi-file search over most, but not all, files in a "project", e.g. all files in a particular directory and its subdirectories, but with customizations I can make to the set of files, based on name patterns, suffixes, directories, etc.
e.g. Never search files ending in .txt or .docx for project A, but in project B, some other variant of that custom to project B.
I found and tried projectile, but haven't figured out how to get it to do that yet (if it can).
you can use helm-ag with .ag-ignore info: https://github.com/syohex/emacs-helm-ag#helm-ag-use-agignoredefault-nil
also this. i haven't tried it yet but looks good: https://github.com/Wilfred/deadgrep
At least for now, I think the set of files I want to include/exclude will be relatively slowly changing, so I don't mind editing some kind of project-specific config file to change them.
I have since tried installing the_silver_searcher (easy on both macOS via MacPorts, and Ubuntu via apt) then Emacs helm-ag package. the_silver_searcher / ag command by default pays attention to .gitignore and a few other similar files for other version control software besides git, and also its own per-directory .ignore files and user-wide $HOME/.agignore That is customizable enough for me.
@andy.fingerhut are you using projectile (https://projectile.readthedocs.io/en/latest/)? If so, you can in each project edit your .projectile
to ignore specific files, or based off globs. And then projectile-grep
(or projectile-ag
)
Example of a .projectile
(which is put at the root folder of each of your projects):
-*.txt
-*.html
ah, I see now above you have tried projectile, but couldn't find the project config.
Thanks. Yeah, I saw some docs about creating a .projectile file, and I have added some lines to it like -*.txt but those files are still searched when I do projectile-grep
I think you might need -/*.txt
.projectile
is a poorly documented feature...I keep meaning to send a PR for that, but hasn't happened yet
Hi Emacs lovers, how do you live without Parinfer? I’ve been using VIm for several years right now. I’ve tried to switch to Spacemacs. So how do you format you brackets? Via SPC k
?
Yeah, I just got used to using the SPC k commands. Once you learn them, it works well. There were some things I missed from paredit but I forgot what after being with spacemacs for so long. Never used Parinfer.
the brackets are a bit annoying, I don't know of any commands to switch them from () to {} for instance, but I haven't really looked.
I usually jut put the opening bracket then slurp the code in - that works with {} brackets as well
if you are using cider you have clojure-mode
and you can use C-c C-r [
or {
or (
to change the delimiters
there are some really nice refactors in clojure mode that are pure textual. sexps for the win
on a new file it can create the ns form for you, change threading forms, lots of good stuff
It give documentation on the clojure refactor commands along with gif animations showing usage
This is kind of vague, but maybe someone has ideas: I've been noticing a lot of flicker in my emacs, mostly in the context of clojure buffers, which seems to be caused by eldoc-mode
(that is, it stops when I turn off eldoc-mode
). I feel like I've dealt with this before, but my memory is almost 50 and I'm terrible at making notes. Anyone recognize this symptom?
@pauld for my solution at extending SPC k w yo take an argument: https://gist.github.com/emidln/393eb7696516bc39de4a437d8067eb62#file-emidln-el-L11