clojure-emacs / clojure-emacs/clj-refactor.el
cljr-rename-symbol crashes for the first time on an unevaluated namespace (cljr-warn-on-eval 't)
- Dominant language
- Emacs Lisp
- Stars
- 785
- Forks
- 110
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
Cljr fails to rename symbol in code which is successfully compiled and run by`lein test`.
## Expected behavior
1. `cd /Users/YourName/Desktop`.
2. `git clone https://github.com/developer2019/example`
3. Open `/Users/YourName/Desktop/example/src/anagram.clj` in Emacs.
4. `M-x cider-mode`
5. ` `
6. Position cursor at `anagrams-for` (line 4, symbol 10) and press M-x `cljr-rename-symbol` RET.
It tells that project needs to be evaluated, type `y RET`.
7. Cljr should ask for a new symbol name and then rename this symbol in all project files.
## Actual behavior
1. `cd /Users/YourName/Desktop`.
2. `git clone https://github.com/developer2019/example`
3. Open `/Users/YourName/Desktop/example/src/anagram.clj in Emacs`.
4. `M-x cider-mode`
5. ` `
6. Position cursor at `anagrams-for` (line 4, symbol 10) and press M-x `cljr-rename-symbol` RET.
It tells that project needs to be evaluated, type `y RET`.
7. It fails with `Wrong type argument: char-or-string-p, nil`.
## Steps to reproduce the problem
1. `cd /Users/YourName/Desktop`.
2. `git clone https://github.com/developer2019/example`
3. Open `/Users/YourName/Desktop/example/src/anagram.clj in Emacs`.
4. `M-x cider-mode`
5. ` `
6. Position cursor at `anagrams-for` (line 4, symbol 10) and press M-x `cljr-rename-symbol` RET.
It tells that project needs to be evaluated, type `y RET`.
7. It fails with `Wrong type argument: char-or-string-p, nil`.
## Environment & Version information
`lein test` compiles this code and runs successfully.
### clj-refactor.el version information
clj-refactor 2.4.0-SNAPSHOT (package: 20171117.317), refactor-nrepl 2.4.0-SNAPSHOT from MELPA (i. e. latest clj-refactor).
### CIDER version information
```
;; CIDER 0.15.1 (London), nREPL 0.2.12
;; Clojure 1.8.0, Java 1.8.0_111
```
### Leiningen or Boot version
```
$ lein --version
Leiningen 2.8.1 on Java 1.8.0_111 Java HotSpot(TM) 64-Bit Server VM
```
`lein test` compiles this project and runs successfully.
### Emacs version
```
GNU Emacs 25.3.1
```
### Operating system
```
OS X 10.11 "El Capitan"
```
Contributor guide
Assessment
This issue has not been assessed yet.