From ebb47f69fd350e2055ba7d6c77f5ecfb5f3f91c1 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Tue, 29 Oct 2019 10:47:41 -0400 Subject: [PATCH] Don't attempt to use direnv when visting a remote file --- emacs/init.org | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/emacs/init.org b/emacs/init.org index 01eb8d3..92c720a 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -2750,11 +2750,13 @@ The Emacs Multi-Media System. For libtag to work, libtag must be installed on th (use-package direnv :if (executable-find "direnv") - :config (direnv-mode) + :config + (direnv-mode) (add-hook 'eshell-mode-hook #'direnv-update-directory-environment) - (add-hook 'eshell-directory-change-hook #'direnv-update-directory-environment) - ;; (add-buffer-mode-hook 'cider-repl-mode #'update-cider-env) - ) + (add-hook 'eshell-directory-change-hook + (lambda () + (unless (file-remote-p default-directory) + (direnv-update-directory-environment))))) #+END_SRC * SQL Emacs has excellent built-in SQL support.