This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin Emacs and windows paths


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]