Reputation: 1295
When I try to create a bookmark in NERDTree (win7 with emacs installed)
:Bookmark mybookmark
I get this:
E482: Can't create file C:\emacs\home/.NERDTreeBookmarks
Upvotes: 3
Views: 2109
Reputation:
NERDTree is trying to write the bookmark to "$HOME/.NERDTreeBookmarks" by default. This is how it looks like in the code:
call s:initVariable("g:NERDTreeBookmarksFile", expand('$HOME') . '/.NERDTreeBookmarks')
While it's possible that you've set the "g:NERDTreeBookmarksFile" variable somewhere in the configuration, it's a lot more likely that emacs has, for some reason, set your "HOME" environment variable to "C:\emacs\home". This explains the slash/backslash mixup as well. You can try two things:
I'd recommend the second option, since it's definitely going to work. You may need to escape the backslashes and spaces, but I can't be sure how at the moment. Try it out in all of these ways and see which one works for you:
let g:NERDTreeBookmarksFile = "C:\Users\Your\ Username"
let g:NERDTreeBookmarksFile = "C:\\Users\\Your\ Username"
let g:NERDTreeBookmarksFile = 'C:\Users\Your Username'
Upvotes: 7