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

Buffer's directory must exist when finding cabal file #506

Closed
wants to merge 1 commit into from

Conversation

ivan-m
Copy link
Contributor

@ivan-m ivan-m commented Mar 13, 2015

I didn't think about the case that find-file was called to create a new file in an as-yet-nonexistent directory.

@ivan-m
Copy link
Contributor Author

ivan-m commented Mar 13, 2015

Actually, that probably isn't a bad idea.

What I was thinking of doing was adding in support of being able to automatically traverse non-existent path components (I use haskell-cabal-guess-setting to create a module skeleton, and the skeleton is inserted before I can call make-directory, hence how I found this issue). The problem with that is that haskell-cabal-find-file currently tries to ensure that the cabal file is owned by the same user as the directory that starting directory, but the starting directory doesn't actually exist yet.

Any suggestions on how to do that?

@gracjan
Copy link
Contributor

gracjan commented Mar 13, 2015

(Can you change the name of haskell-guess-setting to haskell-cabal-guess-setting while you are at it?)

I know that haskell-cabal-find-file should return nil if the .cabal file is not available for some reason instead of causing issues.

I do not think I understood what you try to achieve so I cannot comment on that, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants