[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 4802f57 3/9: Clarify scheme for using multishell-list for
[elpa] master 4802f57 3/9: Clarify scheme for using multishell-list for completions help buffer.
Fri, 12 Feb 2016 09:21:43 +0000
Author: Ken Manheimer <address@hidden>
Commit: Ken Manheimer <address@hidden>
Clarify scheme for using multishell-list for completions help buffer.
- Use a custom version of display-completion-list
- Via institution via cl-letf.
- Remove now unnecessary keybindings
multishell-list.el | 17 ++++++++++-------
multishell.el | 41 +++++++++++------------------------------
2 files changed, 21 insertions(+), 37 deletions(-)
diff --git a/multishell-list.el b/multishell-list.el
index 6b8680c..4966820 100644
@@ -158,8 +158,8 @@ The already existing original entry is left untouched."
(rest (cadr splat))
- (dir (or (file-remote-p (or rest "") 'localname)
+ (dir (and rest (or (file-remote-p rest 'localname)
(hops (and dir
(file-remote-p rest 'localname)
@@ -239,11 +239,15 @@ Initial sort is from most to least recently used:
(defun multishell-list (&optional buffer-name)
"Edit your current and historic list of shell buffers.
-Hit ? for a list of commands.
+Optional BUFFER-NAME specifies buffer to use for list. When a
+buffer is specified, we do not select the buffer, just fill
+it. Otherwise, we pop to the *Shells* buffer.
-You can get to this shell listing manager by
-recursively invoking \\[multishell-pop-to-shell] at either of the
-`multishell-pop-to-shell' universal argument prompts."
+In the buffer, hit ? or h for a list of commands.
+You can get to the shell listing manager by recursively invoking
+\\[multishell-pop-to-shell] at the `multishell-pop-to-shell'
(let ((from-entry (car (multishell-history-entries
@@ -261,4 +265,3 @@ recursively invoking \\[multishell-pop-to-shell] at either
;;; multishell-list.el ends here
\ No newline at end of file
diff --git a/multishell.el b/multishell.el
index fe17874..a0783ee 100644
@@ -1,9 +1,9 @@
-;;; multishell.el --- facilitate multiple local and remote shell buffers
+;;; multishell.el --- Easily use multiple shell buffers, local and remote.
;; Copyright (C) 1999-2016 Free Software Foundation, Inc.
;; Author: Ken Manheimer <address@hidden>
-;; Version: 1.1.3
+;; Version: 1.1.4
;; Created: 1999 -- first public availability
;; Keywords: processes
;; URL: https://github.com/kenmanheimer/EmacsMultishell
@@ -59,6 +59,8 @@
;; Change Log:
+;; * 2016-02-10 1.1.4 Ken Manheimer:
+;; - hookup multishell-list as completion help buffer.
;; * 2016-02-09 1.1.3 Ken Manheimer:
;; - add some handy operations, like cloning new entry from existing
@@ -603,32 +605,8 @@ completions."
(append multishell-history active-names)
- (let ((map (make-sparse-keymap)))
- (set-keymap-parent map minibuffer-local-must-match-map)
- (define-key map (kbd "?") 'multishell-minibuffer-completion-help)
- (define-key map (kbd " ") 'multishell-minibuffer-complete-word)
- (define-key map [tab] 'multishell-read-minibuffer-complete)
-(defun multishell-minibuffer-completion-help (&optional start end)
- "Multishell version of `minibuffer-completion-help'."
- ;; Call all-completions on minibuffer-completion-table and
- ;; minibuffer-completion-predicate
- ;; Display using (with-output-to-temp-buffer "*Completions*"
- ;; ... <multishell-list stuff>)
- (minibuffer-completion-help start end))
-(defun multishell-minibuffer-complete-word ()
- "Multishell version of `minibuffer-completion-help'."
(defun multishell-display-completion-list (completions)
- "Present COMPLETIONS using multishell-list for `display-completion-list'.
-This currently doesn't work, because `tabulated-list-mode' isn't
-meant for transient buffers."
+ "Present COMPLETIONS using multishell-list for `display-completion-list'."
(let ((multishell-history (mapcar 'substring-no-properties completions)))
@@ -645,9 +623,12 @@ 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))
- (got (flet ((display-completion-list
- (multishell-display-completion-list completions)))
+ (got (cl-letf
+ ;; Engage our custom display-completion-list, for
+ ;; minibuffer-completion-help. `cl-letf' for dynamic
+ ;; binding; cl-flet's lexical doesn't do what's needed.
+ (((symbol-function 'display-completion-list)
- [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, 2016/02/12
- [elpa] master 4802f57 3/9: Clarify scheme for using multishell-list for completions help buffer.,
ken manheimer <=
- [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