clojure-emacs/sayid

Question: How to expand triple dots?

Closed this issue · 5 comments

abcdw commented

screenshot from 2017-02-03 15-24-25

Want to see full value of result, but I can't figure out how to do it :(
@bpiel I'm sure it's pretty easy, but I'm missing something obvious.

bpiel commented

@abcdw There's two options, the first being preferable when sufficient.

  1. Put your cursor on any line occupied by the value of interest (as you've done in the screen shot). Press shift+p. Sayid will pop open a pretty-print buffer. It has looser depth restrictions AND some special keybindings (press h to show those).

  2. If sayid's pretty-print buffer still isn't cutting it, the last resort is to get the value out of sayid and print through some other means. With your cursor in place (as described above), press d. A message appears in the mini-buffer saying that the value has been def'd to $s/*. You can now inspect that value however you would normally. For example, (clojure.pprint/pprint $s/*).

Please let me know if you have further questions or problems. Thanks for posting.

abcdw commented
  1. nrepl-send-sync-request: Sync nREPL request timed out (op sayid-buf-pprint-at-point trace-id 49321 path (arg-map request))

Part of stacktrace:

java.lang.IllegalArgumentException: No matching clause: :set
 at com.billpiel.sayid.string_output2$get_path.invokeStatic (string_output2.clj:560)
    com.billpiel.sayid.string_output2$get_path.invoke (string_output2.clj:556)
    com.billpiel.sayid.string_output2$decorate_token.invokeStatic (string_output2.clj:580)
    com.billpiel.sayid.string_output2$decorate_token.invoke (string_output2.clj:570)
    clojure.core$map$fn__4785.invoke (core.clj:2646)
    clojure.lang.LazySeq.sval (LazySeq.java:40)
  1. It works.

P.S. The first option also works now. Tried it few times, don't know what I did wrong. Thanks a lot and thanks for the great tool.

P.P.S. I have another question: why sayid buffers don't use my colorscheme options?

screenshot from 2017-02-04 14-26-12

abcdw commented

Reproduced problem with the timeout: When I try P on large hash-map I get this error. nrepl-send-sync-request: Sync nREPL request timed out (op sayid-buf-pprint-at-point trace-id 49321 path (arg-map request)). For small hashmaps it work well.

bpiel commented

@abcdw

  1. Timeouts do happen unfortunately. Rendering large outputs into a buffer is the common cause. I don't know that they can be avoided entirely, but improving the situation has been near the top of my todo list for a while. Coincidentally, I decided to work on it this weekend, so maybe I'll have something soon. We'll see.

  2. BUT, from your stacktrace, it looks like you (originally, at least) ran into an issue I didn't know about, which is that sayid doesn't seem to know how to render sets in the pretty-print buffer. I'll make an issue for that.

  3. Regarding colors: I wrote a lot of sayid before I thought that an emacs plugin would become a high priority, so the display logic has little knowledge of emacs (or any other editor). All text is rendered based on hard-coded logic in sayid. I don't know what would be involved in using the emacs color scheme. I'm sure it's doable, but not something I was planning on looking into soon.

abcdw commented

Thanks a lot for your reply and for great work. Keep going.