X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=YTaRSua7fA9F30zi paTAJvuD9n69aW1wX4SvZvToM/Na8gJIjlqezXGes+ruCgdsrck2AT9QO5MspUpd QHd/Gk47rFqSN6a5+Pa1QyCRhzvpl2bhoH21NuLACAy9PhO7kpQrAfwUyXsGU5y0 qrMd2kASyZQ8h0tUSGlCP32xxzw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=chFug1kX56DVxnxUDv9sI/ j4A0U=; b=AGRgpGSgTn5CDrYdxdsQCzYh0jUiHRSnUGI2Im3XHHswL0bQTMoeDO S9pl5inaDvhKK8gmsEpPIUNWTsOUdM0yJY0++XTvScmP32smXEKgp65jsS239W2T N731BKrehwIZdDnLqaOYd3+R6dpZ3B1/IfpGs1rEpawBR2MEKL+ic= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 X-CornellRouted: This message has been Routed already. Subject: Re: Any progress on "Fork issues ith long command lines and long $PATH"? To: cygwin AT cygwin DOT com References: <569E92D1 DOT 9030506 AT cornell DOT edu> <641659872 DOT 6133623 DOT 1453246485856 DOT JavaMail DOT yahoo AT mail DOT yahoo DOT com> <569EE230 DOT 2060600 AT cornell DOT edu> <158550468 DOT 20160120121946 AT yandex DOT ru> From: Ken Brown Message-ID: <569F86D2.2050104@cornell.edu> Date: Wed, 20 Jan 2016 08:08:34 -0500 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 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