From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: ERT: body of org-test-with-temp-text-in-file Date: Fri, 14 Dec 2012 15:05:55 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjVtn-0002QX-TV for emacs-orgmode@gnu.org; Fri, 14 Dec 2012 09:06:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjVtk-0005PS-EL for emacs-orgmode@gnu.org; Fri, 14 Dec 2012 09:05:59 -0500 Received: from mail-vc0-f169.google.com ([209.85.220.169]:44985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjVtk-0005PO-9d for emacs-orgmode@gnu.org; Fri, 14 Dec 2012 09:05:56 -0500 Received: by mail-vc0-f169.google.com with SMTP id gb23so4019936vcb.0 for ; Fri, 14 Dec 2012 06:05:55 -0800 (PST) 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: Org Mode Hi all The doc of org-test-with-temp-text-in-file says (org-test-with-temp-text-in-file TEXT &rest BODY) Run body in a temporary file buffer with Org-mode as the active mode. so I thought I can write: #+BEGIN_SRC emacs-lisp (ert-deftest trial/fail () (org-test-with-temp-text-in-file " | | " (forward-line) (should (org-at-table-p)))) #+END_SRC but this ERT fails, it passes only if I move what I thought is a body into a progn: #+BEGIN_SRC emacs-lisp (ert-deftest trial/pass () (org-test-with-temp-text-in-file " | | " (progn (forward-line) (should (org-at-table-p))))) #+END_SRC Is this difference expected? What did I miss? (Emacs 24.2.1 with yesterday=92s release_7.9.2-695-g31d24a) Michael