Alexey Lebedev <[email protected]> writes:

> Hi,

Hi Alexey,

> This is an addition to a recent commit "Extend integration of external 
> operations in Tramp" /
> 00b767089e711bdbd5d2e470d66fa17390da73f0
>
> When process was passed as a string to (tramp-file-name-for-operation),
> this caused (tramp-get-default-directory) to fail, as it was expecting a
> buffer.
>
> diff --git i/lisp/net/tramp.el w/lisp/net/tramp.el
> index cb89428886e..52c73dcf92a 100644
> --- i/lisp/net/tramp.el
> +++ w/lisp/net/tramp.el
> @@ -2573,7 +2573,9 @@ Must be handled by the callers."
>                  ((bufferp (nth 0 args)) (get-buffer (nth 0 args)))
>                  ((stringp (nth 0 args))
>                   ;; Process or buffer name.
> -                 (or (get-process (nth 0 args)) (get-buffer (nth 0 
> args)))))))
> +                 (or (when-let* ((proc (get-process (nth 0 args))))
> +                          (process-buffer proc))
> +                        (get-buffer (nth 0 args)))))))
>         (tramp-get-default-directory buf))
>       ""))

This clause is intended for file-notify-rm-watch and
file-notify-valid-p, which use a process as argument. Could you pls show
where it is a problem? Another magic file operation? Please provide an
example, including a backtrace.

> Best,
> Alexey Lebedev

Best regards, Michael.

Reply via email to