[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals-release/org 4564627415: org-babel-comit-with-output: Fi
From: |
ELPA Syncer |
Subject: |
[elpa] externals-release/org 4564627415: org-babel-comit-with-output: Fix when prompt is emitted partially |
Date: |
Fri, 2 Dec 2022 06:57:48 -0500 (EST) |
branch: externals-release/org
commit 4564627415b1e609acdddd6e92b33d51c8e427c1
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
org-babel-comit-with-output: Fix when prompt is emitted partially
* lisp/ob-comint.el (org-babel-comint-with-output): Do not rely on
output filter when detecting prompt lines. Search for
`comint-prompt-regexp' in the full output after applying the filter.
This is needed when the filter is supplied with partial prompts.
Reported-by: Frédéric Santos <frederic.santos@u-bordeaux.fr>
Link: https://orgmode.org/list/877czca7oj.fsf@u-bordeaux.fr
---
lisp/ob-comint.el | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lisp/ob-comint.el b/lisp/ob-comint.el
index e8d8367076..064ba94464 100644
--- a/lisp/ob-comint.el
+++ b/lisp/ob-comint.el
@@ -117,6 +117,14 @@ or user `keyboard-quit' during execution of body."
(goto-char (process-mark (get-buffer-process (current-buffer))))
(insert dangling-text)
+ ;; Replace partially supplied input lines.
+ ;; This is needed when output filter spits partial lines that
+ ;; do not include a full prompt at a time.
+ (setq string-buffer
+ (replace-regexp-in-string
+ comint-prompt-regexp
+ ,org-babel-comint-prompt-separator
+ string-buffer))
;; remove echo'd FULL-BODY from input
(when (and ,remove-echo ,full-body
(string-match
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals-release/org 4564627415: org-babel-comit-with-output: Fix when prompt is emitted partially,
ELPA Syncer <=