Jack Kamm <jackk...@gmail.com> writes:

> This is related to my recent thread,
>
> https://list.orgmode.org/87wmi9etku....@gmail.com/T/#m93bd964243638ee358d4375c9ed4f40e066238d4
>
> which addresses problems with prompt filtering of R and python async 
> evaluation in Org 9.7.
>
> Here, I address the non-async case.
>
> First, I introduce options to `org-babel-comint-with-output' to skip the
> cleanup of prompts and dangling text.  This allows individual Babel
> languages to handle these tasks in a more robust, language-specific
> manner, e.g. by sourcing temp files or relying on functionality from
> external libraries like python.el or ESS.

I have no objections to the idea.
Just one comment on the patch.

> -      ;; got located, and save dangling text
> -      (goto-char (process-mark (get-buffer-process (current-buffer))))
> -      (let ((start (point))
> -            (end (point-max)))
> -        (setq dangling-text (buffer-substring start end))
> -        (delete-region start end))
> +         (unless ,no-save-dangle
> +        ;; got located, and save dangling text
> +        (goto-char (process-mark (get-buffer-process (current-buffer))))
> +        (let ((start (point))
> +              (end (point-max)))
> +          (setq dangling-text (buffer-substring start end))
> +          (delete-region start end)))
>        ;; pass FULL-BODY to process
>        ,@body

Previously, the point was always at process-mark when BODY is
called. Now, it may not be the case. It may cause problems.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

Reply via email to