+2011-03-14 Michael Albinus <michael.albinus@gmx.de>
+
+ * shell.el (shell): When called interactively, offer to change the
+ shell file name on remote hosts.
+
2011-03-13 Teodor Zlatanov <tzz@lifelogs.com>
* net/ldap.el (ldap-search-internal): Add `auth-source-search'
(get-buffer-create (or buffer "*shell*"))
;; If the current buffer is a dead shell buffer, use it.
(current-buffer)))
+
+ ;; On remote hosts, the local `shell-file-name' might be useless.
+ (if (and (interactive-p)
+ (file-remote-p default-directory)
+ (null explicit-shell-file-name)
+ (null (getenv "ESHELL")))
+ (with-current-buffer buffer
+ (set (make-local-variable 'explicit-shell-file-name)
+ (file-remote-p
+ (expand-file-name
+ (read-file-name
+ "Remote shell path: " default-directory shell-file-name
+ t shell-file-name))
+ 'localname))))
+
;; Pop to buffer, so that the buffer's window will be correctly set
;; when we call comint (so that comint sets the COLUMNS env var properly).
(pop-to-buffer buffer)