From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115193 invoked by alias); 20 Jan 2016 13:08:36 -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 115173 invoked by uid 89); 20 Jan 2016 13:08:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_05,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:569EE23, Repin, Brown!, brown! X-HELO: limerock03.mail.cornell.edu Received: from limerock03.mail.cornell.edu (HELO limerock03.mail.cornell.edu) (128.84.13.243) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 20 Jan 2016 13:08:34 +0000 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite3.serverfarm.cornell.edu [10.16.197.8]) by limerock03.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id u0KD8WGR027430 for ; Wed, 20 Jan 2016 08:08:32 -0500 Received: from [10.13.22.4] (65-112-130-194.dia.static.qwest.net [65.112.130.194]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id u0KD8UXD026019 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Wed, 20 Jan 2016 08:08:31 -0500 Subject: Re: Any progress on "Fork issues ith long command lines and long $PATH"? To: cygwin@cygwin.com References: <569E92D1.9030506@cornell.edu> <641659872.6133623.1453246485856.JavaMail.yahoo@mail.yahoo.com> <569EE230.2060600@cornell.edu> <158550468.20160120121946@yandex.ru> From: Ken Brown Message-ID: <569F86D2.2050104@cornell.edu> Date: Wed, 20 Jan 2016 18:32:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <158550468.20160120121946@yandex.ru> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00240.txt.bz2 On 1/20/2016 4:19 AM, Andrey Repin wrote: > Greetings, Ken Brown! > >>> (2) I was using $USERPROFILE as an example. We have dozens of these >>> environment variables pointing to dozens directories. They enable us to >>> type in the same file name to emacs's find file (ctrl-x-ctrl-f) regardless >>> of who is logged in or which computer we are logged into (assuming that >>> every account has the same directory structure and propertly defined >>> environment variables). Yes we can manually translate them at a bash >>> prompt but this is a lot more typing, cutting and pasteing. We also share >>> the same .emacs file that contains thousands of file names that contain >>> these environment variables. We will really missing feature of native >>> emacs. > >> The fact that C-x C-f expands environment variables is not a special >> feature of native Windows emacs. But the expansion has to yield a valid >> file name. In the case of Cygwin emacs, that means a Posix path. > >> Maybe you could write a script that uses cygpath to convert the relevant >> environment variables to Posix paths, and then call this script from >> your .bashrc. > > I think it would be easier to just set Cygwin to use $USERPROFILE as $HOME. > Then $HOME would be a POSIX path you can use in the emacs config. The OP stated that USERPROFILE is one of dozens of problematic environment variables, so that wouldn't help. Siegfried, if the script idea doesn't work for you, another possibility is to solve your problem in elisp by using the function cygwin-convert-file-name-from-windows, which exists in the Cygwin build of emacs. For example, here's a snippet from server.el in the emacs development trunk: ;; Allow Cygwin's emacsclient to be used as a file ;; handler on MS-Windows, in which case FILENAME ;; might start with a drive letter. (when (and (fboundp 'cygwin-convert-file-name-from-windows) (string-match "\\`[A-Za-z]:" file)) (setq file (cygwin-convert-file-name-from-windows file))) -- 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