;; Remove last element of `(exec-path)', which is `exec-directory'.
;; Use `path-separator' as it does eshell.
(setq eshell-path-env
- (if (file-remote-p default-directory)
+ (if (tramp-tramp-file-p default-directory)
(string-join (butlast (exec-path)) path-separator)
(getenv "PATH"))))
(defun tramp-recentf-exclude-predicate (name)
"Predicate to exclude a remote file name from recentf.
NAME must be equal to `tramp-current-connection'."
- (when (file-remote-p name)
+ (when (tramp-tramp-file-p name)
(tramp-file-name-equal-p
(tramp-dissect-file-name name) (car tramp-current-connection))))
;; with `jka-compr-handler', so we cannot trust its result as
;; indication for a remote file name.
(if-let ((tmpfile
- (and (file-remote-p filename) (file-local-copy filename))))
+ (and (tramp-tramp-file-p filename) (file-local-copy filename))))
;; Remote filename.
(condition-case err
(rename-file tmpfile newname ok-if-already-exists)
(not (directory-name-p newname)))
(tramp-error v 'file-error "File is a directory %s" newname))
- (if (or (and (file-remote-p filename) (not t1))
- (and (file-remote-p newname) (not t2)))
+ (if (or (and (tramp-tramp-file-p filename) (not t1))
+ (and (tramp-tramp-file-p newname) (not t2)))
;; We cannot copy or rename directly.
(let ((tmpfile (tramp-compat-make-temp-file filename)))
(if (eq op 'copy)
;; When `newname' is local, we must change the ownership to
;; the local user.
- (unless (file-remote-p newname)
+ (unless (tramp-tramp-file-p newname)
(tramp-set-file-uid-gid
(concat (file-remote-p filename) newname)
(tramp-get-local-uid 'integer)
"Apparent cycle of symbolic links for %s" ,filename))
;; If the resulting localname looks remote, we must quote
;; it for security reasons.
- (when (file-remote-p result)
+ (when (tramp-tramp-file-p result)
(setq result (file-name-quote result 'top)))
result)))))))
;; Lock file.
(when (and (not (auto-save-file-name-p
(file-name-nondirectory filename)))
- (file-remote-p lockname)
+ (tramp-tramp-file-p lockname)
(not file-locked))
(setq file-locked t)
;; `lock-file' exists since Emacs 28.1.
(< numchase numchase-limit))
(setq numchase (1+ numchase)
result
- (if (file-remote-p symlink-target)
+ (if (tramp-tramp-file-p symlink-target)
(file-name-quote symlink-target 'top)
(tramp-drop-volume-letter
(expand-file-name