Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crrs (rename symbol) does not replace all instances of the symbol #25

Open
daveyarwood opened this issue May 18, 2018 · 2 comments
Open

Comments

@daveyarwood
Copy link

I have a test file with a bunch of test cases like:

(testing "frequency -> the nearest MIDI note"
  (is (= (pitch/hz->midi 7.95) 0))
  (is (= (pitch/hz->midi 8.176) 0))
  (is (= (pitch/hz->midi 25.96) 20))
  (is (= (pitch/hz->midi 26) 20))
  (is (= (pitch/hz->midi 107.3) 45))
  (is (= (pitch/hz->midi 261) 60))
  (is (= (pitch/hz->midi 430) 69))
  (is (= (pitch/hz->midi 439) 69))
  (is (= (pitch/hz->midi 440) 69))
  (is (= (pitch/hz->midi 441) 69))
  (is (= (pitch/hz->midi 8372) 120)))

If I go into the example.pitch namespace (aliased in the test file above as pitch), move my cursor over the pitch/hz->midi function name in the defn form, and use crrs to rename it to foop, it renames the function in the example.pitch namespace, but only replaces the first instance of pitch/hz->midi in the test file with foop:

(testing "frequency -> the nearest MIDI note"
  (is (= (foop 7.95) 0))
  (is (= (pitch/hz->midi 8.176) 0))
  (is (= (pitch/hz->midi 25.96) 20))
  (is (= (pitch/hz->midi 26) 20))
  (is (= (pitch/hz->midi 107.3) 45))
  (is (= (pitch/hz->midi 261) 60))
  (is (= (pitch/hz->midi 430) 69))
  (is (= (pitch/hz->midi 439) 69))
  (is (= (pitch/hz->midi 440) 69))
  (is (= (pitch/hz->midi 441) 69))
  (is (= (pitch/hz->midi 8372) 120)))

Also note that it should have replaced it with pitch/foop.

@hukka
Copy link

hukka commented Jul 10, 2018

Not sure if it's related, but seems like renaming a function does not change spec/fdef calls for that function.

@SevereOverfl0w
Copy link
Member

SevereOverfl0w commented Jul 10, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants