From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martyn Jago Subject: [bug][babel] #+call: execution broken Date: Thu, 17 Nov 2011 12:44:56 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:48694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RR1LD-0003Mg-T2 for emacs-orgmode@gnu.org; Thu, 17 Nov 2011 07:45:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RR1L9-0005oI-8G for emacs-orgmode@gnu.org; Thu, 17 Nov 2011 07:45:19 -0500 Received: from lo.gmane.org ([80.91.229.12]:33001) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RR1L8-0005ny-Te for emacs-orgmode@gnu.org; Thu, 17 Nov 2011 07:45:15 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RR1L7-0000nq-Rv for emacs-orgmode@gnu.org; Thu, 17 Nov 2011 13:45:13 +0100 Received: from 88-96-171-138.dsl.zen.co.uk ([88.96.171.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Nov 2011 13:45:13 +0100 Received: from martyn.jago by 88-96-171-138.dsl.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Nov 2011 13:45:13 +0100 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 --=-=-= Content-Type: text/plain Hi C-c C-c on a #+call: block() statement no longer causes the block to execute. This regression occurred on Nov 8th: commit a4273cbe0e0480bd02c59464cafb985951b1c5a2 Author: Eric Schulte Date: Tue Nov 8 19:42:59 2011 -0700 call lines are more careful about being in example or verbatim blocks I've supplied a patch which provides a couple of failing tests which highlight the problem. Best, Martyn --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Tests-for-testing-basic-call-block-name-actually-cau.patch Content-Description: Tests for testing basic `#+call: >From 68a64d29222548eff3f414b8881f583f50ea4a96 Mon Sep 17 00:00:00 2001 From: Martyn Jago Date: Thu, 17 Nov 2011 12:33:08 +0000 Subject: [PATCH] Tests for testing basic `#+call: block-name()' actually cause block execution * testing/lisp/test-ob.el: --- testing/lisp/test-ob.el | 38 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/testing/lisp/test-ob.el b/testing/lisp/test-ob.el index d145f4e..3fefe91 100644 --- a/testing/lisp/test-ob.el +++ b/testing/lisp/test-ob.el @@ -499,4 +499,42 @@ on two lines (provide 'test-ob) +(ert-deftest test-org-babel/basic-call-execution-bol() + "Test that executing #+call: with point on # executes the block" + (org-test-with-temp-text + " +#+call: my-test() +#+srcname: my-test +#+begin_src emacs-lisp + (+ 2 3) +#+end_src " + + (should (search-forward "#+call:")) + (beginning-of-line) + (org-ctrl-c-ctrl-c) + (should (search-forward "#+results: my-test()")) + (forward-line) + (should (string= ": 5" + (buffer-substring-no-properties + (point-at-bol) (point-at-eol)))))) + +(ert-deftest test-org-babel/basic-call-execution-eol() + "Test that executing #+call: with point at eol executes the block" + (org-test-with-temp-text + " +#+call: my-test() +#+srcname: my-test +#+begin_src emacs-lisp + (* 2 3) +#+end_src " + + (should (search-forward "#+call:")) + (end-of-line) + (org-ctrl-c-ctrl-c) + (should (search-forward "#+results: my-test()")) + (forward-line) + (should (string= ": 6" + (buffer-substring-no-properties + (point-at-bol) (point-at-eol)))))) + ;;; test-ob ends here -- 1.7.3.4 --=-=-=--