[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH 2/2] babel: don’t add babel ev al to the session’s comint
From: |
Eric Schulte |
Subject: |
Re: [O] [PATCH 2/2] babel: don’t add babel ev al to the session’s comint input ring |
Date: |
Tue, 29 Oct 2013 19:20:49 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Very nice. Thank you for this patch. Applied.
Aaron Ecay <address@hidden> writes:
> * lisp/ob-comint.el (org-babel-comint-in-buffer): don’t add to
> comint-input-ring
>
> Previously, babel code would be added to the comint input ring of a
> babel session, making interactive use of the session difficult: one
> had to page through the babel generated commands when browsing the
> comint history with M-p/M-n. The session repl’s history should just
> contain commands the user has specifically entered in the repl buffer,
> and not those which are fed in from org mode. So, we bind
> ‘comint-input-filter’ to a function that always returns nil in the
> ‘org-babel-comint-in-buffer’ macro, to avoid any additions to the
> input ring while executing code from babel.
> ---
> lisp/ob-comint.el | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/ob-comint.el b/lisp/ob-comint.el
> index 4e2b352..1f28a2c 100644
> --- a/lisp/ob-comint.el
> +++ b/lisp/ob-comint.el
> @@ -53,7 +53,8 @@ executed inside the protection of `save-excursion' and
> (error "Buffer %s does not exist or has no process" ,buffer))
> (save-match-data
> (with-current-buffer ,buffer
> - ,@body))))
> + (let ((comint-input-filter (lambda (input) nil)))
> + ,@body)))))
> (def-edebug-spec org-babel-comint-in-buffer (form body))
>
> (defmacro org-babel-comint-with-output (meta &rest body)
--
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D