From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: =?UTF-8?B?UmU6IFtQQVRDSCAyLzJdIGJhYmVsOiBkb27igJl0IGFkZCBiYWJl?= =?UTF-8?B?bCBldmFsIHRvIHRoZSBzZXNzaW9u4oCZcyBjb21pbnQgaW5wdXQgcmluZw==?= Date: Tue, 29 Oct 2013 19:20:49 -0600 Message-ID: <87bo27cyl7.fsf@gmail.com> References: <1383001132-6610-1-git-send-email-aaronecay@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58672) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbL0B-0002Tr-JC for emacs-orgmode@gnu.org; Tue, 29 Oct 2013 21:55:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbL05-0005mP-Pp for emacs-orgmode@gnu.org; Tue, 29 Oct 2013 21:55:19 -0400 Received: from mail-pd0-x235.google.com ([2607:f8b0:400e:c02::235]:56836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbL05-0005lr-Jf for emacs-orgmode@gnu.org; Tue, 29 Oct 2013 21:55:13 -0400 Received: by mail-pd0-f181.google.com with SMTP id x10so253703pdj.26 for ; Tue, 29 Oct 2013 18:55:12 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Aaron Ecay Cc: emacs-orgmode@gnu.org Very nice. Thank you for this patch. Applied. Aaron Ecay writes: > * lisp/ob-comint.el (org-babel-comint-in-buffer): don=E2=80=99t 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=E2=80=99s history should j= ust > contain commands the user has specifically entered in the repl buffer, > and not those which are fed in from org mode. So, we bind > =E2=80=98comint-input-filter=E2=80=99 to a function that always returns n= il in the > =E2=80=98org-babel-comint-in-buffer=E2=80=99 macro, to avoid any addition= s 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)) >=20=20 > (defmacro org-babel-comint-with-output (meta &rest body) --=20 Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D