[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 57f56f2 2/8: multishell - don't skip cd when restarting lo
From: |
ken manheimer |
Subject: |
[elpa] master 57f56f2 2/8: multishell - don't skip cd when restarting local shells; note new starts |
Date: |
Fri, 29 Jan 2016 06:41:42 +0000 |
branch: master
commit 57f56f2cf150a918ad4e258475433b9b950f2fc0
Author: Ken Manheimer <address@hidden>
Commit: Ken Manheimer <address@hidden>
multishell - don't skip cd when restarting local shells; note new starts
Shaking out implementation of shell launch decision tree.
---
multishell.el | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/multishell.el b/multishell.el
index f4cfb9f..c9b1050 100644
--- a/multishell.el
+++ b/multishell.el
@@ -408,9 +408,11 @@ customize the savehist group to activate savehist."
(not (setq inwin
(multishell-get-visible-window-for-buffer
target-buffer))))
;; No preexisting shell buffer, or not in a visible window:
+ (when (not (get-buffer target-shell-buffer-name))
+ (message "Creating new shell buffer '%s'" target-shell-buffer-name))
(pop-to-buffer target-shell-buffer-name pop-up-windows))
- ;; Buffer exists and already has a window - jump to it:
+ ;; Buffer exists and already has a window - jump to it:
(t (if (and multishell-pop-to-frame
inwin
(not (equal (window-frame (selected-window))
@@ -551,19 +553,21 @@ and path nil if none resolved."
(defun multishell-start-shell-in-buffer (buffer-name path)
"Start, restart, or continue a shell in BUFFER-NAME on PATH."
(let* ((buffer (get-buffer buffer-name))
- is-remote)
+ is-remote is-active)
(set-buffer buffer)
+ (setq is-active (comint-check-proc buffer))
(when (and path (file-remote-p path))
(when (and (derived-mode-p 'shell-mode)
- (not (comint-check-proc (current-buffer))))
+ (not is-active))
;; Returning to disconnected remote shell. Do some tidying:
(tramp-cleanup-connection
(tramp-dissect-file-name default-directory 'noexpand)
- 'keep-debug 'keep-password))
+ 'keep-debug 'keep-password)))
+ (when (and path (not is-active))
(message "Connecting to %s" path)
(cd path))
- [elpa] master updated (a136ff8 -> ef022b1), ken manheimer, 2016/01/29
- [elpa] master 0eb0987 1/8: multishell - refine some docstring bumpiness, ken manheimer, 2016/01/29
- [elpa] master f01cf3f 3/8: multishell-start-shell-in-buffer - consolidate conditions better, ken manheimer, 2016/01/29
- [elpa] master 77c698c 6/8: multishell - add pending 1.0.9 changes, revise TODO/known issues, ken manheimer, 2016/01/29
- [elpa] master 57f56f2 2/8: multishell - don't skip cd when restarting local shells; note new starts,
ken manheimer <=
- [elpa] master 8cea630 4/8: multishell - don't inhibit buffer names from completions., ken manheimer, 2016/01/29
- [elpa] master 81c9e3e 5/8: multishell - add paths to shells started without one, when dir tracking, ken manheimer, 2016/01/29
- [elpa] master 6e308f9 7/8: multishell - include active shell buffers names along with history entries., ken manheimer, 2016/01/29
- [elpa] master ef022b1 8/8: multishell - merge latest updates, ken manheimer, 2016/01/29