This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-05
Channels
- # admin-announcements (1)
- # architecture (29)
- # beginners (244)
- # boot (5)
- # cider (2)
- # clara (8)
- # cljs-dev (58)
- # clojure (93)
- # clojure-australia (1)
- # clojure-dusseldorf (4)
- # clojure-france (1)
- # clojure-greece (16)
- # clojure-italy (9)
- # clojure-norway (1)
- # clojure-romania (1)
- # clojure-serbia (3)
- # clojure-spec (68)
- # clojure-uk (103)
- # clojurescript (41)
- # code-reviews (4)
- # community-development (4)
- # cursive (11)
- # data-science (2)
- # datascript (6)
- # defnpodcast (4)
- # docs (21)
- # duct (4)
- # emacs (118)
- # fulcro (120)
- # graphql (1)
- # jobs (1)
- # jobs-discuss (43)
- # leiningen (12)
- # off-topic (39)
- # onyx (11)
- # parinfer (13)
- # perun (1)
- # re-frame (2)
- # shadow-cljs (4)
- # spacemacs (5)
- # unrepl (6)
- # yada (1)
new to helm, chose the helm-ag
variant
I think I understood the basics, but I can't properly do the "replace" part of my "search and replace" intent
I can choose a directory to search in (OK) search for a pattern (OK), choose candidates / all of them (OK), and then choose 1 of the 4 offered actions
the problem is that none of the 4 offered actions means "apply a replacement string". These are the actions offered by helm-do-*
:
* Open file
* Open file other window
* Save results in buffer
* Edit search results
"Edit search results" works, but it seems more than I want. I don't want to do arbitary edits on the matching lines. I want to type <replacement string>
and have it applied to each occurrence in those lines.
my guess is that there is an action other than Edit search results
which does precisely that?
I think the functino you want is 'projectile-replace', it's part of the projectile librtary, which means you have to attach it to a particular project/directory
the way it works is you type the search string, the replace string, then it interactivle asks you: repalce this instane? replace all in this file? ...
in evil/emacs, how to I say: take the current line shift the view/buffer/window so that the current line is at the to pof the screen/window
Same as in vim: zt
. Also zb
for the bottom of the screen and zz
for the center.
From what I researched, this one of those functionalities that Emacs / libraries will never provide out-of-the-box
@qqq well the function would be (recenter-top-bottom 0)
… I don’t use evil-mode, so I don’t know if there’s already a binding for that.
Obviously I’m quite attached to Projectile, because I wrote it, but I’ve never liked the huge scope of Helm. I was pushing hard back in the back to split this to some core framework, so people could actually have small add-ons to it.
If you want something really simple I’d recommend counsel
- https://github.com/abo-abo/swiper#counsel It has some basic integration with git
and ag
.
I myself use a combination of Projectile, ivy-mode
and counsel
depending on what I’m doing.
@bozhidar: you also work at toptal right? is it possible to create a cider-toptal plugin where: 1. when I run into a bug, I can do M-x pay-toptal-$50 2. a toptal expert joins via screen sharing and starts helping me debug my code I'm only half joking, something like this would be a huge productivity gain; it's like aws / uber for clojure expertise
https://github.com/bbatsov <-- lists you as VP of Engr at Toptal
@bozhidar: I've been trying to push this idea of "paid stackoverflow" (having played with both upwork and codementor), perhaps toptal can implement this
often times, I run into an engr problem that I make no progress on for 2+ hours, and I just now -- that if only I knew the libs / domain, I could resolve it in 5 mins
in those cases, I'd love to somehow just find that person in the world, who has the expertise and is free at the moment, give them $50, and have them solve the problem for me
Haha, I forgot about this. Yeah, I’m the VP of Engineering at Toptal. The company’s huge growth played a big part in me having less time for OSS. That’s a cool idea, I’ll run it by our product team.
I don't know about clojurians-slack policy concerning commercial gigs, but if there were experts here I could dm with #clojure / #emacs / #cider questions at $50 each (help more difficult than what I would expect a random stranger to do for free), it'd be interesting to see how it works out
I remember this from a while back, there are plenty of platforms now but the most promising one is https://openbounty.status.im/app IMHO.
wonder if the cider team could support that in a way that a cut from the fee would go into a cider pot and could be used to fund cider work (solving cider issues, new features etc)
https://www.bountysource.com/ had a similar idea
While nobody does OSS for money, making some money from working on some ticket certainly increases your motivation.
I'm seeing strange behavior from cider-pprint-eval-last-sexp-to-comment
in particular, there is no change on the screen immediately after running it. if I move the cursor, the output appears. But when using linum mode, the line numbers haven't changed yet (in the case where the output is multi-line); moving the cursor a second time updates the line numbers
when I add indirection via my own defun
for the purpose of binding C-x C-e
to something that pretty prints to the repl or buffer, the first problem goes away, but the second doesn't
should I just make a github issue? can anybody recommend a workaround for the linum-mode problem? (I couldn't find any linum-related functions available at all, so wasn't sure what to try)
Sounds like some problem I’ve seen reported somewhere else recently. Might be good to file a ticket with some repro steps.
@gfredericks I saw something like this during development, and put some notes in the pull request. The underlying problem I saw was the mechanism in emacs that suggests abbreviations for long function names (messages like “you can also invoke that function with M-x s-r-g”). Those abbreviations are computed on the fly, and there’s a caveat in the core about the possible delay.
Anyway, the thing is, the abbreviations thing doesn’t happen if you’ve already bound a key to that function. In that case you’ve seen the message reminding you of the key binding.
Okay, so that explains why the first effect went away when I set a keybinding
Have you tried just waiting it out? I can’t recall, but I think there is a timer in there to make sure these abbreviations aren’t clobbering other output to the minibuffer.
Which effect are you referring to?
The second( Not suggesting you want to work that way, just curious if the line numbers and so on would eventually update by themselves.)
I'll check
How long should I wait?
(it's been at least a minute)
I’d say that’s Long enough...
I'm doing this on an unconfigured emacs 26.0.50.2, btw, so hopefully that means it's reproducible
fwiw, I can reproduce the linum-mode
interaction in Emacs 25.3.1 also.
i think eli has made a native line numbers implementation in c in emacs. it's annoying when people suggest changing your workflow but i think its supposed to solve some issues and might be worth looking at
not sure. i was browsing the list and saw eli had added it and was asking for feedback. looks new in 26
oh it is? i forget where things are. i build from git and mine says 27 so i figured 26 was out
reddit comments about it submitted by eli with a link to the mailing list if you prefer
I was also building Emacs from bzr and then git for a long time, but stopped at some point as often I’d encounter bad builds and just waste some time.
i'm loving it because i got the new xref
find-defintiions` early which was amazing in 25
> Helm is orders of magnitude bigger than Projectile. 😄 (edited)
but helm-ag
seemed (subjectively) a bit more focused in goals than projectile. I already had some project-management code, didn't want conceptual overlap
helm looked scary from the beginning, but used as the implementation detail of X (helm-ag in this case) it gets more acceptable
anyway, just sharing my reasoning. Projectile seems pretty awesome, I hear it's used by many!
Hello emacs gurus I have a question
I see in cider-complete
https://github.com/clojure-emacs/cider/blob/3e9ed12e8cfbad04d7618e649322765dc9bff5d6/cider-interaction.el#L636
which creates a list
with keywords after the first (main) completion function
but then I see this in the company-capt
backend: https://github.com/company-mode/company-mode/blob/a4e14ed869a99ca8772f32b884b79ea573bccbb8/company-capf.el#L151
which takes the 4th element and gets a property from it
oh cool, my experience is limited and I am happy that I am not the only one finding it weird
its pulling that from the mutated company--capf-data
and i don't understand all of the times it gets set
I did:
(defvar u (list 3 4 (lambda ()) :annotation-function (lambda (t ))))
(plist-get (nthcdr 4 u) :annotation-function)
but it never worksso cider passes a list, I wanted to basically understand how to build that list
if there was another way then just concatenating
but I see the only option here seems (concat (list (beg) (end)) (some-of-my-functions-returning-the-rest-as-list)
@dpsutton should this work in your opinion?
(nconc (list (car bounds) (cdr bounds)
(if (fboundp 'completion-table-with-cache)
(completion-table-with-cache #'inf-clojure--completions)
(completion-table-dynamic #'inf-clojure--completions)))
(when inf-clojure-completions-annotation-fn
(list :annotation-function #'inf-clojure-completions-annotation-fn)))
I am going to try but I think this is the idea I had in mind
go for it. i was looking through that exact code for a bug in planck completion interaction. it wasn't fun and i couldn't figure out why the completion function was fired so many times. it gets ... weird. but i don't remember the details righ tnow
yeah inf-clojure
tries its best ... 😄 some quirks are inevitable though..
but running completitoin on cljs.core/ would find completitions and then try again. and i think it had to do with the smart completion like breaking up words. like a.i
should find assoc-in or something similar. but that would then run a completion for cljs.c and find cljs.core. i gave up on it 🙂
I am trying to include compliment
for clojure
types...potentially this opens put for custom completers...at this point an elisp completion common lib for clojure might a good thing
what would be the ideal way for users of this tool to get the same effect from inside emacs? https://github.com/gfredericks/how-to-ns I can arbitrarily rearchitect it to support this, but I don't like the idea of having a separate implementation in elisp
@gfredericks personally I use a how-to-ns fork within a file watcher. this file watcher applies how-to-ns and a couple other lein formatters on any individual file change. this is decomplected from lein; which is why I had to fork
I'd be happy to untangle it from lein
(emacs integration can be cool, but in the end you're just shaving 1-2 seconds over file-watcher approach)
does emacs automatically revert your buffer when a file changes?
so you train yourself to not touch the file for a few seconds after an ns change?
oh, so it only reverts if there aren't local changes
I need to figure out how to set this up
newlinetoo == that other thing I made?
is cljfmt also too wrapped up in lein, or was that for another reason?