branch: elpa/sesman commit 7bca68dbbab0af26a6a23be1ff5fa97f9a18e022 Author: Felipe <git...@felipecortez.net> Commit: GitHub <nore...@github.com>
Fix `sesman-current-session` when `sesman-use-friendly-sessions` is nil (#28) --- sesman.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sesman.el b/sesman.el index 3b24e49a19..f2a2854527 100644 --- a/sesman.el +++ b/sesman.el @@ -625,7 +625,8 @@ types to consider. Defaults to the list returned from `sesman-context-types'." "Get the most relevant current session for the SYSTEM. CXT-TYPES is a list of context types to consider." (or (car (sesman--linked-sessions system 'sort cxt-types)) - (car (sesman--friendly-sessions system 'sort)))) + (when sesman-use-friendly-sessions + (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.