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

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

[nongnu] elpa/dart-mode c54f014 069/192: Merge pull request #18 from hte


From: ELPA Syncer
Subject: [nongnu] elpa/dart-mode c54f014 069/192: Merge pull request #18 from hterkelsen/no_pty
Date: Sun, 29 Aug 2021 11:01:52 -0400 (EDT)

branch: elpa/dart-mode
commit c54f014ac96160e82490f486e050ff5320e2fd89
Merge: 88920ee d6bb4e8
Author: Natalie Weizenbaum <nex342@gmail.com>
Commit: Natalie Weizenbaum <nex342@gmail.com>

    Merge pull request #18 from hterkelsen/no_pty
    
    Use a pipe instead of a pty for the analysis server
---
 dart-mode.el | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/dart-mode.el b/dart-mode.el
index 7c2c4a7..684fd1a 100644
--- a/dart-mode.el
+++ b/dart-mode.el
@@ -685,11 +685,18 @@ directory or the current file directory to the analysis 
roots."
      (dart--analysis-server-process dart--analysis-server))
     (kill-buffer (dart--analysis-server-buffer dart--analysis-server)))
   (let ((dart-process
-         (start-process "dart-analysis-server"
-                        "*dart-analysis-server*"
-                        dart-executable-path
-                        dart-analysis-server-snapshot-path
-                        "--no-error-notification")))
+         ;; set process-connection-type to nil so that emacs starts
+         ;; the analysis server controlled by a pipe rather than a
+         ;; pseudo-terminal. If the process is controlled by a
+         ;; pseudo-terminal, emacs will buffer requests to the analysis
+         ;; server with interspersed EOFs, which confuses the analysis
+         ;; server. This does not happen with pipes.
+         (let ((process-connection-type nil))
+           (start-process "dart-analysis-server"
+                          "*dart-analysis-server*"
+                          dart-executable-path
+                          dart-analysis-server-snapshot-path
+                          "--no-error-notification"))))
     (setq dart--analysis-server
           (dart--analysis-server-create dart-process))))
 



reply via email to

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