[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sesman 4b2507d1ee 076/100: Optimize sesman-current-session
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sesman 4b2507d1ee 076/100: Optimize sesman-current-session |
Date: |
Tue, 28 Dec 2021 14:06:04 -0500 (EST) |
branch: elpa/sesman
commit 4b2507d1ee405ddf24cd24649f6e9f7ff3a7bdd1
Author: Vitalie Spinu <spinuvit@gmail.com>
Commit: Vitalie Spinu <spinuvit@gmail.com>
Optimize sesman-current-session
---
sesman.el | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/sesman.el b/sesman.el
index 4983f85802..e0456dbd84 100644
--- a/sesman.el
+++ b/sesman.el
@@ -65,9 +65,9 @@
:group 'sesman)
(defcustom sesman-use-friendly-sessions t
- "If non-nil consider friendly sessions when choosing for the current session.
+ "If non-nil consider friendly sessions when searching for the current
sessions.
The definition of friendly sessions is system dependent but usually means
-sessions running in dependency projects."
+sessions running in dependent projects."
:group 'sesman
:type 'boolean
:package-version '(sesman . "0.3.2"))
@@ -657,9 +657,11 @@ return a list of sessions, otherwise a single session."
(if ask-all (list ses) ses))))))
(defun sesman-current-session (system &optional cxt-types)
- "Get the most relevant linked session for SYSTEM.
-CXT-TYPES is as in `sesman-linked-sessions'."
- (car (sesman-current-sessions system cxt-types)))
+ "Get the most relevant current session for the SYSTEM.
+CXT-TYPES is a list of context types to consider. See `sesman-current-sessions'
+for further details."
+ (or (car (sesman-linked-sessions system cxt-types))
+ (car (sesman-friendly-sessions system 'sort))))
(defun sesman-ensure-session (system &optional cxt-types)
"Get the most relevant linked session for SYSTEM or throw if none exists.
- [nongnu] elpa/sesman 2e4205c7d9 046/100: Fix return value of sesman-grouped-links, (continued)
- [nongnu] elpa/sesman 2e4205c7d9 046/100: Fix return value of sesman-grouped-links, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman ae68b3facf 042/100: [#8] Improve session "info" infrastructure, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 9108444fd8 040/100: Better sorting and de-duplication in a number of core functions, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman ba2756caf7 063/100: Fix compilation warnings, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman fcdb6846f3 061/100: Make checkdoc happy, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 602d818dd0 073/100: Autoload sesman keymap, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 2b1b624e7a 074/100: Implement friendly session mechanism, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 19151a8b60 065/100: Add colors for marking dir, proj and buf in listings, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 1f5b2b2338 075/100: More consistent empty prefix in sesman-info, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 59f4a2442e 077/100: Simplify system API by subsuming sesman-linked/friendly-sessions into sesman-sessions, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 4b2507d1ee 076/100: Optimize sesman-current-session,
ELPA Syncer <=
- [nongnu] elpa/sesman edee869c20 096/100: Sesman menu: Add Browser, Move Unlink, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 93123f6cef 093/100: Rename seman-menu-open -> sesman-menu-open, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 966c13812f 088/100: [Fix #14] Rewrite the usage of when-let*, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman b527f7a638 043/100: Make sesman-system permanent local, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 95f8354d1a 041/100: Add sesman-relevant-[link|session]-p functions, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman cf7997e279 035/100: Add sesman-project generic, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 0ea1d3e645 048/100: [Fix #7] Implement WHICH argument in `sesman-restart`, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 0e38d4e427 057/100: Remove unnecessary autoloads, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman e4775a2e81 084/100: Remove sesman--expand-path-maybe, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 7bbd02be9e 083/100: Add sesman-follow-symlinks defcustom, ELPA Syncer, 2021/12/28