diff options
| author | Michael Albinus | 2020-05-20 11:09:44 +0200 |
|---|---|---|
| committer | Michael Albinus | 2020-05-20 11:09:44 +0200 |
| commit | 453ffe5d535438fba3d189cf26c47f25491d15fb (patch) | |
| tree | f5e16c43e4fc3cd01baa934773e4cfd7f66da88e | |
| parent | f0b0105d913a94c66f230874c9269b19dbbc83bd (diff) | |
| download | emacs-453ffe5d535438fba3d189cf26c47f25491d15fb.tar.gz emacs-453ffe5d535438fba3d189cf26c47f25491d15fb.zip | |
Fix minor Tramp oddities
* lisp/net/tramp-archive.el (tramp-archive-file-name-handler):
Increase `max-specpdl-size' temporarily.
* lisp/net/tramp-rclone.el (tramp-rclone-flush-directory-cache):
Fix a problem with older Emacsen.
| -rw-r--r-- | lisp/net/tramp-archive.el | 5 | ||||
| -rw-r--r-- | lisp/net/tramp-rclone.el | 13 |
2 files changed, 16 insertions, 2 deletions
diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 95cbfb8c22a..63c0769e309 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el | |||
| @@ -318,7 +318,10 @@ arguments to pass to the OPERATION." | |||
| 318 | 318 | ||
| 319 | (let* ((filename (apply #'tramp-archive-file-name-for-operation | 319 | (let* ((filename (apply #'tramp-archive-file-name-for-operation |
| 320 | operation args)) | 320 | operation args)) |
| 321 | (archive (tramp-archive-file-name-archive filename))) | 321 | (archive (tramp-archive-file-name-archive filename)) |
| 322 | ;; Sometimes, it fails with "Variable binding depth exceeds | ||
| 323 | ;; max-specpdl-size". | ||
| 324 | (max-specpdl-size (* 2 max-specpdl-size))) | ||
| 322 | 325 | ||
| 323 | ;; `filename' could be a quoted file name. Or the file | 326 | ;; `filename' could be a quoted file name. Or the file |
| 324 | ;; archive could be a directory, see Bug#30293. | 327 | ;; archive could be a directory, see Bug#30293. |
diff --git a/lisp/net/tramp-rclone.el b/lisp/net/tramp-rclone.el index 445098a5bca..08bba33afed 100644 --- a/lisp/net/tramp-rclone.el +++ b/lisp/net/tramp-rclone.el | |||
| @@ -477,7 +477,18 @@ file names." | |||
| 477 | (with-tramp-connection-property | 477 | (with-tramp-connection-property |
| 478 | (tramp-get-connection-process vec) "rclone-pid" | 478 | (tramp-get-connection-process vec) "rclone-pid" |
| 479 | (catch 'pid | 479 | (catch 'pid |
| 480 | (dolist (pid (list-system-processes)) ;; "pidof rclone" ? | 480 | (dolist |
| 481 | (pid | ||
| 482 | ;; Until Emacs 25, `process-attributes' could | ||
| 483 | ;; crash Emacs for some processes. So we use | ||
| 484 | ;; "pidof", which might not work everywhere. | ||
| 485 | (if (<= emacs-major-version 25) | ||
| 486 | (let ((default-directory temporary-file-directory)) | ||
| 487 | (mapcar | ||
| 488 | #'string-to-number | ||
| 489 | (split-string | ||
| 490 | (shell-command-to-string "pidof rclone")))) | ||
| 491 | (list-system-processes))) | ||
| 481 | (and (string-match-p | 492 | (and (string-match-p |
| 482 | (regexp-quote | 493 | (regexp-quote |
| 483 | (format "rclone mount %s:" (tramp-file-name-host vec))) | 494 | (format "rclone mount %s:" (tramp-file-name-host vec))) |