emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/dape 33b0d1e44a 5/6: Flush contents of process buffer o


From: ELPA Syncer
Subject: [elpa] externals/dape 33b0d1e44a 5/6: Flush contents of process buffer on exit into debug buffer
Date: Thu, 7 Dec 2023 12:57:53 -0500 (EST)

branch: externals/dape
commit 33b0d1e44a36283f99439ced34e66c57395df72c
Author: Daniel Pettersson <daniel@dpettersson.net>
Commit: Daniel Pettersson <daniel@dpettersson.net>

    Flush contents of process buffer on exit into debug buffer
    
    Would be preferred to flush into repl but some issues getting it to
    work in a satisfactory way.
    - Some adapters are noisy
    - Unparsed messages are left in the buffer on exit, could not figure
      out an easy way to get those parsed before flushing to repl.
    
    Might give some clarity into issue #29
---
 dape.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dape.el b/dape.el
index cadfc3289d..bc78a7e679 100644
--- a/dape.el
+++ b/dape.el
@@ -774,6 +774,11 @@ If NOWARN does not error on no active process."
 (defun dape--process-sentinel (process _msg)
   "Sentinel for Dape processes."
   (unless (process-live-p process)
+    ;; Flush stdout contents
+    (when-let* ((buffer (process-buffer process))
+                ((buffer-live-p buffer)))
+      (with-current-buffer buffer
+        (dape--debug 'io "Flushing io buffer:\n%s" (buffer-string))))
     (dape--remove-stack-pointers)
     ;; Clean mode-line after 2 seconds
     (run-with-timer 2 nil (lambda ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]