unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: execute shell scripts by call-process in msys2 environment
Date: Wed, 12 Sep 2018 20:10:56 +0300	[thread overview]
Message-ID: <83tvmuljz3.fsf@gnu.org> (raw)
In-Reply-To: <vz136ued5qo.fsf@gmail.com> (message from Andy Moreton on Wed, 12 Sep 2018 17:45:35 +0100)

> From: Andy Moreton <andrewjmoreton@gmail.com>
> Date: Wed, 12 Sep 2018 17:45:35 +0100
> 
> On MSYS2 "/usr/bin/ci" is a shell script that execs "rcs ci". This works
> ok with `shell-command' as that shell can execute the script.

Yes, MSYS2 moves more and more towards being just a variant of Cygwin
in this regard: a large number of "ported" packages are available just
as MSYS2 builds, which means you cannot easily run them from native
apps.

In this case, it should be trivial to provide a small batch file that
invokes "rcs ci" exactly like the shell script does.  Then native
programs, including Emacs, will be able to invoke the batch file as if
it were a program.  Alas, the MSYS2 guys evidently don't think this to
be important enough...

> Other parts of emacs use `call-process' or `make-process', which expect
> to run an executable directly, without invoking a shell. They can also
> run shell scripts if the OS kernel execs the interpreter parsed from the
> '#!' line in the script. MSYS2 (and Cygwin) run on Windows, which does
> not do '#!' parsing in the kernel.

FWIW, ye olde MSDOS port of Emacs is capable of running shell scripts,
but "sic transit gloria mundi".

> The following advice works for me on emacs 26 and later to fix this
> problem on Cygwin (MSYS2 should be similar):

I think it's much easier and safer to write a one-line batch file.

Thanks.



  reply	other threads:[~2018-09-12 17:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12  9:32 execute shell scripts by call-process in msys2 environment holgar.sperr
2018-09-12 14:18 ` Eli Zaretskii
     [not found] ` <mailman.675.1536761912.1284.help-gnu-emacs@gnu.org>
2018-09-12 14:57   ` holgar.sperr
2018-09-12 15:52     ` Eli Zaretskii
2018-09-12 16:45       ` Andy Moreton
2018-09-12 17:10         ` Eli Zaretskii [this message]
     [not found]         ` <mailman.691.1536772269.1284.help-gnu-emacs@gnu.org>
2018-09-13  8:57           ` holgar.sperr
     [not found]     ` <mailman.683.1536767585.1284.help-gnu-emacs@gnu.org>
2018-09-12 16:31       ` holgar.sperr
2018-09-12 17: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=83tvmuljz3.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@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.
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).