From ea1e815c3dc1781aa5cb6d401e233c73fa8a108b Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Mon, 26 Jun 2023 15:17:20 +1000 Subject: Adapted more configs from other emacs configs Including wasamasa and jwiegley --- emacs/.emacs.d/init/ycp-system.el | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'emacs/.emacs.d/init/ycp-system.el') diff --git a/emacs/.emacs.d/init/ycp-system.el b/emacs/.emacs.d/init/ycp-system.el index 3d52d34..6dbcf7d 100644 --- a/emacs/.emacs.d/init/ycp-system.el +++ b/emacs/.emacs.d/init/ycp-system.el @@ -3,8 +3,6 @@ ;; Copyright (C) 2023 Free Software Foundation. ;; Author: Yuchen Pei -;; Protesilaos Stavrou -;; Maintainer: Yuchen Pei ;; Package-Requires: ((emacs "28.2")) ;; This file is part of dotfiles. @@ -45,7 +43,18 @@ (setq tramp-default-method "ssh") (setq explicit-shell-file-name "/bin/bash") (add-to-list 'tramp-remote-path 'tramp-own-remote-path) - + ;; keep backup files locally rather than remote + (setq tramp-backup-directory-alist backup-directory-alist) + (with-eval-after-load 'tramp-cache + (setq tramp-persistency-file-name (locate-user-emacs-file + "tramp"))) + ;; Use discovered value for ssh options + (setq tramp-ssh-controlmaster-options "") + ;; Stop tramp from interfering with everything + (setq file-name-handler-alist + (seq-filter + (--remove (string-match-p "^tramp" (symbol-name (cdr it))) + file-name-handler-alist))) (connection-local-set-profile-variables 'termux-bash '((explicit-shell-file-name . "/data/data/com.termux/files/usr/bin/bash") @@ -79,7 +88,9 @@ '((explicit-shell-file-name . "/system/bin/sh"))) (connection-local-set-profiles '(:application tramp :protocol "adb") - 'adb-shell)) + 'adb-shell) + (require 'my-system) + (setq file-name-handler-alist (my-file-handlers-without-tramp))) (provide 'ycp-system) ;;; ycp-system.el ends here -- cgit v1.2.3