Skip to content

Commit 787400f

Browse files
dpsuttonbbatsov
authored andcommitted
[Fix #178] Ensure there is a directory for comint (thanks mcphailm)
If there was no containing directory with a project file the default-directory would be nil. This leads to problems in starting up inf-clojure and also annoyingly seems to set an error in a timer: > Error running timer 'auto-revert-buffers (wrong-type-argument string nil)
1 parent 23492b5 commit 787400f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
* [#174](https://github.com/clojure-emacs/inf-clojure/pull/174): Set REPL type from startup form or prompt at startup, introduce `inf-clojure-custom-repl-type` defcustom.
99
* [#174](https://github.com/clojure-emacs/inf-clojure/pull/174): Invoke `inf-clojure` with a prefix argument to prevent using `inf-clojure-custom-startup` and `inf-clojure-custom-repl-type.
1010

11+
### Bugs fixed
12+
13+
* [#178](https://github.com/clojure-emacs/inf-clojure/issues/178): Ensure a valid directory is used when starting process.
14+
1115
## 2.2.0 (2020-04-15)
1216

1317
### New features

inf-clojure.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ process buffer for a list of commands.)"
667667
'confirm-after-completion))))
668668
(if (not (comint-check-proc "*inf-clojure*"))
669669
;; run the new process in the project's root when in a project folder
670-
(let ((default-directory (clojure-project-dir))
670+
(let ((default-directory (or (clojure-project-dir) default-directory))
671671
(cmdlist (if (consp cmd)
672672
(list cmd)
673673
(split-string cmd)))

0 commit comments

Comments
 (0)