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

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

[elpa] externals/dtache d4a7ba3a5a 1/2: Improve dtache-vterm example


From: ELPA Syncer
Subject: [elpa] externals/dtache d4a7ba3a5a 1/2: Improve dtache-vterm example
Date: Mon, 7 Feb 2022 15:57:23 -0500 (EST)

branch: externals/dtache
commit d4a7ba3a5a508f8d380b084c76c0be318a20eb21
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>

    Improve dtache-vterm example
---
 README.org | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/README.org b/README.org
index 929a2ffd4a..0b1a4a7752 100644
--- a/README.org
+++ b/README.org
@@ -391,11 +391,15 @@ The package can be integrated with the 
[[https://github.com/akermu/emacs-libvter
       "Create a `dtache' session."
       (interactive)
       (vterm-send-C-a)
-      (kill-ring-save (point) (vterm-end-of-line))
-      (vterm-send-C-k)
-      (let* ((input (car kill-ring))
+      (let* ((input (buffer-substring (point) (vterm-end-of-line)))
+             (dtache-session-origin 'vterm)
+             (dtache-session-action
+              '(:attach dtache-shell-command-attach-session
+                        :view dtache-view-dwim
+                        :run dtache-shell-command))
              (dtache-session-mode
               (if detach 'create 'create-and-attach)))
+        (vterm-send-C-k)
         (process-send-string vterm--process (dtache-dtach-command input t))
         (vterm-send-C-e)
         (vterm-send-return)))
@@ -418,7 +422,7 @@ The package can be integrated with the 
[[https://github.com/akermu/emacs-libvter
     (defun dtache-vterm-detach ()
       "Detach from a `dtache' session."
       (interactive)
-      (vterm-send-key "\\" nil nil t)))
+      (process-send-string vterm--process dtache--dtach-detach-character)))
 #+end_src
 
 * Versions



reply via email to

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