From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115246 invoked by alias); 22 Sep 2017 16:51:42 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 114927 invoked by uid 89); 22 Sep 2017 16:51:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=H*r:Unknown X-HELO: blaine.gmane.org Received: from Unknown (HELO blaine.gmane.org) (195.159.176.226) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 22 Sep 2017 16:51:40 +0000 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dvRAn-00007x-0v for cygwin@cygwin.com; Fri, 22 Sep 2017 18:51:29 +0200 To: cygwin@cygwin.com From: Andy Moreton Subject: Re: Unable to use Cygwin RCS commands in Windows Emacs Date: Fri, 22 Sep 2017 16:51:00 -0000 Message-ID: References: <2609139.qye4Nty6R7@sandl> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00213.txt.bz2 On Wed 20 Sep 2017, Heinz Werner Kramski-Grote wrote: > At some point in history, /usr/bin/co, /usr/bin/ci, /usr/bin/rlog etc. turned > from .exe into shell scripts, which are now wrappers for the main program > /usr/bin/rcs.exe. > > However, these shell scripts can not be called directly from a Windows command > line and moreover can not be invoked by a Windows (not Cygwin) Emacs (25.2 > currentlly). I don't use RCS, but have other Cygwin tools successfully with the Windows port of emacs. The advice below fixes your problem: if a program is an executable then start-process runs normally, but if it is a script then the arguments are modified to run the script via the shell: (setq shell-file-name "/usr/bin/bash") (setq shell-command-switch "-c") (defun ajm:start-process-filter-scripts (args) "Ensure `start-process' can handle executable Cygwin shell scripts." (let ((program (nth 2 args))) (if (or (null program) (executable-find program)) args (list (nth 0 args) (nth 1 args) shell-file-name shell-command-switch (mapconcat #'identity (nthcdr 2 args) " "))))) (advice-add 'start-process :filter-args #'ajm:start-process-filter-scripts) Using "/usr/bin/bash" for shell-file-name requires using the cygwin-mount package (available from the MELPA package archive). If you do not use cygwin-mount, then you will need to use something like "C:\cygwin\bin\bash.exe". HTH, AndyM -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple