]> code.delx.au - gnu-emacs-elpa/commitdiff
multishell - provide cue when connecting via cd
authorKen Manheimer <ken.manheimer@gmail.com>
Sat, 16 Jan 2016 21:31:32 +0000 (16:31 -0500)
committerKen Manheimer <ken.manheimer@gmail.com>
Sat, 16 Jan 2016 21:31:32 +0000 (16:31 -0500)
multishell.el

index a7b1d3b5e1864198b66a6a0ba0146e5f8f25cefe..1f589099faddd03a9bcd138cfe3cede958d62dcd 100644 (file)
@@ -449,11 +449,13 @@ Return them as a list (name dir), with dir nil if none given."
                    "/bin/sh"))
          (name (file-name-nondirectory prog))
          (startfile (concat "~/.emacs_" name))
-         (xargs-name (intern-soft (concat "explicit-" name "-args"))))
+         (xargs-name (intern-soft (concat "explicit-" name "-args")))
+         is-remote)
     (set-buffer buffer-name)
     (if (and path (not (string= path "")))
         (setq default-directory path))
-    (when (and (file-remote-p default-directory)
+    (setq is-remote (file-remote-p default-directory))
+    (when (and is-remote
                (derived-mode-p 'shell-mode)
                (not (comint-check-proc (current-buffer))))
       ;; We're returning to an already established but disconnected remote
@@ -461,7 +463,9 @@ Return them as a list (name dir), with dir nil if none given."
       (tramp-cleanup-connection
        (tramp-dissect-file-name default-directory 'noexpand)
        'keep-debug 'keep-password))
-    ;; (cd default-directory) will reconnect a disconnected remote:
+    ;; (cd default-directory) will connect if remote:
+    (when is-remote
+      (message "Connecting to %s" default-directory))
     (cd default-directory)
     (setq buffer (set-buffer (apply 'make-comint
                                     (multishell-unbracket-asterisks buffer-name)