Skip to content

Commit

Permalink
Expand cider--sesman-friendly-session-p's docstring'
Browse files Browse the repository at this point in the history
  • Loading branch information
vemv authored and bbatsov committed Aug 22, 2023
1 parent a0d0c3c commit 0e76b14
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cider-repl.el
Original file line number Diff line number Diff line change
Expand Up @@ -1748,7 +1748,15 @@ constructs."


(defun cider--sesman-friendly-session-p (session &optional debug)
"Check if SESSION is a friendly session, DEBUG optionally."
"Check if SESSION is a friendly session, DEBUG optionally.
The checking is done as follows:
* Consider the buffer's filename, strip any Docker/TRAMP details from it
* Check if that filename belongs to the classpath,
or to the classpath roots (e.g. the project root dir)
* As a fallback, check if the buffer's ns form
matches any of the loaded namespaces."
(setcdr session (seq-filter #'buffer-live-p (cdr session)))
(when-let* ((repl (cadr session))
(proc (get-buffer-process repl))
Expand Down

0 comments on commit 0e76b14

Please sign in to comment.