*** /tmp/ediffH7PJjY 2022-09-10 19:34:21.792552738 +0200 --- /home/albinus/src/tramp/lisp/tramp-cache.el 2022-09-10 19:21:05.239593463 +0200 *************** *** 133,138 **** --- 133,139 ---- (defun tramp-get-file-property (key file property &optional default) "Get the PROPERTY of FILE from the cache context of KEY. Return DEFAULT if not set." + (if non-essential default ;; Unify localname. Remove hop from `tramp-file-name' structure. (setq key (tramp-file-name-unify key file)) (let* ((hash (tramp-get-hash-table key)) *************** *** 167,173 **** (symbol-value var)) 0))) (set var (1+ val)))) ! value)) (add-hook 'tramp-cache-unload-hook (lambda () --- 168,174 ---- (symbol-value var)) 0))) (set var (1+ val)))) ! value))) (add-hook 'tramp-cache-unload-hook (lambda () *************** *** 178,183 **** --- 179,185 ---- (defun tramp-set-file-property (key file property value) "Set the PROPERTY of FILE to VALUE, in the cache context of KEY. Return VALUE." + (if non-essential value ;; Unify localname. Remove hop from `tramp-file-name' structure. (setq key (tramp-file-name-unify key file)) (let ((hash (tramp-get-hash-table key))) *************** *** 192,198 **** (symbol-value var)) 0))) (set var (1+ val)))) ! value)) (add-hook 'tramp-cache-unload-hook (lambda () --- 194,200 ---- (symbol-value var)) 0))) (set var (1+ val)))) ! value))) (add-hook 'tramp-cache-unload-hook (lambda () *************** *** 208,223 **** ;;;###tramp-autoload (defun tramp-flush-file-property (key file property) "Remove PROPERTY of FILE in the cache context of KEY." ;; Unify localname. Remove hop from `tramp-file-name' structure. (setq key (tramp-file-name-unify key file)) (remhash property (tramp-get-hash-table key)) (tramp-message key 8 "%s %s" (tramp-file-name-localname key) property) (when (>= tramp-verbose 10) (let ((var (intern (concat "tramp-cache-set-count-" property)))) ! (makunbound var)))) (defun tramp-flush-file-upper-properties (key file) "Remove some properties of FILE's upper directory." (when (file-name-absolute-p file) ;; `file-name-directory' can return nil, for example for "~". (when-let ((file (file-name-directory file)) --- 210,227 ---- ;;;###tramp-autoload (defun tramp-flush-file-property (key file property) "Remove PROPERTY of FILE in the cache context of KEY." + (unless non-essential ;; Unify localname. Remove hop from `tramp-file-name' structure. (setq key (tramp-file-name-unify key file)) (remhash property (tramp-get-hash-table key)) (tramp-message key 8 "%s %s" (tramp-file-name-localname key) property) (when (>= tramp-verbose 10) (let ((var (intern (concat "tramp-cache-set-count-" property)))) ! (makunbound var))))) (defun tramp-flush-file-upper-properties (key file) "Remove some properties of FILE's upper directory." + (unless non-essential (when (file-name-absolute-p file) ;; `file-name-directory' can return nil, for example for "~". (when-let ((file (file-name-directory file)) *************** *** 229,239 **** (rx bos (| "directory-" "file-name-all-completions" "file-entries")) property) ! (tramp-flush-file-property key file property)))))) ;;;###tramp-autoload (defun tramp-flush-file-properties (key file) "Remove all properties of FILE in the cache context of KEY." (let ((truename (tramp-get-file-property key file "file-truename"))) ;; Unify localname. Remove hop from `tramp-file-name' structure. (setq key (tramp-file-name-unify key file)) --- 233,244 ---- (rx bos (| "directory-" "file-name-all-completions" "file-entries")) property) ! (tramp-flush-file-property key file property))))))) ;;;###tramp-autoload (defun tramp-flush-file-properties (key file) "Remove all properties of FILE in the cache context of KEY." + (unless non-essential (let ((truename (tramp-get-file-property key file "file-truename"))) ;; Unify localname. Remove hop from `tramp-file-name' structure. (setq key (tramp-file-name-unify key file)) *************** *** 244,250 **** (not (string-equal file (directory-file-name truename)))) (tramp-flush-file-properties key truename)) ;; Remove selected properties of upper directory. ! (tramp-flush-file-upper-properties key file))) ;;;###tramp-autoload (defun tramp-flush-directory-properties (key directory) --- 249,255 ---- (not (string-equal file (directory-file-name truename)))) (tramp-flush-file-properties key truename)) ;; Remove selected properties of upper directory. ! (tramp-flush-file-upper-properties key file)))) ;;;###tramp-autoload (defun tramp-flush-directory-properties (key directory)