Terrence Brannon <[email protected]> writes:
> I have been using TRAMP with shell-current-directory (
> http://github.com/metaperl/emacs/blob/master/shell-current-directory.el ) to
> open shells on remote machines successfully.
>
> I would like to modify the directory-shell-buffer-name function:
>
> (defun directory-shell-buffer-name ()
>
> so that it includes the hostname and domain name of the machine the shell is
> being created on.
I would do
(defun directory-shell-buffer-name ()
"The name of a shell buffer pertaining to DIR."
(concat "*"
(if (file-remote-p default-directory)
(concat (file-remote-p default-directory 'user) "@"
(file-remote-p default-directory 'host) ":"))
(file-name-nondirectory
(directory-file-name (expand-file-name default-directory)))
"-shell*"))
It is not exactly what you have asked for, but computing host name and
domain name would require calling remote processes.
Best regards, Michael.
_______________________________________________
Tramp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/tramp-devel