[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 996d534 2/9: multishell - roughly working draft using mult
From: |
ken manheimer |
Subject: |
[elpa] master 996d534 2/9: multishell - roughly working draft using multishell-list for completions |
Date: |
Fri, 12 Feb 2016 09:21:24 +0000 |
branch: master
commit 996d5347c80289d6eb97a7fc620b40e2724b14cc
Author: Ken Manheimer <address@hidden>
Commit: Ken Manheimer <address@hidden>
multishell - roughly working draft using multishell-list for completions
Workable, need to resolve pending issues:
- depends on flet - what do i need to do about that?
- adaptation of multishell-list to purpose needs doc update, maybe rethink
- likewise hacking of multishell-list-entries
- inhibit duplicates from organized listing, preferring detailed one
- get mouse click so it ~properly concludes minibuffer activity
---
multishell-list.el | 14 +++++++++-----
multishell.el | 14 ++++++--------
2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/multishell-list.el b/multishell-list.el
index 69299f2..6b8680c 100644
--- a/multishell-list.el
+++ b/multishell-list.el
@@ -158,9 +158,10 @@ The already existing original entry is left untouched."
multishell-list-active-flag)
(t multishell-list-inactive-flag)))
(rest (cadr splat))
- (dir (or (file-remote-p rest 'localname)
+ (dir (or (file-remote-p (or rest "") 'localname)
rest))
- (hops (and (file-remote-p rest 'localname)
+ (hops (and dir
+ (file-remote-p rest 'localname)
(substring
rest 0 (- (length rest) (length dir))))))
(when (not name)
@@ -235,7 +236,7 @@ Initial sort is from most to least recently used:
(tabulated-list-init-header))
;;;###autoload
-(defun multishell-list ()
+(defun multishell-list (&optional buffer-name)
"Edit your current and historic list of shell buffers.
Hit ? for a list of commands.
@@ -247,8 +248,10 @@ recursively invoking \\[multishell-pop-to-shell] at either
of the
(let ((from-entry (car (multishell-history-entries
(multishell-unbracket (buffer-name
(current-buffer))))))
- (buffer (get-buffer-create "*Shells*")))
- (pop-to-buffer buffer)
+ (buffer (get-buffer-create (or buffer-name "*Shells*"))))
+ (if buffer-name
+ (set-buffer buffer)
+ (pop-to-buffer buffer))
(multishell-list-mode)
(tabulated-list-print)
(when from-entry
@@ -258,3 +261,4 @@ recursively invoking \\[multishell-pop-to-shell] at either
of the
(require 'multishell)
;;; multishell-list.el ends here
+o
\ No newline at end of file
diff --git a/multishell.el b/multishell.el
index 8e19029..fe17874 100644
--- a/multishell.el
+++ b/multishell.el
@@ -625,13 +625,12 @@ completions."
(minibuffer-complete-word))
(defun multishell-display-completion-list (completions)
- (let* ((completions-extracted
- (mapcar #'(lambda (text)
- (set-text-properties 0 (length text) nil text)
- text)
- completions))
- (multishell-history completions-extracted))
- (multishell-list-mode)))
+ "Present COMPLETIONS using multishell-list for `display-completion-list'.
+
+This currently doesn't work, because `tabulated-list-mode' isn't
+meant for transient buffers."
+ (let ((multishell-history (mapcar 'substring-no-properties completions)))
+ (multishell-list "*Completions*")))
(defun multishell-read-unbracketed-entry (prompt &optional initial no-record)
"PROMPT for shell buffer name, sans asterisks.
@@ -646,7 +645,6 @@ Input and completion can include associated path, if any.
Return what's provided, if anything, else nil."
(let* ((was-multishell-history multishell-history)
(candidates (multishell-all-entries 'active-duplicated))
-;; (minibuffer-local-must-match-map multishell-local-must-match-map)
(got (flet ((display-completion-list
(completions)
(multishell-display-completion-list completions)))
- [elpa] master updated (1abce8e -> b19288e), ken manheimer, 2016/02/12
- [elpa] master 378b866 1/9: Rough stab at using tabulated-list-mode for minibuffer-completion-help, ken manheimer, 2016/02/12
- [elpa] master 996d534 2/9: multishell - roughly working draft using multishell-list for completions,
ken manheimer <=
- [elpa] master 4802f57 3/9: Clarify scheme for using multishell-list for completions help buffer., ken manheimer, 2016/02/12
- [elpa] master fd514d3 4/9: multishell - method to conclude minibuffer interaction from multishell-list, ken manheimer, 2016/02/12
- [elpa] master 7b66048 5/9: multishell - Use better names for completing read and dispatch provisions., ken manheimer, 2016/02/12
- [elpa] master 1220cdc 6/9: multishell - Be more specific about why we use tramp-cleanup-connection., ken manheimer, 2016/02/12
- [elpa] master d68099d 7/9: multishell - Suppress trivial duplicates in completions list presentation., ken manheimer, 2016/02/12
- [elpa] master f245821 8/9: multishell - 1.1.4, resolves several TODO items., ken manheimer, 2016/02/12
- [elpa] master b19288e 9/9: Merge commit 'f2458211bc25749f07e0d70addde7c7745dcc79d', ken manheimer, 2016/02/12