[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dtache c6aece77d2 113/158: Enhance dtache-detach-dwim c
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dtache c6aece77d2 113/158: Enhance dtache-detach-dwim command |
Date: |
Wed, 19 Jan 2022 18:58:04 -0500 (EST) |
branch: externals/dtache
commit c6aece77d222ef2b8cb64f27c8e6c21932aac230
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Enhance dtache-detach-dwim command
---
dtache.el | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/dtache.el b/dtache.el
index 048e719510..9cd5c5f0ae 100644
--- a/dtache.el
+++ b/dtache.el
@@ -293,6 +293,7 @@ Optionally SUPPRESS-OUTPUT."
(run-hooks 'dtache-compile-hooks)
(dtache-log-mode)
(compilation-minor-mode)
+ (setq dtache--buffer-session session)
(setq-local font-lock-defaults '(compilation-mode-font-lock-keywords
t))
(font-lock-mode)
(read-only-mode))
@@ -376,6 +377,7 @@ Optionally SUPPRESS-OUTPUT."
(insert (dtache--session-output session))
(setq-local default-directory (dtache--session-working-directory
session))
(dtache-log-mode)
+ (setq dtache--buffer-session session)
(goto-char (point-max)))
(pop-to-buffer buffer-name))
(message "Dtache can't find file: %s" file-path)))))
@@ -392,6 +394,7 @@ Optionally SUPPRESS-OUTPUT."
(tramp-verbose 1))
(when (file-exists-p file-path)
(find-file-other-window file-path)
+ (setq dtache--buffer-session session)
(dtache-tail-mode)
(goto-char (point-max))))
(dtache-open-output session))))
@@ -422,12 +425,14 @@ Optionally SUPPRESS-OUTPUT."
"Detach from current session.
This command is only activated if `dtache--buffer-session' is set and
-`dtache--determine-session-state' returns t."
+`dtache--determine-session-state' returns active. For modes such as
+compilation or shell-command the command will also kill the window."
(interactive)
(if (dtache-session-p dtache--buffer-session)
(if-let ((command-or-compile
(cond ((string-match "\*Dtache Shell Command" (buffer-name)) t)
((string-match "\*dtache-compilation" (buffer-name)) t)
+ ((eq major-mode 'dtache-tail-mode) t)
(t nil))))
;; `dtache-shell-command' or `dtache-compile'
(let ((kill-buffer-query-functions nil))
@@ -462,17 +467,6 @@ This command is only activated if `dtache--buffer-session'
is set and
(dtache-get-sessions)))))
(seq-do #'dtache--db-remove-entry sessions)))
-;;;###autoload
-(defun dtache-quit-tail-output ()
- "Quit `dtache' tail log.
-
-The log can have been updated, but that is not done by the user but
-rather the tail mode. To avoid a promtp `buffer-modified-p' is set to
-nil before closing."
- (interactive)
- (set-buffer-modified-p nil)
- (kill-buffer-and-window))
-
;;;; Functions
;;;;; Session
@@ -1161,7 +1155,6 @@ the current time is used."
(defvar dtache-log-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map (kbd "q") #'kill-buffer-and-window)
map)
"Keymap for `dtache-log-mode'.")
@@ -1172,7 +1165,6 @@ the current time is used."
(defvar dtache-tail-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map (kbd "q") #'dtache-quit-tail-output)
map)
"Keymap for `dtache-tail-mode'.")
- [elpa] externals/dtache d693d4c386 065/158: Update README with links to blog posts, (continued)
- [elpa] externals/dtache d693d4c386 065/158: Update README with links to blog posts, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 69b001d0e5 069/158: Make eshell-preoutput-filter-functions local, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache be23732c84 079/158: Update documentation in README, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 2e5a097da4 080/158: Implement dtache-compile-open, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache c09328ca1e 081/158: Add actions to a session, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 82e5859d5a 098/158: Improve dtache-detach-session, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache f73aa7ef98 089/158: Cleanup dtache-shell, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 71966f0d2f 099/158: Add run as an action property, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 5831137cf7 101/158: Rename dtache-initialize to dtache-setup, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 9746f4713c 106/158: Rename session-directory to log-directory, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache c6aece77d2 113/158: Enhance dtache-detach-dwim command,
ELPA Syncer <=
- [elpa] externals/dtache bf71be0eae 118/158: Change output-size to log-size, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache f77c57f608 120/158: Update duration part 2, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache c8a99aed35 123/158: Add version to the dtache database, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 4fa1c9e8a2 134/158: Simplify call to dtache--dtach-arg, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 3942dc6326 135/158: Remove unnecessary checks for dtache-session-mode, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 3aa5babca5 139/158: Update table formatting, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache ee8f3efa26 144/158: Version 0.3, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache d0ec7b9777 156/158: Add support for filenotify on macOS, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache aca73c1e60 152/158: Address issues from melpazoid in melpa/melpa7867, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 81d7fbcdca 082/158: Integrate dtache with start-process, ELPA Syncer, 2022/01/19