Fork me on GitHub

Q: I’m using Specter heavily in my code. I get lots of warnings about not being able to resolve Specter path navigators, even though they are valid Clojure. They are required using something like

[com.rpl.specter :refer [select select-first transform setval
                         must pred compact submap collect-one index-nav walker]]


How are they defined? I suspect it’s because they’re defined via a macro rather than how they’re referred.


defnav is a macro


this is the result in a 2kloc integration test. is a bit difficult to see test failures


any workarounds?


cool. I didn’t connect the dots…that I can mark the macro used instead of the symbols created by the macro


trying now…


hmm. can’t figure it out. tried resolving ALL as com.rpl.specter/ALL but it won’t accept it


also tried resolving defnav as def. didn’t change either


Resolving defnav as def should definitely do it.


One sec, I’m down in the weeds on another problem right now, will take a look in a bit.


no probs. this is not urgent. just a nice to have


Anyone know how to remove these warnings? I wonder if it is because Specter is a cljc based lib?


little newbie help. I'm getting "Error running 'Unnamed:' Unknown error" when trying to run the repl. I don't know how to get more info or expand some pane that has the error in it. Freshly setup cursive and intellij on a mac. does anyone know what window to open to see more info?


seems a restart cleared it whatever it was


Is a way to print actual vs expected in more readable way? How do you deal with this? It works great with = but what about other fn to check conditions?


There isn’t at the moment but this is something I’m going to fix very soon.


👍 will be great


cursive it totally the best support for clojure coding so far just saying to make you happy 😉


I am happy 🙂

💯 1

it seems navigate back and wrap with [] both share the shortcut cmd [. Is there a good way to regain the navigate back which seems pretty paramount? What do others use for this seemingly important keybinding?


You can always rebind action keys at Preferences | Keymap - no-one else has mentioned it, I think opinions differ on which actions are essential 🙂

💯 1

fair point. thanks


actually… i filed a bug about this years ago:


Whoops, I stand corrected!


It’s a problem though - IntelliJ binds nearly all the keys to actions. For a long time Cursive didn’t bind anything by default and allowed users to set it up themselves, but then users complained about that (much more than they have complained about built-in actions being overridden).


were those complaints before cursive introduced parinfer? if that’s the case then i can totally get behind their complaints since back then paredit was the only option and it would make total sense for cursive to offer the default paredit key bindings out of the box. but with parinfer, especially with version 3, i would expect the paredit key bindings to be optional and can be switched on/off with one check box. it happened a few times to me, where i had to manually remove those key bindings one at a time for our new users because they kept getting surprises and didn’t really know what was happening as they just didn’t know such a thing as paredit and its key bindings.


Well, previously the way it worked was that Cursive didn’t bind any keys at all, and there was a preference pane which users could use to apply different sets of keybindings, i.e. bulk-enable keybindings. It was really confusing for users to understand. The problem with having those bindings be optional is that it involves modifying the keymap, which are immutable by default (if you want to modify some key bindings, you have to create your own keymap based off one of the immutable default ones). Getting users to understand how to configure that when they click a checkbox is tricky.


yes, i remember that. i was among those who were confused. truth be told, i still don’t understand how it worked to this day. 😁 yeah, i’m aware that intellij idea key maps are immutable but if a plugin can bind (dynamically) some keys after installation without changing the current key map then, i thought, they should be able to dynamically unbind those keys as well?


anyhow, this is just a minor inconvenience (some times.) an ideal experience, IMHO, would be: • having a separate checkbox for toggling structural editing/navigation • parinfer by default (with structural editing/navigation off and enabled) for new installation only • if user switches to paredit, turn structural editing/navigation on and leave it disabled • if user switches back to parinfer, turn structural editing/navigation off but leave it enabled for user to toggle it on, if she/he chooses to


Ok, thanks for the thoughtful feedback. I’ll take another look at this and see if I can make that work. I agree that parinfer should be on by default rather than paredit, I’ve been meaning to change that for a long time.