summaryrefslogtreecommitdiff
path: root/.emacs.d/init-spw.el
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-06-22 10:46:03 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-06-22 10:46:03 -0700
commitf504684dcf1415ef70772af56c3b7315162ee8e7 (patch)
treeb3a6753e1349ef4e620e89bce48c1185455fc308 /.emacs.d/init-spw.el
parent5d0537cbc657430aed622790f7de2f0b151ff94c (diff)
downloaddotfiles-f504684dcf1415ef70772af56c3b7315162ee8e7.tar.gz
avoid C-c e e creating fresh Eshells in pwd
Diffstat (limited to '.emacs.d/init-spw.el')
-rw-r--r--.emacs.d/init-spw.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/.emacs.d/init-spw.el b/.emacs.d/init-spw.el
index 7c8a9d65..4b7da465 100644
--- a/.emacs.d/init-spw.el
+++ b/.emacs.d/init-spw.el
@@ -1310,8 +1310,9 @@ The ideas behind this behaviour are as follows.
(fresh-eshell ()
(when-let ((buffer (get-buffer eshell-buffer-name)))
(with-current-buffer buffer (rename-uniquely)))
- ;; This will pick up `default-directory'.
- (eshell)))
+ (let ((default-directory
+ (if chdir default-directory (expand-file-name "~"))))
+ (eshell))))
(let ((current-eshell (and (eq major-mode 'eshell-mode)
(not (project-eshell-eshell-p))
(not (get-buffer-process (current-buffer)))