diff options
| author | Stefan Kangas | 2022-06-29 06:31:15 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2022-06-29 06:31:15 +0200 |
| commit | a0d7caf865269ce8aa3cad85cabda4e5cbffd9c2 (patch) | |
| tree | fd9df04952f7dd9568b3922593cd6ed15628af91 /lisp | |
| parent | 0e6516a1f022e18f4e32848331954deb0e850d4e (diff) | |
| parent | 2eba8cad204e4b663809235941d91671d2d8e6da (diff) | |
| download | emacs-a0d7caf865269ce8aa3cad85cabda4e5cbffd9c2.tar.gz emacs-a0d7caf865269ce8aa3cad85cabda4e5cbffd9c2.zip | |
Merge from origin/emacs-28
2eba8cad20 Tramp shall not trap unrelated D-Bus errors
a8e72eb0e2 ; * etc/NEWS: Fix file name quotations.
091b22cb12 Fix hash table function return values in manual
# Conflicts:
# etc/NEWS
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/net/tramp-gvfs.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index fca3988b8d8..07e084768ab 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el | |||
| @@ -839,6 +839,8 @@ Operations not mentioned here will be handled by the default Emacs primitives.") | |||
| 839 | (let ((method (tramp-file-name-method vec))) | 839 | (let ((method (tramp-file-name-method vec))) |
| 840 | (and (stringp method) (member method tramp-gvfs-methods))))) | 840 | (and (stringp method) (member method tramp-gvfs-methods))))) |
| 841 | 841 | ||
| 842 | (defvar tramp-gvfs-dbus-event-vector) | ||
| 843 | |||
| 842 | ;;;###tramp-autoload | 844 | ;;;###tramp-autoload |
| 843 | (defun tramp-gvfs-file-name-handler (operation &rest args) | 845 | (defun tramp-gvfs-file-name-handler (operation &rest args) |
| 844 | "Invoke the GVFS related OPERATION and ARGS. | 846 | "Invoke the GVFS related OPERATION and ARGS. |
| @@ -846,7 +848,11 @@ First arg specifies the OPERATION, second arg is a list of | |||
| 846 | arguments to pass to the OPERATION." | 848 | arguments to pass to the OPERATION." |
| 847 | (unless tramp-gvfs-enabled | 849 | (unless tramp-gvfs-enabled |
| 848 | (tramp-user-error nil "Package `tramp-gvfs' not supported")) | 850 | (tramp-user-error nil "Package `tramp-gvfs' not supported")) |
| 849 | (if-let ((fn (assoc operation tramp-gvfs-file-name-handler-alist))) | 851 | (if-let ((filename (apply #'tramp-file-name-for-operation operation args)) |
| 852 | (tramp-gvfs-dbus-event-vector | ||
| 853 | (and (tramp-tramp-file-p filename) | ||
| 854 | (tramp-dissect-file-name filename))) | ||
| 855 | (fn (assoc operation tramp-gvfs-file-name-handler-alist))) | ||
| 850 | (save-match-data (apply (cdr fn) args)) | 856 | (save-match-data (apply (cdr fn) args)) |
| 851 | (tramp-run-real-handler operation args))) | 857 | (tramp-run-real-handler operation args))) |
| 852 | 858 | ||
| @@ -936,7 +942,8 @@ The call will be traced by Tramp with trace level 6." | |||
| 936 | (defvar tramp-gvfs-dbus-event-vector nil | 942 | (defvar tramp-gvfs-dbus-event-vector nil |
| 937 | "Current Tramp file name to be used, as vector. | 943 | "Current Tramp file name to be used, as vector. |
| 938 | It is needed when D-Bus signals or errors arrive, because there | 944 | It is needed when D-Bus signals or errors arrive, because there |
| 939 | is no information where to trace the message.") | 945 | is no information where to trace the message. |
| 946 | Globally, the value shall always be nil; it is bound where needed.") | ||
| 940 | 947 | ||
| 941 | (defun tramp-gvfs-dbus-event-error (event err) | 948 | (defun tramp-gvfs-dbus-event-error (event err) |
| 942 | "Called when a D-Bus error message arrives, see `dbus-event-error-functions'." | 949 | "Called when a D-Bus error message arrives, see `dbus-event-error-functions'." |
| @@ -2135,10 +2142,6 @@ connection if a previous connection has died for some reason." | |||
| 2135 | (unless (tramp-connectable-p vec) | 2142 | (unless (tramp-connectable-p vec) |
| 2136 | (throw 'non-essential 'non-essential)) | 2143 | (throw 'non-essential 'non-essential)) |
| 2137 | 2144 | ||
| 2138 | ;; We set the file name, in case there are incoming D-Bus signals or | ||
| 2139 | ;; D-Bus errors. | ||
| 2140 | (setq tramp-gvfs-dbus-event-vector vec) | ||
| 2141 | |||
| 2142 | ;; For password handling, we need a process bound to the connection | 2145 | ;; For password handling, we need a process bound to the connection |
| 2143 | ;; buffer. Therefore, we create a dummy process. Maybe there is a | 2146 | ;; buffer. Therefore, we create a dummy process. Maybe there is a |
| 2144 | ;; better solution? | 2147 | ;; better solution? |