aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/init/ycp-system.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/init/ycp-system.el')
-rw-r--r--emacs/.emacs.d/init/ycp-system.el19
1 files changed, 15 insertions, 4 deletions
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 <id@ypei.org>
-;; Protesilaos Stavrou <info@protesilaos.com>
-;; Maintainer: Yuchen Pei <id@ypei.org>
;; 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