emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 46bdd13 4/5: multishell - list active the present then his


From: ken manheimer
Subject: [elpa] master 46bdd13 4/5: multishell - list active the present then historical buffers
Date: Sat, 30 Jan 2016 07:15:41 +0000

branch: master
commit 46bdd13d97357cd624de91fb19e5a602aabfa8e6
Author: Ken Manheimer <address@hidden>
Commit: Ken Manheimer <address@hidden>

    multishell - list active the present then historical buffers
    
    and identify them in multishell-list as "+" = active, "." = present, and
    "x" = past/not present.
---
 multishell-list.el |    4 ++--
 multishell.el      |   17 +++++++++--------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/multishell-list.el b/multishell-list.el
index 5dab00a..ae72f92 100644
--- a/multishell-list.el
+++ b/multishell-list.el
@@ -72,9 +72,9 @@
                        (buffer (and name
                                     (get-buffer
                                      (multishell-bracket name))))
-                       (status (cond ((not buffer) " ")
+                       (status (cond ((not buffer) "x")
                                      ((comint-check-proc buffer) "+")
-                                     (t "-")))
+                                     (t ".")))
                        (rest (cadr splat))
                        (dissected (and rest (file-remote-p rest)
                                        (tramp-dissect-file-name rest t)))
diff --git a/multishell.el b/multishell.el
index 422c55f..7aa4b46 100644
--- a/multishell.el
+++ b/multishell.el
@@ -540,19 +540,20 @@ Optional ACTIVE-DUPLICATED will return a copy of
 `multishell-history' with unbracketed names of active buffers,
 sans paths, appended to the list, so they have short and long
 completions."
-  ;; Reorder so active buffers are listed first:
-  (let (active-entries active-names historicals splat name path buffer)
+  ;; Reorder so active lead present lead historical entries:
+  (let (active-entries active-names present past splat name path buffer)
     (dolist (entry multishell-history)
       (setq splat (multishell-split-entry entry)
             name (car splat)
             path (cadr splat)
             buffer (and name (get-buffer (multishell-bracket name))))
-      (if (and (buffer-live-p buffer)
-               (comint-check-proc buffer))
-          (setq active-entries (push entry active-entries)
-                active-names (push name active-names))
-        (setq historicals (push entry historicals))))
-    (setq multishell-history (append active-entries historicals))
+      (if (buffer-live-p buffer)
+          (if (comint-check-proc buffer)
+              (setq active-entries (push entry active-entries)
+                    active-names (push name active-names))
+            (setq present (push entry present)))
+        (setq past (push entry past))))
+    (setq multishell-history (append active-entries present past))
     (if active-duplicated
         (append multishell-history active-names)
       multishell-history)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]