[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sesman ea2e4fa0fe 039/100: Propagate system through `sesma
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sesman ea2e4fa0fe 039/100: Propagate system through `sesman-context` |
Date: |
Tue, 28 Dec 2021 14:06:00 -0500 (EST) |
branch: elpa/sesman
commit ea2e4fa0fe5431c463fce1f6db7ba925bccea38c
Author: Vitalie Spinu <spinuvit@gmail.com>
Commit: Vitalie Spinu <spinuvit@gmail.com>
Propagate system through `sesman-context`
---
sesman.el | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/sesman.el b/sesman.el
index fbc37a558b..be7835f178 100644
--- a/sesman.el
+++ b/sesman.el
@@ -113,10 +113,10 @@ Can be either a symbol, or a function returning a
symbol.")
(cxt-val (or cxt-val
(sesman--expand-path-maybe
(or (if cxt-type
- (sesman-context cxt-type)
+ (sesman-context cxt-type system)
;; use the lest specific context-type available
(seq-some (lambda (ctype)
- (let ((val (sesman-context ctype)))
+ (let ((val (sesman-context ctype
system)))
(setq cxt-type ctype)
val))
(reverse (sesman-context-types
system))))
@@ -142,7 +142,7 @@ Can be either a symbol, or a function returning a symbol.")
system
(format "Link with %s %s: "
cxt-name (sesman--abbrev-path-maybe
- (sesman-context cxt-type)))
+ (sesman-context cxt-type
system)))
(sesman--all-system-sessions system)
'ask-new))))
(sesman--link-session system session cxt-type cxt-value))
@@ -639,7 +639,8 @@ connection initializers (\"run-xyz\", \"xyz-jack-in\"
etc.)."
(ses-name0 (car session))
(i 1))
(while (sesman-session system ses-name)
- (setq ses-name (format "%s#%d" ses-name0 i)))
+ (setq ses-name (format "%s#%d" ses-name0 i)
+ i (1+ i)))
(setq session (cons ses-name (cdr session)))
(puthash (cons system ses-name) session sesman-sessions-hashmap)
(sesman--link-session system session)
@@ -725,18 +726,18 @@ buffers."
;;; Contexts
-(cl-defgeneric sesman-context (_cxt-type)
+(cl-defgeneric sesman-context (_cxt-type _system)
"Given context type CXT-TYPE return the context.")
-(cl-defmethod sesman-context ((_cxt-type (eql buffer)))
+(cl-defmethod sesman-context ((_cxt-type (eql buffer)) _system)
"Return current buffer."
(current-buffer))
-(cl-defmethod sesman-context ((_cxt-type (eql directory)))
+(cl-defmethod sesman-context ((_cxt-type (eql directory)) _system)
"Return current directory."
default-directory)
-(cl-defmethod sesman-context ((_cxt-type (eql project)))
+(cl-defmethod sesman-context ((_cxt-type (eql project)) system)
"Return current project."
(or
- (sesman-project (sesman--system))
+ (sesman-project (or system (sesman--system)))
;; Normally we would use (project-roots (project-current)) but currently
;; project-roots fails on nil and doesn't work on custom `('foo .
;; "path/to/project"). So, use vc as a fallback and don't use project.el at
- [nongnu] elpa/sesman 1a6c5448cb 081/100: Don't use deleted sesman-connected-p, (continued)
- [nongnu] elpa/sesman 1a6c5448cb 081/100: Don't use deleted sesman-connected-p, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 3a08e3e7de 085/100: Bump dev version, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 9c921699ce 090/100: Use elipsis instead of %%s for the common session name, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 90974f9fcf 092/100: Update README: sesman-kill* -> sesman-quit*, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 2a1a9a4ccf 087/100: Promote sesman-expand-path into public API, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman e8bfb0e379 091/100: Convert buffers to strings during formatting, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman fe92090cb6 099/100: Reformulate sesman-unlink docs, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 16fb6eca09 016/100: Fix package-lint issues, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman cdb8e0973a 018/100: Port back from CIDER, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman d8f293ff6e 024/100: Fix MELPA badge link, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman ea2e4fa0fe 039/100: Propagate system through `sesman-context`,
ELPA Syncer <=
- [nongnu] elpa/sesman 47678331da 051/100: New semantics of sesman-session-info generic, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 5a11793697 054/100: Fix tests and checkdoc, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 34521cd5c2 049/100: Fix buffer lookup, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 3df33018f1 089/100: Strip trailing slash in `sesman-expand-path`, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 163984c60e 059/100: Better handling of overlays and sensor, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 6b0d6e318d 062/100: New UI and API functions sesman-link-with-least-specific and sesman-link-session, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 2b5135c00a 064/100: Version 0.2.1, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 209d9966e5 008/100: Renaming, refactoring ..., ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 665721c52f 066/100: Move context faces to sesman.el and use for info display, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 5a9727ee82 072/100: Expand all paths with file-truename and cache, ELPA Syncer, 2021/12/28