File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1266,8 +1266,12 @@ Set this to nil to prevent truncation."
1266
1266
(defun nrepl-messages-buffer (msg )
1267
1267
" Return or create the buffer for MSG.
1268
1268
The default buffer name is *nrepl-messages session*."
1269
- (let* ((msg-session (nrepl-dict-get msg " session" ))
1270
- (msg-buffer-name (format nrepl-message-buffer-name-template msg-session)))
1269
+ ; ; Log `new-session' replies to the "orphan" buffer, because that's probably
1270
+ ; ; where we logged the request it's replying to.
1271
+ (let* ((msg-session (or (unless (nrepl-dict-get msg " new-session" )
1272
+ (nrepl-dict-get msg " session" ))
1273
+ " 00000000-0000-0000-0000-000000000000" ))
1274
+ (msg-buffer-name (format nrepl-message-buffer-name-template msg-session)))
1271
1275
(or (get-buffer msg-buffer-name)
1272
1276
(let ((buffer (get-buffer-create msg-buffer-name)))
1273
1277
(with-current-buffer buffer
You can’t perform that action at this time.
0 commit comments