summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/emacs.el
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/gkleen@sif/emacs.el')
-rw-r--r--accounts/gkleen@sif/emacs.el25
1 files changed, 24 insertions, 1 deletions
diff --git a/accounts/gkleen@sif/emacs.el b/accounts/gkleen@sif/emacs.el
index c8356bf2..b22c00f5 100644
--- a/accounts/gkleen@sif/emacs.el
+++ b/accounts/gkleen@sif/emacs.el
@@ -68,7 +68,7 @@
68 68
69(setq undo-tree-auto-save-history t) 69(setq undo-tree-auto-save-history t)
70 70
71(defvar expand-file-name-custom-tilde-alist '()) 71(defvar expand-file-name-custom-tilde-alist '(("u2w-dev1" . "/ssh:uni2work-dev1:/home/gkleen/projects/uni2work")))
72(defun my/add-to-tilde-alist (hash) 72(defun my/add-to-tilde-alist (hash)
73 (let* ((tilde:dir (split-string hash "=")) 73 (let* ((tilde:dir (split-string hash "="))
74 (tilde (car tilde:dir)) 74 (tilde (car tilde:dir))
@@ -128,6 +128,29 @@
128(setq ido-everywhere t) 128(setq ido-everywhere t)
129(ido-mode 1) 129(ido-mode 1)
130 130
131(setq tramp-default-method "ssh")
132(customize-set-variable 'tramp-use-ssh-controlmaster-options nil)
133
134(setq direnv-enabled-hosts '("uni2work-dev1"))
135
136(defun tramp-sh-handle-start-file-process@my-direnv (args)
137 "Enable Direnv for hosts in `direnv-enabled-hosts'."
138 (with-parsed-tramp-file-name (expand-file-name default-directory) nil
139 (if (member host direnv-enabled-hosts)
140 (pcase-let ((`(,name ,buffer ,program . ,args) args))
141 `(,name
142 ,buffer
143 "direnv"
144 "exec"
145 ,localname
146 ,program
147 ,@args))
148 args)))
149
150(with-eval-after-load "tramp-sh"
151 (advice-add 'tramp-sh-handle-start-file-process
152 :filter-args #'tramp-sh-handle-start-file-process@my-direnv))
153
131(setq mail-host-address "sif.midgard.yggdrasil") 154(setq mail-host-address "sif.midgard.yggdrasil")
132(setq user-full-name "Gregor Kleen") 155(setq user-full-name "Gregor Kleen")
133 156