Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cygwin provided emacs and pathing #144

Open
jfoutz opened this issue Jan 14, 2015 · 5 comments
Open

cygwin provided emacs and pathing #144

jfoutz opened this issue Jan 14, 2015 · 5 comments
Milestone

Comments

@jfoutz
Copy link

jfoutz commented Jan 14, 2015

MavenProjectsCreator in MavenProjectHandler.groovy dosn't seem to be happy with paths like /cygdrive/c/work/...

I'm not sure if it's better handled in the mode or in the supporting jar.

Locally, I added this cheesy hack right in MavenProjectsCreator.create, which seemed to work.
pom = pom.replace("/cygdrive/c", "c:")

I haven't dug into predicates for determining the environment - if you have some pointers for what to check, and where you want the code, I'd be willing to spend a couple hours putting together a patch, for the jar. I'm not as familiar with elisp, but if you outline the changes if it should happen on the mode side, i'm willing to take a crack at it.

@m0smith m0smith added this to the 2.1.0 milestone Jan 15, 2015
@m0smith
Copy link
Owner

m0smith commented Jan 15, 2015

I think we should have the elisp account for it rather than forcing jar file to have to deal with it.

Are you using cygwin.el or some other cygwin support for emacs?

@jfoutz
Copy link
Author

jfoutz commented Jan 15, 2015

Just the stock cygwin emacs install - if there's some package i should add, I will. FWIW, all the paths look unixish (/cygdrive/c/) from emacs' point of view. I'm running gradle under a cygwin console, but java of course is just making calls straight to windows, so it seems to need the c:/ style pathing in that one case.

Not to hijack the issue but, under cygwin, i checked out the jar project and do gradle run. I added (setq malabar-server-port 4429) to my init.el. I'm going to set malabar up on a mac this weekend - i'll try to document that and get you a pull request for the readme, but was hoping to verify that's the "right" way.

@m0smith
Copy link
Owner

m0smith commented Jan 15, 2015

Cygwin: I used to use the cygwin emacs but it crashed too much so I switched. There are some calls it provides for converting file names. I will get back to you.

Port 4429: It has been my plan to allow a person to do that very thing but I have not tried it myself. I would be very interested in knowing that it works :)

@m0smith
Copy link
Owner

m0smith commented Jan 15, 2015

If you look at the malabar-util.el there is a function commented out:

(defun malabar-util-expand-file-name (f &optional DEFAULT-DIRECTORY)
   (let ((rtnval (funcall malabar-util-path-filter 
             (expand-file-name f DEFAULT-DIRECTORY))))

     rtnval))

We should add this function back in with a new variable malabar-util-path-filter that is customizable. the default value should be 'identity unless (eq system-type 'cygwin) in which case it should be 'cygwin-convert-file-name-to-windows

Then calls to the http service should use malabar-util-expand-file-name instead of expand-file-name.

This will allow people to further customize the file name processing to get it into something java understands.

If you want to do that, feel free to create a pull request or I will get it taken care of soon.

@jfoutz
Copy link
Author

jfoutz commented Jan 15, 2015

I'll dig in to that! I'm not promising today, but i'll try to get you something this weekend. Thanks very much.

@m0smith m0smith modified the milestones: 2.1.1, 2.1.0 Jan 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants