From: Martyn Jago <martyn.jago@btinternet.com>
To: emacs-orgmode@gnu.org
Subject: [bug][babel] #+call: execution broken
Date: Thu, 17 Nov 2011 12:44:56 +0000 [thread overview]
Message-ID: <m24ny2gbp3.fsf@btinternet.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 435 bytes --]
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 <schulte.eric@gmail.com>
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Tests for testing basic `#+call: --]
[-- Type: text/x-patch, Size: 1692 bytes --]
From 68a64d29222548eff3f414b8881f583f50ea4a96 Mon Sep 17 00:00:00 2001
From: Martyn Jago <martyn.jago@btinternet.com>
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
next reply other threads:[~2011-11-17 12:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-17 12:44 Martyn Jago [this message]
2011-11-17 16:21 ` [bug][babel] #+call: execution broken Eric Schulte
2011-11-18 8:03 ` Martyn Jago
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m24ny2gbp3.fsf@btinternet.com \
--to=martyn.jago@btinternet.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.