Subject: bug#39253: 27.0.60; tramp: shell commands don't reset output buffer default-directory

From: Tino Calancha <[email-masked]>
Date: Thu, 23 Jan 2020 12:30:34 +0100

X-Debbugs-Cc: Michael Albinus <[email-masked]>

emacs -Q ~

M-! date RET
M-& date RET
;; Both, *Async Shell Command* and *Shell Command Output* have
;; as `default-directory' "~/"
M-x dired RET /sudo::/tmp RET

M-! date RET
M-& date RET
;; Neither *Async Shell Command* nor *Shell Command Output* have
;; updated their `default-directory'

;;; Expected: Both output buffers have reseted their `default-directory' to their
;;; caller `default-directory'.
;;; This is the behavior when you run shell commands in non-tramp buffers, for instance:
M-x dired RET /tmp RET

M-! date RET
M-& date RET
;;; Both output buffers have reseted their `default-directory' to "/tmp/"

In GNU Emacs 27.0.60 (build 2, x86_64-pc-linux-gnu, X toolkit, Xaw scroll bars)
 of 2020-01-23 built on localhost.localdomain
Repository revision: e1deafd39d9ef32cfa54c0be498f26857bf49c25
Repository branch: emacs-27
Windowing system distributor 'The X.Org Foundation', version 11.0.12006000
System Description: openSUSE Tumbleweed