Fork me on GitHub

what's the best way to remove an entry from a map?


like if i start with

{:foo "data"
 :bar "more"}


and i want to remove :foo so it looks like this instead

{:bar "more"}


what's the best way to remove the first pair and bring the line up like that?


(dissoc m :foo)


@benny There are probably better ways of doing it, but I do it with C-M-k C-M-k s-SPC, where I have a custom binding of s-SPC to 'kill-whitespace, and Super ("s-") is attached to the "Windows" key on my keyboard.


hi! Is there a fuzzy search possibility for function names? eg I'd like to search for "blank?" and this should show me that there is such a function available in clojure.string/blank? and offer the possibility to jump there with enter


@pwrflx You can do cider-apropos (`C-c C-d C-a`); click/ENT on the link to follow to definition


@mgrbyte thanks! is there maybe a way that works via company mode? having the two extra buffers in between slows down in my flow..


@mgrbyte eg I'd like to just have a fuzzy matched company mode window and when I select something it goes to definition, that's all


@pwrflx So I've started using company-mode with cider, and have what you wanted working. Pressing C-w opens a buffer with the source of the completion.


You mean you have developed/configured something custom or you're saying it works out of the box?


works out of the box


with some custom config


@pwrflx no idea sorry, I don't use company-mode


Overall I like CIDER a lot but am trying to wrangle its cider-error popup buffer behavior. Due to my eyes I am less tolerant than others and find the default cider-error behavior really annoying and jarring. Worse, the buffers usually appear in a window that I am not currently editing in, and I have to navigate back to the window, and its frames, that I was actually editing. Are there alternatives to the popup exception behavior? Are there ways to control which frame their buffers appear in?


(setq cider-show-error-buffer nil) feels so much nicer, but is there a way to navigate to the trace when I choose not to display them automatically?


Sorry I am being lazy, I guess I could write a little bit of elisp to show the current cider-error buffer and initiate it from the window of my choosing


Bound to keys, these will work much nicer than default behavior for my eyes, I think

(defun cider-switch-to-error ()
  (switch-to-buffer "*cider-error*"))

(defun cider-pop-to-error ()
  (pop-to-buffer "*cider-error*"))


It seems that cider-error display uses switch-to-other-buffer rather than pop-to-buffer by default. Would this be configurable or would I need to change the source?


if I am in a cljc file and I have both the clojure and the clojurescript repl active


how do I choose which one to evaluate expressions with?


not positive but i think it goes to the last repl. evaluate (+ 1 1) in whichever repl you prefer


possible it also still respects clojurescript-mode vs clojure-mode @andrea.crotti


switching to clojurescript mode seems to work, but ideally we should be able to pick a repl in cljc mode. this seems related -