branch: externals/dtache commit e864ccd547169ff43a32e98f9003eb0759dd799d Author: Niklas Eklund <niklas.ekl...@posteo.net> Commit: Niklas Eklund <niklas.ekl...@posteo.net>
Improve attaching to a detached compilation --- dtache-compile.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dtache-compile.el b/dtache-compile.el index 3d3bc2be5f..a1c7c64a5e 100644 --- a/dtache-compile.el +++ b/dtache-compile.el @@ -80,7 +80,15 @@ Optionally EDIT-COMMAND." (let* ((dtache-enabled t) (dtache-session-mode 'attach) (dtache--current-session session)) - (compilation-start (dtache--session-command session))))) + (compilation-start (dtache--session-command session)) + (when dtache-show-output-on-attach + ;; HACK: When attaching to a detached process and + ;; `dtache-show-output-on-attach' is non-nil we need to switch + ;; to the compile buffer and go to the end. Otherwise it won't + ;; properly update when new output is coming + (other-window 1) + (end-of-buffer) + (other-window 1))))) ;;;###autoload (defun dtache-compile-open (session)