emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Regression tests and stderr
Date: Thu, 01 Mar 2012 22:35:18 +0100	[thread overview]
Message-ID: <801upcvwbt.fsf@somewhere.org> (raw)

Hello,

FYI, I just updated, and ran the tests, looking more carefully at the results
once again.

The trailer of what's displayed in the terminal is here:

--8<---------------cut here---------------start------------->8---
       passed  102/112  test-org/accumulated-properties-in-drawers
       passed  103/112  test-org/org-link-escape-ascii-character
       passed  104/112  test-org/org-link-escape-ascii-ctrl-character
       passed  105/112  test-org/org-link-escape-custom-table
       passed  106/112  test-org/org-link-escape-custom-table-merge
       passed  107/112  test-org/org-link-escape-multibyte-character
       passed  108/112  test-org/org-link-escape-url-with-escaped-char
       passed  109/112  test-org/org-link-unescape-ascii-character
       passed  110/112  test-org/org-link-unescape-ascii-ctrl-character
       passed  111/112  test-org/org-link-unescape-ascii-extended-char
       passed  112/112  test-org/org-link-unescape-multibyte-character

    Ran 112 tests, 111 results as expected, 1 unexpected (2012-03-01 22:03:59+0100)
    11 expected failures

    1 unexpected results:
       FAILED  test-org-export/fuzzy-links
--8<---------------cut here---------------end--------------->8---

Pretty good. One failure, though, which I'll try to investigate (later on).

What's weird is the output that comes _after_ the above summary:

--8<---------------cut here---------------start------------->8---
    (a (quote 1))

    (a (quote 2))

    (it (quote 1))

    (it (quote 4))

    (results (quote (4 3 2 1)))

    [...]

    (bar (quote 2))

    (foo (quote 1))

    (bar (quote 2))
    sva@MEDIACENTER$
--8<---------------cut here---------------end--------------->8---

Weird flushes, quite disturbing for analyzing the output of the tests.

I've discovered the same symptoms when using `print' or `princ' functions in
code that's run in batch mode. They come after calls to `message'.

What's even more annoying is that all the output of the testing -- but the
above trailer which comes after the test summary -- is sent to `/dev/stderr'.

What I tried to get is normal, informational messages, sent to `/dev/stdout',
and real errors (like test failures) sent to `/dev/stderr'.

Sadly, this seems to be a limit of Emacs itself:

   "In batch mode, Emacs does not display the text being edited, and the standard
    terminal interrupt characters such as C-z and C-c have their usual effect.
    Emacs functions that normally print a message in the echo area will print to
    either the standard output stream (stdout) or the standard error stream
    (stderr) instead. (To be precise, functions like prin1, princ and print print
    to stdout, while message and error print to stderr.) Functions that normally
    read keyboard input from the minibuffer take their input from the terminal's
    standard input stream (stdin) instead."

    http://www.gnu.org/software/emacs/manual/html_node/emacs/Initial-Options.html

That's a pity, because it really limits (IMHO) the usage of such "script mode"
of Emacs. We can't afford rewriting all calls to `message' into calls to
`princ (format ...)'. Plus, doing so, moves messages in a non-chronological
way (like the "weird flushes" above).

Any workaround in sight?

Best regards,
  Seb

-- 
Sebastien Vauban

             reply	other threads:[~2012-03-01 21:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-01 21:35 Sebastien Vauban [this message]
2012-03-01 21:48 ` Regression tests and stderr Achim Gratz
2012-03-01 22:04   ` Sebastien Vauban

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=801upcvwbt.fsf@somewhere.org \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).