[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sesman 95f8354d1a 041/100: Add sesman-relevant-[link|sessi
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sesman 95f8354d1a 041/100: Add sesman-relevant-[link|session]-p functions |
Date: |
Tue, 28 Dec 2021 14:06:01 -0500 (EST) |
branch: elpa/sesman
commit 95f8354d1aea41d263f2b4c1056c9efc24a1bb45
Author: Vitalie Spinu <spinuvit@gmail.com>
Commit: Vitalie Spinu <spinuvit@gmail.com>
Add sesman-relevant-[link|session]-p functions
---
sesman.el | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/sesman.el b/sesman.el
index 646008f4d5..a350ca853e 100644
--- a/sesman.el
+++ b/sesman.el
@@ -794,6 +794,20 @@ buffers."
(string-match-p (concat "^" proj)
(expand-file-name default-directory))))
+(defun sesman-relevant-link-p (link &optional cxt-types)
+ "Return non-nil if LINK is relevant to the current context.
+If CXT-TYPES is non-nil, only check relevance for those contexts."
+ (when (or (null cxt-types)
+ (member (sesman--lnk-context-type lnk) cxt-types))
+ (sesman-relevant-context-p
+ (sesman--lnk-context-type link)
+ (sesman--lnk-value link))))
+
+(defun sesman-relevant-session-p (system session &optional cxt-types)
+ "Return non-nil if SYSTEM's SESSION is relevant to the current context.
+If CXT-TYPES is non-nil, only check relevance for those contexts."
+ (seq-some #'sesman-relevant-link-p
+ (sesman-links system session cxt-types)))
(provide 'sesman)
- [nongnu] elpa/sesman 602d818dd0 073/100: Autoload sesman keymap, (continued)
- [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, 2021/12/28
- [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 <=
- [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