From: Eli Zaretskii <eliz@gnu.org>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: 71081@debbugs.gnu.org
Subject: bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on Windows
Date: Mon, 20 May 2024 21:59:21 +0300 [thread overview]
Message-ID: <86y1848g3a.fsf@gnu.org> (raw)
In-Reply-To: <875xv8qqlv.fsf@localhost> (message from Ihor Radchenko on Mon, 20 May 2024 18:34:52 +0000)
tags 71081 notabug
thanks
> From: Ihor Radchenko <yantar92@posteo.net>
> Date: Mon, 20 May 2024 18:34:52 +0000
>
> Hello,
>
> On Linux, if I put
>
> echo foo
>
> into scratch, select it, and run M-x shell-command-on-region sh,
> I get "foo" in echo area.
>
> However, on Windows, the result of M-x shell-command-on-region cmdproxy is
>
> Microsoft Windows [Version 10.0.19045.2251]
> (c) Microsoft Corporation. All rights reserved.
>
> c:\Users\johndoe\Org>echo foo
> foo
>
> I expected just "foo".
>
> Original bug report:
> https://list.orgmode.org/orgmode/CACjq+cy8G+EkMgSwr5KWNbN7jjLE3tzqKwbQiTy84ZvJsumMwQ@mail.gmail.com/
>
> AFAIU, the culprit is how cmdproxy handles piped input:
>
> cmdproxy -c 'echo foo' works fine, outputting "foo".
> However (in powershell) echo 'echo foo' | cmdproxy yields the above
> verbose text - all in stdout.
It is not cmdproxy that does this, it's cmd.exe. cmdproxy is not a
shell, it's a simply proxy of the shell that is there to fix some
obscure problems (such as some quoting issues). To run shell
commands, it eventually invokes cmd.exe. Try
echo echo foo | cmd
and you will see the same behavior.
Conclusion: Windows is not a Posix system. But you already knew
that...
As for the original bug report: AFAIR, when cmd.exe says "More?", it
needs a final newline. Other than that, I don't really understand
what is the problem that bug report is trying to solve (I don't use
org-babel). If it expects the same behavior from cmd.exe as a Posix
shell would produce, the expectation is simply incorrect and
unjustified.
I see no Emacs bug here.
next prev parent reply other threads:[~2024-05-20 18:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 18:34 bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on Windows Ihor Radchenko
2024-05-20 18:59 ` Eli Zaretskii [this message]
2024-05-21 20:18 ` Dmitry Gutov
2024-05-22 2:30 ` Eli Zaretskii
2024-05-22 11:45 ` Ihor Radchenko
2024-05-22 13:33 ` Eli Zaretskii
2024-05-22 14:26 ` Ihor Radchenko
2024-05-22 14:53 ` Eli Zaretskii
2024-05-23 12:06 ` Ihor Radchenko
2024-05-23 13:37 ` Eli Zaretskii
2024-05-23 14:00 ` Ihor Radchenko
2024-05-23 14:14 ` Eli Zaretskii
2024-05-23 14:36 ` Ihor Radchenko
2024-05-25 10:03 ` Eli Zaretskii
2024-05-25 10:03 ` 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=86y1848g3a.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=71081@debbugs.gnu.org \
--cc=yantar92@posteo.net \
/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).