slime prints my (format …) calls only when called function ends

后端 未结 2 867
一整个雨季
一整个雨季 2020-12-07 06:04

I have emacs + sbcl + slime installed. I have this function defined

(defun jugar ()
  (let* ((nodoActual *nodo-inicial*)
         (estadoActual (nodo-estado          


        
相关标签:
2条回答
  • 2020-12-07 06:41

    Add (force-output) after last (format ) call.

    0 讨论(0)
  • 2020-12-07 06:49

    proksid's answer mentions force-output, which is on the right track, but there are actually a few related possibilities. The documentation for force-output also describes finish-output (and clear-output, which isn't relevant for us):

    finish-output, force-output, and clear-output exercise control over the internal handling of buffered stream output.

    finish-output attempts to ensure that any buffered output sent to output-stream has reached its destination, and then returns.

    force-output initiates the emptying of any internal buffers but does not wait for completion or acknowledgment to return.

    clear-output attempts to abort any outstanding output operation in progress in order to allow as little output as possible to continue to the destination.

    If you want to guarantee that the output from the different iterations doesn't get interleaved (I don't know whether this is likely or not), you might want to consider finish-output instead of force-output. In either case, at least be aware of both options.

    0 讨论(0)
提交回复
热议问题