delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/03/10/17:19:24

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,SPF_NEUTRAL,TW_YG,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4F5BD356.5060102@cornell.edu>
Date: Sat, 10 Mar 2012 17:19:02 -0500
From: Ken Brown <kbrown AT cornell DOT edu>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Cygwin Emacs and windows paths
References: <1DDD8780-2F3A-4399-8D33-2029B69F7271 AT letterboxes DOT org> <4F5B6334 DOT 1090503 AT cornell DOT edu>
In-Reply-To: <4F5B6334.1090503@cornell.edu>
X-PMX-CORNELL-SPAM-CHECKED: Pawpaw
X-Original-Sender: kbrown AT cornell DOT edu - Sat Mar 10 17:19:02 2012
X-PMX-CORNELL-REASON: CU_White_List_Override
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

> On 11/03/2012, at 1:20 AM, Ken Brown wrote:
>
>> On 3/10/2012 1:17 AM, Leo wrote:
>>> Now my normal Windows paths copied from Windows Explorer don't work
>>> anymore in Emacs - and vice versa. I know I can use `cygpath` to
>>> convert /on the command line/, but is there any integration for this
>>> in Cygwin Emacs?
>> No.  There may actually be some obsolete Cygwin-specific code in files.el that's preventing this from working.  It's possible that emacs is trying to be too smart instead of letting Cygwin handle the file names.  (See, for instance, `convert-standard-filename'.)  I'll take a look at it when I get a chance.
> I'm thinking of a cygwin-specific package which converts the internal Cygwin paths to normal Windows path when copied to the clipboard…
>
> This can be too hard though: The problem might be to determine when the clipboard is copied for use outside emacs and when for use inside emacs. But I'll try at least to make some lisp code to convert per key-binding. Do you thinking it's advisable to call cygpath for doing the conversion? Are there some internal bindings already for this in Cygwin Emacs?

Please reply to the list instead of directly to me.  To avoid messing up 
the threading in the mailing list archives, I'm replying to the original 
thread, with your message to me pasted in.

I do think it's advisable to call cygpath, and I don't know of any 
bindings in the code that you can use.  But I had to do something 
similar once in order to make browse-url work properly on Cygwin.  (In 
that case I had to convert from POSIX paths to Windows paths.)  Take a 
look at the Cygwin-specific code in the function browse-url-file-url in 
lisp/net/browse-url.el.  You may be able to use a similar idea.

Ken

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019