emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/inf-clojure 787400f 264/313: [Fix #178] Ensure there is a


From: ELPA Syncer
Subject: [nongnu] elpa/inf-clojure 787400f 264/313: [Fix #178] Ensure there is a directory for comint (thanks mcphailm)
Date: Wed, 11 Aug 2021 10:00:30 -0400 (EDT)

branch: elpa/inf-clojure
commit 787400fea26a813d4a105a26efde14973e6a78fe
Author: dan sutton <dan@dpsutton.com>
Commit: Bozhidar Batsov <bozhidar.batsov@gmail.com>

    [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)
---
 CHANGELOG.md   | 4 ++++
 inf-clojure.el | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0c85fa4..181398b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,10 @@
 * [#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.
 * [#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.
 
+### Bugs fixed
+
+* [#178](https://github.com/clojure-emacs/inf-clojure/issues/178): Ensure a 
valid directory is used when starting process.
+
 ## 2.2.0 (2020-04-15)
 
 ### New features
diff --git a/inf-clojure.el b/inf-clojure.el
index b0570a0..a100ed9 100644
--- a/inf-clojure.el
+++ b/inf-clojure.el
@@ -667,7 +667,7 @@ process buffer for a list of commands.)"
                                           'confirm-after-completion))))
   (if (not (comint-check-proc "*inf-clojure*"))
       ;; run the new process in the project's root when in a project folder
-      (let ((default-directory (clojure-project-dir))
+      (let ((default-directory (or (clojure-project-dir) default-directory))
             (cmdlist (if (consp cmd)
                          (list cmd)
                        (split-string cmd)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]