File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1610,6 +1610,12 @@ It does not yet set the input history."
16101610 (read (current-buffer ))))
16111611 '()))
16121612
1613+ (defun cider-repl--find-dir-for-history ()
1614+ " Find the first suitable directory to store the project's history."
1615+ (seq-find
1616+ (lambda (dir ) (and (not (null dir)) (not (tramp-tramp-file-p dir))))
1617+ (list nrepl-project-dir (clojure-project-dir) default-directory)))
1618+
16131619(defun cider-repl-history-load (&optional filename )
16141620 " Load history from FILENAME into current session.
16151621FILENAME defaults to the value of `cider-repl-history-file' but user
@@ -1621,7 +1627,7 @@ The value of `cider-repl-input-history' is set by this function."
16211627 (filename (setq cider-repl-history-file filename))
16221628 ((equal 'per-project cider-repl-history-file)
16231629 (make-local-variable 'cider-repl-input-history )
1624- (when-let ((dir (clojure-project- dir)))
1630+ (when-let ((dir (cider-repl--find- dir-for-history )))
16251631 (setq-local
16261632 cider-repl-history-file (expand-file-name " .cider-history" dir)))))
16271633 (when cider-repl-history-file
You can’t perform that action at this time.
0 commit comments