[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sesman 92a4c0a168 045/100: Add sesman-post-command-hook
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sesman 92a4c0a168 045/100: Add sesman-post-command-hook |
Date: |
Tue, 28 Dec 2021 14:06:01 -0500 (EST) |
branch: elpa/sesman
commit 92a4c0a1684ecafff70678b108c85f43454f8501
Author: Vitalie Spinu <spinuvit@gmail.com>
Commit: Vitalie Spinu <spinuvit@gmail.com>
Add sesman-post-command-hook
---
sesman.el | 35 ++++++++++++++++++++---------------
1 file changed, 20 insertions(+), 15 deletions(-)
diff --git a/sesman.el b/sesman.el
index 98a2c3b572..dfebbce4f8 100644
--- a/sesman.el
+++ b/sesman.el
@@ -156,7 +156,8 @@ Can be either a symbol, or a function returning a symbol.")
(sesman-context cxt-type
system)))
(sesman--all-system-sessions system 'sort)
'ask-new))))
- (sesman--link-session system session cxt-type cxt-val))
+ (sesman--link-session system session cxt-type cxt-val)
+ (run-hooks 'sesman-post-command-hook))
(error (format "%s association not allowed for this system (%s)"
(capitalize cxt-name)
system)))))
@@ -304,13 +305,17 @@ If SORT is non-nil, sort in relevance order."
;;; User Interface
+(defun sesman-post-command-hook nil
+ "Normal hook ran after every state-changing Sesman command.")
+
;;;###autoload
(defun sesman-start ()
- "Start sesman session."
+ "Start a Sesman session."
(interactive)
(let ((system (sesman--system)))
(message "Starting new %s session ..." system)
- (sesman-start-session system)))
+ (sesman-start-session system)
+ (run-hooks 'sesman-post-command-hook)))
;;;###autoload
(defun sesman-restart ()
@@ -323,7 +328,7 @@ If SORT is non-nil, sort in relevance order."
;;;###autoload
(defun sesman-quit (&optional which)
- "Terminate sesman session.
+ "Terminate a Sesman session.
When WHICH is nil, kill only the current session; when a single universal
argument or 'linked, kill all linked session; when a double universal argument,
t or 'all, kill all sessions."
@@ -331,17 +336,17 @@ t or 'all, kill all sessions."
(let* ((system (sesman--system))
(sessions (sesman--on-C-u-u-sessions system which)))
(if (null sessions)
- (message "No more %s sessions" system)
- (mapc (lambda (s)
- (sesman-unregister system s)
- (sesman-quit-session system s))
- sessions)
- (message
- "Killed %s %s %s" system
- (if (= 1 (length sessions)) "session" "sessions")
- (mapcar #'car sessions)))))
-
-;; ;;;###autoload
+ (message "No %s sessions found" system)
+ (with-temp-message (format "Killing %s %s %s" system
+ (if (= 1 (length sessions)) "session"
"sessions")
+ (mapcar #'car sessions))
+ (mapc (lambda (s)
+ (sesman-unregister system s)
+ (sesman-quit-session system s))
+ sessions))
+ (run-hooks 'sesman-post-command-hook))))
+
+;;;###autoload
(defun sesman-info (&optional all)
"Display linked sessions info.
When ALL is non-nil, show info for all sessions."
- [nongnu] elpa/sesman 9ec1c330a6 034/100: Fix typo sesman-more-relevant-p -> sesman-more-recent-p, (continued)
- [nongnu] elpa/sesman 9ec1c330a6 034/100: Fix typo sesman-more-relevant-p -> sesman-more-recent-p, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman e340810e82 030/100: Refer to a few commands with the #' notation, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman ae94cee124 033/100: [Fix #3] Remove outdated links from readme and add link to CIDER implementation, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 77ca42e33c 037/100: Add tests, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman d4b8a12249 036/100: Allow prompting for context in sesman-link-with-xyz commands, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 269bdd26b4 028/100: Fix the autoload cookies, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 4f9aea1b6c 047/100: Keep sesman--format-session-objects for minibuffer info only, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 5c34b3669b 031/100: Add a link to the GitHub repo, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 30ec72e2fe 053/100: [Fix #5] Implement session-browser, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman a428dc955c 050/100: Improve readable of sesman-grouped-links, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 92a4c0a168 045/100: Add sesman-post-command-hook,
ELPA Syncer <=
- [nongnu] elpa/sesman 73d726499f 060/100: Bump the development version, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman f3975de11a 038/100: Remove dependency on project.el, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 9e16e21fc4 055/100: Add white space cleaner to dir-locals, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman e3adc450af 052/100: Run hooks in sesman-unlink, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 796a214e1f 058/100: Typo, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman c81565a88b 071/100: Version 0.3, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman d403a84746 069/100: Put back separator in info display, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman cdf0064408 067/100: Use -face in face names, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 563ebeaafb 098/100: Fix broken link in README.md, ELPA Syncer, 2021/12/28
- [nongnu] elpa/sesman 26931e1e64 094/100: Add menu for browser, ELPA Syncer, 2021/12/28