From 154e911afbbcbc1c4573d294df76d7ba57dada50 Mon Sep 17 00:00:00 2001 From: John Doty Date: Wed, 6 Aug 2025 10:11:56 -0700 Subject: [PATCH 1/3] [emacs] tramp improvements --- .emacs.d/init.el | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index e86a36b..8cb758d 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -159,10 +159,14 @@ ;; Modeline format: (display-time-mode -1) -(setq vc-ignore-dir-regexp - (format "\\(%s\\)\\|\\(%s\\)" - vc-ignore-dir-regexp - tramp-file-name-regexp)) +;; 2025-07-09 I used to have this set to make emacs faster and not do vc +;; stuff over tramp but that breaks remote eglot because it breaks remote +;; project, so we can't do that. +;; +;; (setq vc-ignore-dir-regexp +;; (format "\\(%s\\)\\|\\(%s\\)" +;; vc-ignore-dir-regexp +;; tramp-file-name-regexp)) ;; ================================================================ ;; Fonts and windows and the like, only if graphics. @@ -1247,6 +1251,31 @@ Or, uh, Objective C, I guess." ;; Let tramp search $PATH as given to the $USER on the remote machine ;; (necessary to find 'hphpd' for instance) (add-to-list 'tramp-remote-path 'tramp-own-remote-path) + + ;; All of this configuration comes from this guide here: + ;; https://coredumped.dev/2025/06/18/making-tramp-go-brrrr./ + (setq remote-file-name-inhibit-locks t + tramp-use-scp-direct-remote-copying t + remote-file-name-inhibit-auto-save-visited t + tramp-copy-size-limit (* 1024 1024) ;; 1MB + tramp-verbose 2) + + (connection-local-set-profile-variables + 'remote-direct-async-process + '((tramp-direct-async-process . nil))) ;; NOTE: t here breaks eglot :( + + ;; (connection-local-get-profile-variables 'remote-direct-async-process) + + (connection-local-set-profiles + '(:application tramp :machine "arca.ssh") + 'remote-direct-async-process) + + (setq magit-tramp-pipe-stty-settings 'pty) + + (with-eval-after-load 'tramp + (with-eval-after-load 'compile + (remove-hook 'compilation-mode-hook #'tramp-compile-disable-ssh-controlmaster-options))) + ;; Use putty on windows (when (eq window-system 'w32) (setq tramp-default-method "plink"))) From 3e3bc2baba15db4c79ca23a3f17b862a75edb571 Mon Sep 17 00:00:00 2001 From: John Doty Date: Wed, 6 Aug 2025 10:12:30 -0700 Subject: [PATCH 2/3] [emacs] jsonnet --- .emacs.d/init.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 8cb758d..d32e8b2 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -1437,7 +1437,8 @@ Do this when you edit your project view." ;; ================================================================= ;; Jsonnet ;; ================================================================= -(use-package jsonnet-mode :ensure t) +(use-package jsonnet-mode :ensure t + :mode "\\.jsonnet\\(\\.TEMPLATE\\)?\\'") ;; ================================================================= ;; Fish shell From 2ed5d59eae16c73c315344dd6c247f57d6ce94f4 Mon Sep 17 00:00:00 2001 From: John Doty Date: Wed, 6 Aug 2025 10:12:55 -0700 Subject: [PATCH 3/3] [emacs] Don't die on map registration error --- site-lisp/doty-tools-buffer-map.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/site-lisp/doty-tools-buffer-map.el b/site-lisp/doty-tools-buffer-map.el index 4e17543..0575d96 100644 --- a/site-lisp/doty-tools-buffer-map.el +++ b/site-lisp/doty-tools-buffer-map.el @@ -212,7 +212,9 @@ Example: :confirm nil :include t)) -(doty-tools-register-mappers) +(condition-case nil + (doty-tools-register-mappers) + (error nil)) (provide 'doty-tools-buffer-map) ;;; doty-tools-buffer-map.el ends here