unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ioannis Kappas <ioannis.kappas@gmail.com>
To: 46388@debbugs.gnu.org
Subject: bug#46388: 27.1; emacs -batch does not output messages immediately when invoked outside of the command prompt
Date: Mon, 8 Feb 2021 21:20:47 +0000	[thread overview]
Message-ID: <CAMRHuGB-z+uiS7F71vaLU2L8X-W9BAwUH0+aSDvGz7HmBYmnqQ@mail.gmail.com> (raw)

    There appears to be an issue with the /message/ function when
    emacs is invoked in -batch mode on windows-nt from outside the
    windows console (i.e. not directly from the command
    prompt). Messages are not displayed to the user until emacs exits.

    Consider the following command from example, which suppose to
    print the message "hi" first to the user and then exit after 5 seconds:

    : emacs -Q --batch --eval="(progn (message \"hi\") (sit-for 5))"

    When this command is invoked from within an emacs eshell on
    windows, the message is only displayed to the user after about 5 seconds,
    i.e when emacs is about to exit.

    Here is a small summary running the above under Linux and windows
    native:

    | system              | invoked from   | terminal output
                 |
    |---------------------+----------------+--------------------------------------------|
    | x86_64-pc-linux-gnu | terminal       | prints "hi", then after 5
seconds it exits |
    | x86_64-pc-linux-gnu | emacs eshell   | prints "hi", then after 5
seconds it exits |
    | x86_64-w64-mingw32  | command prompt | prints "hi", then after 5
seconds it exits |
    | x86_64-w64-mingw32  | emacs eshell   | after 5 seconds prints
"hi", then exits    |

    The issue on windows is not exclusive to invoking emacs -batch
    from within emacs (e.g. from eshell), it applies to any invocation
that happens
    outside the command prompt, e.g. from inside the MSYS2 mintty
    terminal.

    It appears as if the issue is caused by a different stderr
    buffering mode used when a program is invoked outside of
    the command prompt. Analysis to follow.

In GNU Emacs 27.1 (build 1, x86_64-w64-mingw32)
 of 2020-11-19 built on fv-az68-340
Repository revision: ec297125a76481c55390d0b329e541907879d6f3
Repository branch: master
Windowing system distributor 'Microsoft Corp.', version 10





             reply	other threads:[~2021-02-08 21:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08 21:20 Ioannis Kappas [this message]
2021-02-08 21:42 ` bug#46388: 27.1; emacs -batch does not output messages immediately when invoked outside of the command prompt Ioannis Kappas
2021-02-09  5:36   ` Eli Zaretskii
2021-02-09 20:15     ` Ioannis Kappas
2021-02-09 20:52       ` Eli Zaretskii
2021-02-09 21:14         ` Eli Zaretskii
     [not found]           ` <CAMRHuGC_p59uw_hmCL65Z0F1ZdFbVAf9MHcB-sX88bW6jchC-Q@mail.gmail.com>
2021-02-10 12:48             ` Ioannis Kappas
2021-02-10 15:57               ` Eli Zaretskii
2021-02-11  8:10                 ` Ioannis Kappas
2021-02-11 14:09                   ` Eli Zaretskii
2021-02-11 19:25                     ` Ioannis Kappas
2021-02-11 19:55                       ` Eli Zaretskii
2021-02-12 19:59                         ` Ioannis Kappas
2021-02-12 20:03                           ` Eli Zaretskii
2021-03-06 15:00                             ` Ioannis Kappas
2021-03-08  4:05                               ` Paul Eggert
2021-03-08  7:56                                 ` Ioannis Kappas
2021-03-11 14:27                                 ` Eli Zaretskii
2021-03-11 18:43                                   ` Paul Eggert
2021-02-11 21:15                     ` Paul Eggert
2021-02-09  3:38 ` Eli Zaretskii

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=CAMRHuGB-z+uiS7F71vaLU2L8X-W9BAwUH0+aSDvGz7HmBYmnqQ@mail.gmail.com \
    --to=ioannis.kappas@gmail.com \
    --cc=46388@debbugs.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).