This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-21
Channels
- # admin-announcements (2)
- # aws-lambda (2)
- # beginners (26)
- # boot (179)
- # cider (36)
- # cljs-dev (118)
- # cljsrn (23)
- # clojure (150)
- # clojure-android (1)
- # clojure-austin (7)
- # clojure-austria (3)
- # clojure-canada (1)
- # clojure-dev (7)
- # clojure-dusseldorf (4)
- # clojure-germany (3)
- # clojure-greece (34)
- # clojure-nl (4)
- # clojure-quebec (9)
- # clojure-russia (30)
- # clojure-spec (38)
- # clojure-uk (3)
- # clojurescript (46)
- # clr (1)
- # core-async (2)
- # css (2)
- # cursive (17)
- # datomic (12)
- # devcards (8)
- # dirac (1)
- # docker (2)
- # hoplon (216)
- # jobs (2)
- # kekkonen (1)
- # lein-figwheel (18)
- # leiningen (2)
- # luminus (1)
- # mount (4)
- # off-topic (2)
- # om (15)
- # onyx (1)
- # parinfer (1)
- # pedestal (2)
- # planck (26)
- # reagent (98)
- # spacemacs (6)
- # specter (19)
- # spirituality-ethics (54)
- # untangled (22)
- # vim (24)
- # yada (4)
one small extra bit of info on this - C-g restores the Emacs UI. so it's not hanging, it's just that command that's stuck
I'm using Spacemacs and for some reason cider-jump-to-resource is void. I have the Clojure layer active, and some Cider commands work. Does anyone have an idea why this particular command does not work? I've connected to a working ClojureScript repl. I've also tried including an nrepl in ~/.lein/profiles.clj
Symbol's function definition is void: cider-jump-to-resource
Well, actually, the functionality I was looking for turned out to be jump-to-var
, which works fine. I still wonder why the other definition is void, though.
@benedek, i haven't gotten to writing up a github issue, but i do have one more thing to report. when prompted for a filename to save, if i save it in .clj in the classpath, it saves the cleaned file to the name i nominate. so the bug is that it's not saving to the path it read from, and instead is prompting me for a filename for each file.
@benedek this bit, here, is what's causing it to ask me for a filename https://github.com/clojure-emacs/clj-refactor.el/blob/0f75216908c54948e5ad01564c3284d61488ce8c/clj-refactor.el#L274-L278 . perhaps something to do with how my emacs is setup as it relates to with-temp-file and/or insert-file-contents?
hmm. i think it may be because we're gitignoring emacs' temp files
nope. that's not it
@benedek: i think i may have the bug .. https://github.com/clojure-emacs/clj-refactor.el/blob/0f75216908c54948e5ad01564c3284d61488ce8c/clj-refactor.el#L1030-L1032 arg is 'filename' but the body of this fn checks (buffer-file-name)
. this fn is only used by project-clean
so, i know nothing about elisp, but i think i may have found the issue
i put this right after dolist here https://github.com/clojure-emacs/clj-refactor.el/blob/0f75216908c54948e5ad01564c3284d61488ce8c/clj-refactor.el#L1976:
(cljr--post-command-message " filename: %s clojure-filename: %s excluded: %s "
filename
(cljr--clojure-filename-p filename)
(cljr--excluded-from-project-clean-p filename))
and, nothing actually happens to my files, but, i get output like this:
Cleaning your project might change many of your clj files. Do you want to proceed? (y or n) y
Project clean done.
filename: /Users/robert/Cognician/Server//src/shoreleave/middleware/rpc.clj is being cleaned!
filename: /Users/robert/Cognician/Server//src/shoreleave/middleware/rpc.clj clojure-filename: t excluded: nil
filename: /Users/robert/Cognician/Server//src/cognician/yeller.clj is being cleaned!
filename: /Users/robert/Cognician/Server//src/cognician/yeller.clj clojure-filename: t excluded: nil
perhaps the double /
is affecting with-temp-file
?
i see that cljr--project-files
is also only used by this code
of course, clojure-filename is always t
because i do this while the active buffer has a clj file in it
i put this inside the when
:
(cljr--post-command-message " filename: %s is being cleaned!"
filename)
that pretty much exhausts my knowledge, though. i hope this is helpful?
indeed it is. have you tried to fix the bug above and rerun? eg, just fix the buggy cljr--clojure-filename-p
then C-x C-e
at the end of the function and rerun project clean
i've fixed that, and it's returning t
, but i'm still being prompted to enter a new filename to save the file to
i print out ,fn
here https://github.com/clojure-emacs/clj-refactor.el/blob/0f75216908c54948e5ad01564c3284d61488ce8c/clj-refactor.el#L274 and it's also the same path
how might i replace //
with /
in filename
, @benedek ?
i want to try doing that as a last-ditch thing before accepting defeat 🙂
i found s-replace, trying that
nope. that didn't help
oh well
my namespaces shall remain dirty for now 🙂
-grin- https://github.com/clojure-emacs/clj-refactor.el/blob/master/CONTRIBUTING.md 404s, btw
the obvious fix as a PR: https://github.com/clojure-emacs/clj-refactor.el/pull/338