From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: Groovy script that reads stdin fails with "java.net.MalformedURLException: unknown protocol: c" when run with "shell-command-on-region" Date: Thu, 12 Feb 2015 16:33:23 -0500 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1423776928 11174 80.91.229.3 (12 Feb 2015 21:35:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Feb 2015 21:35:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 12 22:35:24 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YM1Pv-0002sj-5w for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Feb 2015 22:35:23 +0100 Original-Received: from localhost ([::1]:52241 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YM1Pu-0005tv-GZ for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Feb 2015 16:35:22 -0500 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!news.albasani.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!barmar.motzarella.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Injection-Info: barmar.motzarella.org; posting-host="2be9e9f5dd9af768b8861af71b85fc28"; logging-data="13511"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX196BffkFk9DSUoDdrGNfgyJ" User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Cancel-Lock: sha1:FlEAlD0IH3lm8nP9QUnvH0bQ70I= Original-Xref: usenet.stanford.edu gnu.emacs.help:210410 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102687 Archived-At: In article , "KARR, DAVID" wrote: > I'm using Emacs 24.3.90.1 in Cygwin on Win7. > > I have a Groovy script that reads from stdin, and it works fine when I run it > from Bash, piping text into the process. > > I'm now trying to select text in an Emacs buffer, and then execute > "shell-command-on-region" The text I'm selecting appears to be identical to > what I'm sending on the command line. > > When I run this, it fails with "java.net.MalformedURLException: unknown > protocol: c". > > This obviously has something to do with my PATH, but I'm not sure what could > be wrong. This might be more of a Cygwin question than an Emacs question. I > tried going into my "*scratch*" buffer and printed out the PATH that the > process sees, and it obviously has entries in "/c/..." (I set my cygdrive > prefix to "c"). It doesn't sound like anything to do with the PATH. It sounds like something is generating a Windows filename of the form c:/pathname, and the script is treating that as a URL rather than a local filename. I guess it has something to do with the way that Emacs implements piping to a subprocess. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***