From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: =?UTF-8?B?W1BBVENIIDIvMl0gYmFiZWw6IGRvbuKAmXQgYWRkIGJhYmVsIGV2?= =?UTF-8?B?YWwgdG8gdGhlIHNlc3Npb27igJlzIGNvbWludCBpbnB1dCByaW5n?= Date: Mon, 28 Oct 2013 18:58:52 -0400 Message-ID: <1383001132-6610-1-git-send-email-aaronecay@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vavm4-0001kA-4o for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 18:59:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vavlu-0001Ih-Nt for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 18:59:04 -0400 Received: from mail-qa0-x231.google.com ([2607:f8b0:400d:c00::231]:55671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vavlu-0001Id-JZ for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 18:58:54 -0400 Received: by mail-qa0-f49.google.com with SMTP id i13so2509237qae.15 for ; Mon, 28 Oct 2013 15:58:54 -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: emacs-orgmode@gnu.org * 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) -- 1.8.4.1